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
1c044a95db8642f8ed7c1815a937448c4dcc305b
17,614
py
Python
examples/rough_translated1/osgoscdevice.py
JaneliaSciComp/osgpyplusplus
a5ae3f69c7e9101a32d8cc95fe680dab292f75ac
[ "BSD-3-Clause" ]
17
2015-06-01T12:19:46.000Z
2022-02-12T02:37:48.000Z
examples/rough_translated1/osgoscdevice.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-07-04T14:36:49.000Z
2015-07-23T18:09:49.000Z
examples/rough_translated1/osgoscdevice.py
cmbruns/osgpyplusplus
f8bfca2cf841e15f6ddb41c958f3ad0d0b9e4b75
[ "BSD-3-Clause" ]
7
2015-11-28T17:00:31.000Z
2020-01-08T07:00:59.000Z
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgoscdevice" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgFX from osgpypp import osgGA from osgpypp import osgT...
34.003861
155
0.624049
import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgFX from osgpypp import osgGA from osgpypp import osgText from osgpypp import osgUtil from osgpypp import osgViewer class PickHandler (osgGA.GUIEventHandler) : PickHandler(osgGA.Device* device): _device(devic...
false
true
1c044ae0afa9f0f0197c0206c6eef6423aa90337
8,384
py
Python
seqsign/views.py
penglian518/protwis
d81b0aaeb0821dcca1979926dc18c1a70a3ca654
[ "Apache-2.0" ]
null
null
null
seqsign/views.py
penglian518/protwis
d81b0aaeb0821dcca1979926dc18c1a70a3ca654
[ "Apache-2.0" ]
null
null
null
seqsign/views.py
penglian518/protwis
d81b0aaeb0821dcca1979926dc18c1a70a3ca654
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, redirect from django.conf import settings from django.http import HttpResponse from alignment.functions import get_proteins_from_selection from common.selection import Selection from common.views import AbsTargetSelection from common.views import AbsSegmentSelection from seqsign.s...
29.314685
110
0.671159
from django.shortcuts import render, redirect from django.conf import settings from django.http import HttpResponse from alignment.functions import get_proteins_from_selection from common.selection import Selection from common.views import AbsTargetSelection from common.views import AbsSegmentSelection from seqsign.s...
true
true
1c044ae557848842c8cb04a31d461064ac43b620
2,176
py
Python
02_findingtheOffset.py
F-Masood/bufferoverflow
b287c5033ed79158f183bb8ba7f964efeccbfe59
[ "MIT" ]
null
null
null
02_findingtheOffset.py
F-Masood/bufferoverflow
b287c5033ed79158f183bb8ba7f964efeccbfe59
[ "MIT" ]
null
null
null
02_findingtheOffset.py
F-Masood/bufferoverflow
b287c5033ed79158f183bb8ba7f964efeccbfe59
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys,socket #msf-pattern_create -l 1850 [vulnhub netstart by foxlox] ip = '192.168.10.51' port = 2371 offset = "Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9A...
108.8
1,861
0.949449
import sys,socket ip = '192.168.10.51' port = 2371 offset = "Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4A...
true
true
1c044bd3fd0cebce21034b5aabb64cfc984aa898
46,732
py
Python
gui/qt/network_dialog.py
1Crazymoney/Electron-Cash-SLP
e8a928243cc33a7672c1c37b217762a6cbb2613a
[ "MIT" ]
6
2020-07-27T18:08:14.000Z
2021-11-17T10:47:10.000Z
gui/qt/network_dialog.py
Huynhhung0/Electron-Cash-SLP
c3ef70e00ce84c9ff2101e1c5caef28ebceb9c02
[ "MIT" ]
null
null
null
gui/qt/network_dialog.py
Huynhhung0/Electron-Cash-SLP
c3ef70e00ce84c9ff2101e1c5caef28ebceb9c02
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 with...
45.414966
363
0.626295
import socket, queue, codecs from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * import PyQt5.QtCore as QtCore from electroncash.i18n import _, pgettext from electroncash import networks from electroncash.util import print_error, Weak, PrintError from electroncash.network import serial...
true
true
1c044c3e7583a64add1e64215df506c3d270a718
1,159
py
Python
test/test_contact_add_group.py
ol6a/python_training
77f28e94ef0cdc3f8a39b4d69499f17b13b87498
[ "Apache-2.0" ]
null
null
null
test/test_contact_add_group.py
ol6a/python_training
77f28e94ef0cdc3f8a39b4d69499f17b13b87498
[ "Apache-2.0" ]
null
null
null
test/test_contact_add_group.py
ol6a/python_training
77f28e94ef0cdc3f8a39b4d69499f17b13b87498
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact from model.group import Group import random from fixture.orm import ORMFixture def test_contact_add_group(app): orm = ORMFixture(host="127.0.0.1", name="addressbook", user="root", password="") if len(orm.get_group_list()) == 0: app.group.create(Group(name="test")) ...
36.21875
100
0.665229
from model.contact import Contact from model.group import Group import random from fixture.orm import ORMFixture def test_contact_add_group(app): orm = ORMFixture(host="127.0.0.1", name="addressbook", user="root", password="") if len(orm.get_group_list()) == 0: app.group.create(Group(name="test")) ...
true
true
1c044c742f5873062c891b348f59c5e024624bd9
1,968
py
Python
examples/scala-parallel-classification/add-algorithm/data/import_eventserver.py
pferrel/incubator-predictionio
4b2fb7c1b6a1cd1027a4c03e6ae1af223c8e634c
[ "Apache-2.0" ]
2
2017-03-10T03:03:14.000Z
2017-07-03T02:38:42.000Z
examples/scala-parallel-classification/add-algorithm/data/import_eventserver.py
michaelzzh/LF_PredictionIO
98bfd4d75efaab7633697f12e31e791660dbd61a
[ "Apache-2.0" ]
null
null
null
examples/scala-parallel-classification/add-algorithm/data/import_eventserver.py
michaelzzh/LF_PredictionIO
98bfd4d75efaab7633697f12e31e791660dbd61a
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
30.75
77
0.690549
""" Import sample data for classification engine """ import predictionio import argparse def import_events(client, file): f = open(file, 'r') count = 0 print "Importing data..." for line in f: data = line.rstrip('\r\n').split(",") plan = data[0] attr = data[1].split(" ") client.create_event( ...
false
true
1c044c8a980618044cb543470a0b53f1ff556e1f
2,426
py
Python
util/photolib/workspace.py
ChrisCummins/photolib
a0592482317ef8c27676efe1c43452af5cd65106
[ "Apache-2.0" ]
null
null
null
util/photolib/workspace.py
ChrisCummins/photolib
a0592482317ef8c27676efe1c43452af5cd65106
[ "Apache-2.0" ]
null
null
null
util/photolib/workspace.py
ChrisCummins/photolib
a0592482317ef8c27676efe1c43452af5cd65106
[ "Apache-2.0" ]
null
null
null
"""Utilities for working with workspaces.""" import os import pathlib import typing from labm8 import app from util.photolib import common FLAGS = app.FLAGS def find_workspace_rootpath(start_path: str) -> typing.Optional[str]: """ Starting at the given path, ascend up the directory tree until the workspace r...
27.568182
79
0.673537
import os import pathlib import typing from labm8 import app from util.photolib import common FLAGS = app.FLAGS def find_workspace_rootpath(start_path: str) -> typing.Optional[str]: if all( os.path.isdir(os.path.join(start_path, tld)) for tld in common.TOP_LEVEL_DIRS): return os.path.abspath(star...
true
true
1c044dd0c0b3f938c7e6eeb13cbb4f2c4be33493
1,659
py
Python
dataworkspace/dataworkspace/apps/datasets/migrations/0092_auto_20211007_1219.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/datasets/migrations/0092_auto_20211007_1219.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/datasets/migrations/0092_auto_20211007_1219.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-10-07 12:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("datasets", "0091_visualisationlinksqlquery"), ] operations = [ migrations.AlterField( model_name="dataset", name="us...
31.903846
89
0.446655
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("datasets", "0091_visualisationlinksqlquery"), ] operations = [ migrations.AlterField( model_name="dataset", name="user_access_type", field=models.CharFi...
true
true
1c044e0adc2e76f3e09fa33177fcd6ea0b79bfed
8,783
py
Python
docs/conf.py
m-nikhil/connexion
5789a42ddf4791530c7f788fad9a7dc753b5bb73
[ "Apache-2.0" ]
49
2021-12-30T16:44:16.000Z
2022-03-31T19:33:12.000Z
docs/conf.py
m-nikhil/connexion
5789a42ddf4791530c7f788fad9a7dc753b5bb73
[ "Apache-2.0" ]
221
2022-02-07T20:30:28.000Z
2022-03-31T20:40:12.000Z
docs/conf.py
m-nikhil/connexion
5789a42ddf4791530c7f788fad9a7dc753b5bb73
[ "Apache-2.0" ]
15
2022-02-07T17:20:04.000Z
2022-03-31T15:14:41.000Z
# # Connexion documentation build configuration file, created by # sphinx-quickstart on Wed Jun 17 12:09:55 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration value...
31.480287
79
0.704201
extensions = ['autoapi.extension'] autoapi_type = 'python' autoapi_options = ['members', 'inherited-members', 'undoc-members', 'show-inheritance', 'show-module-summary', 'special-members', 'imported-m...
true
true
1c044e3e3d70e2d8900a369dacb35b7d930ae80d
425
py
Python
moviepy/video/fx/time_mirror.py
spollard/moviepy
57f1110b0f6e9779e6fa9f81a453c7355363aa30
[ "MIT" ]
2
2021-11-27T00:38:10.000Z
2022-01-08T09:12:05.000Z
moviepy/video/fx/time_mirror.py
spollard/moviepy
57f1110b0f6e9779e6fa9f81a453c7355363aa30
[ "MIT" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/moviepy/video/fx/time_mirror.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
2
2020-10-14T18:21:28.000Z
2020-10-15T19:15:21.000Z
from moviepy.decorators import apply_to_audio, apply_to_mask, requires_duration @requires_duration @apply_to_mask @apply_to_audio def time_mirror(self): """ Returns a clip that plays the current clip backwards. The clip must have its ``duration`` attribute set. The same effect is applied to the clip's...
30.357143
79
0.748235
from moviepy.decorators import apply_to_audio, apply_to_mask, requires_duration @requires_duration @apply_to_mask @apply_to_audio def time_mirror(self): return self.fl_time(lambda t: self.duration - t, keep_duration=True)
true
true
1c044ef861125a68e6c3073ce9926baad1773b50
114
py
Python
beneficiaries/beneficiaries/web_form/beneficiary_request/beneficiary_request.py
baidalala/beneficiaries
b7299e0a7da91e90c607e70d76994ec0aebae402
[ "MIT" ]
null
null
null
beneficiaries/beneficiaries/web_form/beneficiary_request/beneficiary_request.py
baidalala/beneficiaries
b7299e0a7da91e90c607e70d76994ec0aebae402
[ "MIT" ]
null
null
null
beneficiaries/beneficiaries/web_form/beneficiary_request/beneficiary_request.py
baidalala/beneficiaries
b7299e0a7da91e90c607e70d76994ec0aebae402
[ "MIT" ]
1
2021-08-31T18:47:58.000Z
2021-08-31T18:47:58.000Z
from __future__ import unicode_literals import frappe from frappe import _ def get_context(context): pass
10.363636
39
0.789474
from __future__ import unicode_literals import frappe from frappe import _ def get_context(context): pass
true
true
1c04506b1a7ca3a0aafc52ef059d595e230452ec
20,396
py
Python
lenstronomy/LensModel/lens_model.py
DarthLazar/lenstronomy
64f72a89bb08ef19d3641b7e5e048238632e9094
[ "MIT" ]
null
null
null
lenstronomy/LensModel/lens_model.py
DarthLazar/lenstronomy
64f72a89bb08ef19d3641b7e5e048238632e9094
[ "MIT" ]
1
2022-02-26T21:04:47.000Z
2022-02-26T21:04:47.000Z
lenstronomy/LensModel/lens_model.py
DarthLazar/lenstronomy
64f72a89bb08ef19d3641b7e5e048238632e9094
[ "MIT" ]
1
2022-02-08T20:31:45.000Z
2022-02-08T20:31:45.000Z
from __future__ import print_function, division, absolute_import, unicode_literals __author__ = 'sibirrer' from lenstronomy.LensModel.single_plane import SinglePlane from lenstronomy.LensModel.MultiPlane.multi_plane import MultiPlane from lenstronomy.Cosmo.lens_cosmo import LensCosmo from lenstronomy.Util import consta...
51.505051
121
0.661061
from __future__ import print_function, division, absolute_import, unicode_literals __author__ = 'sibirrer' from lenstronomy.LensModel.single_plane import SinglePlane from lenstronomy.LensModel.MultiPlane.multi_plane import MultiPlane from lenstronomy.Cosmo.lens_cosmo import LensCosmo from lenstronomy.Util import consta...
true
true
1c04511fb96db87cf2d9a45de4bd11023d24e48b
11,162
py
Python
docs/source/tutorials_source/platform/tutorial_active_learning.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
null
null
null
docs/source/tutorials_source/platform/tutorial_active_learning.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
null
null
null
docs/source/tutorials_source/platform/tutorial_active_learning.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
null
null
null
""" .. _lightly-tutorial-active-learning-classification: Tutorial 3: Active learning for classification ============================================== We provide the tutorial in a ready to use `Google Colab <https://colab.research.google.com/drive/1E3rz7fY7UqXNI_VYNxSu6KvQINzotwrz?usp=sharing>`_ notebook: In thi...
43.772549
127
0.760975
import os import csv from typing import List, Dict, Tuple import numpy as np from sklearn.linear_model import LogisticRegression from lightly.active_learning.agents.agent import ActiveLearningAgent from lightly.active_learning.config.selection_config import SelectionConfig from lightly.active_learning.scorers.class...
true
true
1c04520d5b26380e92b32661e9c1a23c1c1de40f
3,621
py
Python
PaperExperiments/XHExp736/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
PaperExperiments/XHExp736/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
PaperExperiments/XHExp736/parameters.py
stefan-c-kremer/TE_World2
8e1fae218af8a1eabae776deecac62192c22e0ca
[ "MIT" ]
null
null
null
# parameters.py """ Exp 736 - {'Initial_genes': '5000', 'Host_mutation_rate': '0.30', 'TE_progeny': '0.00, 0, 0.55, 1, 0.30, 2, 0.15, 3', 'TE_Insertion_Distribution': 'Flat()', 'Carrying_capacity': '300', 'TE_excision_rate': '0.5', 'Junk_BP': '14', 'Gene_Insertion_Distribution': 'Flat()', 'mutation_effect': '0.01', 'T...
37.71875
322
0.647611
from TEUtil import *; output = { "SPLAT": False, "SPLAT FITNESS": False, "INITIALIZATION": False, "GENERATION": True, "HOST EXTINCTION": True, "TE EXTINCTION": True, "TRIAL NO": True, "GENE INIT": False, "TE INIT": False, }; TE_Insertion_Distribution = Flat(); Gene_Insertion_Distributi...
true
true
1c0452e5dbe047ee648546e8ee76c6b46feabf01
2,076
py
Python
tests/sentry_plugins/bitbucket/test_repository_provider.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry_plugins/bitbucket/test_repository_provider.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry_plugins/bitbucket/test_repository_provider.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import responses from exam import fixture from sentry.models import Repository from sentry.testutils import PluginTestCase from social_auth.models import UserSocialAuth from sentry_plugins.bitbucket.plugin import BitbucketRepositoryProvider from sentry_plugins.bitbucket.testuti...
34.032787
127
0.630539
from __future__ import absolute_import import responses from exam import fixture from sentry.models import Repository from sentry.testutils import PluginTestCase from social_auth.models import UserSocialAuth from sentry_plugins.bitbucket.plugin import BitbucketRepositoryProvider from sentry_plugins.bitbucket.testuti...
true
true
1c045380b901356edc245145a1c431b7698666cb
311
py
Python
HacoWeb/haco/venv/bin/gdal2tiles.py
DeanORourke1996/haco
fc04d763735ca376c51e82e1f1be20b092ce751c
[ "MIT" ]
null
null
null
HacoWeb/haco/venv/bin/gdal2tiles.py
DeanORourke1996/haco
fc04d763735ca376c51e82e1f1be20b092ce751c
[ "MIT" ]
null
null
null
HacoWeb/haco/venv/bin/gdal2tiles.py
DeanORourke1996/haco
fc04d763735ca376c51e82e1f1be20b092ce751c
[ "MIT" ]
null
null
null
#!/Users/dean/haco/HacoWeb/haco/venv/bin/python import sys # import osgeo_utils.gdal2tiles as a convenience to use as a script from osgeo_utils.gdal2tiles import * # noqa from osgeo_utils.gdal2tiles import main from osgeo.gdal import deprecation_warn deprecation_warn('gdal2tiles') sys.exit(main(sys.argv))
25.916667
67
0.803859
import sys from osgeo_utils.gdal2tiles import * from osgeo_utils.gdal2tiles import main from osgeo.gdal import deprecation_warn deprecation_warn('gdal2tiles') sys.exit(main(sys.argv))
true
true
1c0453ff3ca005da1f4beeab3d62fd1e460089f0
322
py
Python
app/utils/nbrConv.py
mbromberek/personal_site
922f83cb53beb0ab0196faac03b32c08866f9d6e
[ "BSD-3-Clause" ]
1
2021-03-28T15:12:27.000Z
2021-03-28T15:12:27.000Z
app/utils/nbrConv.py
mbromberek/personal_site
922f83cb53beb0ab0196faac03b32c08866f9d6e
[ "BSD-3-Clause" ]
null
null
null
app/utils/nbrConv.py
mbromberek/personal_site
922f83cb53beb0ab0196faac03b32c08866f9d6e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ''' BSD 3-Clause License Copyright (c) 2021, Mike Bromberek All rights reserved. ''' import re def isFloat(val): float_regex = re.compile(r"^[-+]?(?:\b[0-9]+(?:\.[0-9]*)?|\.[0-9]+\b)(?:[eE][-+]?[0-9]+\b)?$").match if float_regex(val): return True else: return Fals...
17.888889
104
0.534161
import re def isFloat(val): float_regex = re.compile(r"^[-+]?(?:\b[0-9]+(?:\.[0-9]*)?|\.[0-9]+\b)(?:[eE][-+]?[0-9]+\b)?$").match if float_regex(val): return True else: return False
true
true
1c0454f9a2e3d4d6b173eae9de7242e6f740215e
471
py
Python
source/main/venv/Scripts/pip3-script.py
ncurnyn/F20EC_Website
2fe7599e5361a5c846f4977f302200f825c872af
[ "BSD-3-Clause" ]
null
null
null
source/main/venv/Scripts/pip3-script.py
ncurnyn/F20EC_Website
2fe7599e5361a5c846f4977f302200f825c872af
[ "BSD-3-Clause" ]
null
null
null
source/main/venv/Scripts/pip3-script.py
ncurnyn/F20EC_Website
2fe7599e5361a5c846f4977f302200f825c872af
[ "BSD-3-Clause" ]
null
null
null
#!"C:\Users\fulvi\Desktop\Heriot Watt\4th year\semester2\e-commerce\other recommender\venv\Scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv...
36.230769
111
0.664544
__requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('pip==19.0.3', 'console_scripts', 'pip3')() )
true
true
1c0455b744d0b5133da87b9ed9a3e0390aaf85c7
15,166
py
Python
eval_knn.py
XuanxuanGao/esvit
a8328a283dc33c7cf80f556b0112d01482c9ab2b
[ "MIT" ]
null
null
null
eval_knn.py
XuanxuanGao/esvit
a8328a283dc33c7cf80f556b0112d01482c9ab2b
[ "MIT" ]
null
null
null
eval_knn.py
XuanxuanGao/esvit
a8328a283dc33c7cf80f556b0112d01482c9ab2b
[ "MIT" ]
null
null
null
# coding=utf-8 # Modified by Chunyuan Li (chunyl@microsoft.com) # # Copyright (c) Facebook, Inc. and its affiliates. # # 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.apac...
47.246106
180
0.677568
import os import argparse import torch from torch import nn import torch.distributed as dist import torch.backends.cudnn as cudnn from torchvision import datasets from torchvision import transforms as pth_transforms from torchvision import models as torchvision_models torchvision_archs = sorted(name for name in to...
true
true
1c0456009db0fbc5ef6a5a78e760d18499cf1821
29,467
py
Python
zerver/migrations/0001_initial.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
6
2019-05-09T20:43:20.000Z
2022-03-29T05:53:50.000Z
zerver/migrations/0001_initial.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
2
2016-10-18T04:01:56.000Z
2016-10-20T18:19:09.000Z
zerver/migrations/0001_initial.py
kaustubh-nair/zulip
fb96407607c1f42b350980ad13af20b884750606
[ "Apache-2.0" ]
7
2016-08-10T02:24:32.000Z
2022-03-28T15:14:18.000Z
# Generated by Django 1.11.2 on 2017-06-22 10:22 import bitfield.models import django.contrib.auth.models import django.core.validators import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models from django.db.backends.postgresql.schema import...
48.625413
259
0.603081
import bitfield.models import django.contrib.auth.models import django.core.validators import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.s...
true
true
1c04568ea9a4f08276ec6202db4c0bd9d420092a
3,554
py
Python
azure-servicefabric/azure/servicefabric/models/replica_health_evaluation.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-servicefabric/azure/servicefabric/models/replica_health_evaluation.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-servicefabric/azure/servicefabric/models/replica_health_evaluation.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.056338
147
0.699212
from .health_evaluation import HealthEvaluation class ReplicaHealthEvaluation(HealthEvaluation): _validation = { 'kind': {'required': True}, } _attribute_map = { 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, 'description': {'key': 'Description', 'ty...
true
true
1c0456ac4dcc4e33ef01f49e1a8904344071553d
401
py
Python
hdps/wsgi.py
nahian01/HDPS
791d0adfb8e68b96e8cf49a6e6cbeaa290d3baa9
[ "CC0-1.0" ]
1
2020-10-07T17:39:27.000Z
2020-10-07T17:39:27.000Z
hdps/wsgi.py
nahian01/HDPS
791d0adfb8e68b96e8cf49a6e6cbeaa290d3baa9
[ "CC0-1.0" ]
null
null
null
hdps/wsgi.py
nahian01/HDPS
791d0adfb8e68b96e8cf49a6e6cbeaa290d3baa9
[ "CC0-1.0" ]
1
2020-10-22T16:02:18.000Z
2020-10-22T16:02:18.000Z
""" WSGI config for hdps project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJ...
23.588235
79
0.750623
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hdps.settings') application = get_wsgi_application()
true
true
1c0456d2ecc5c14ec86e00039412fb48069dba86
1,165
py
Python
app/models.py
Evan-cell/pitch-quotes
b839e40e58553a306c3ee38db9065d23a1543011
[ "Unlicense" ]
null
null
null
app/models.py
Evan-cell/pitch-quotes
b839e40e58553a306c3ee38db9065d23a1543011
[ "Unlicense" ]
null
null
null
app/models.py
Evan-cell/pitch-quotes
b839e40e58553a306c3ee38db9065d23a1543011
[ "Unlicense" ]
null
null
null
from sqlalchemy.orm import backref from . import login_manager from flask_login import UserMixin from werkzeug.security import generate_password_hash,check_password_hash from . import db @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin,db.Model): __tab...
29.125
72
0.733906
from sqlalchemy.orm import backref from . import login_manager from flask_login import UserMixin from werkzeug.security import generate_password_hash,check_password_hash from . import db @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin,db.Model): __tab...
true
true
1c045875f41e60bbdbb72a05449a2747b3f03fe1
3,250
py
Python
docs/management/commands/documentation.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
21
2017-10-08T23:19:47.000Z
2020-01-16T20:02:08.000Z
docs/management/commands/documentation.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
6
2020-06-03T05:30:52.000Z
2022-01-13T00:44:26.000Z
docs/management/commands/documentation.py
adelsonllima/djangoplus
a4ce50bf8231a0d9a4a40751f0d076c2e9931f44
[ "BSD-3-Clause" ]
9
2017-10-09T22:58:31.000Z
2021-11-20T15:20:18.000Z
# -*- coding: utf-8 -*- from django.conf import settings from django.utils import translation from djangoplus.tools import terminal from djangoplus.docs import Documentation from django.utils.translation import ugettext as _ from django.core.management.base import BaseCommand class Command(BaseCommand): def add...
51.587302
124
0.561538
from django.conf import settings from django.utils import translation from djangoplus.tools import terminal from djangoplus.docs import Documentation from django.utils.translation import ugettext as _ from django.core.management.base import BaseCommand class Command(BaseCommand): def add_arguments(self, parser)...
true
true
1c0458ab74ca4dcdac30c097f0ff33190254d7a8
4,575
py
Python
tools/test_net.py
tohoaa/wetectron
b2e406a71df31ee2a80e101c513fccc0b21b82cd
[ "MIT" ]
null
null
null
tools/test_net.py
tohoaa/wetectron
b2e406a71df31ee2a80e101c513fccc0b21b82cd
[ "MIT" ]
null
null
null
tools/test_net.py
tohoaa/wetectron
b2e406a71df31ee2a80e101c513fccc0b21b82cd
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Copyright (C) 2020 NVIDIA Corporation. All rights reserved. # Nvidia Source Code License-NC # -------------------------------------------------------- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # Set up custom environment before ...
34.398496
114
0.670383
from wetectron.utils.env import setup_environment import argparse import os import torch from wetectron.config import cfg from wetectron.data import make_data_loader from wetectron.engine.inference import inference from wetectron.modeling.detector import build_detection_model from wetectron.utils.checkpoint import ...
true
true
1c0459d29159ddf4b7ff1a612f3d7353c19bef04
847
py
Python
autom8/__init__.py
vishalbelsare/autom8
6721a4cd509d76b214a1e9fc874c3ddc7ec8924d
[ "MIT" ]
3
2019-01-02T20:23:12.000Z
2019-01-31T01:11:39.000Z
autom8/__init__.py
vishalbelsare/autom8
6721a4cd509d76b214a1e9fc874c3ddc7ec8924d
[ "MIT" ]
null
null
null
autom8/__init__.py
vishalbelsare/autom8
6721a4cd509d76b214a1e9fc874c3ddc7ec8924d
[ "MIT" ]
2
2019-01-02T20:23:23.000Z
2019-08-19T01:12:14.000Z
__version__ = '0.0.11' from .cleaning import clean_dataset from .context import create_context, RecordingContext, Labels from .exceptions import Autom8Exception, Autom8Warning from .formats import read_csv from .inference import infer_roles from .main import fit, run from .matrix import ( create_matrix, Colum...
21.717949
61
0.763872
__version__ = '0.0.11' from .cleaning import clean_dataset from .context import create_context, RecordingContext, Labels from .exceptions import Autom8Exception, Autom8Warning from .formats import read_csv from .inference import infer_roles from .main import fit, run from .matrix import ( create_matrix, Colum...
true
true
1c045aa4cb00a2f8e06f54efbe85bad87a6e991e
2,891
py
Python
buildbot/clang_tidy.py
elizabethandrews/llvm
308498236c1c4778fdcba0bfbb556adf8aa333ea
[ "Apache-2.0" ]
34
2020-01-31T17:50:00.000Z
2022-02-16T20:19:29.000Z
buildbot/clang_tidy.py
elizabethandrews/llvm
308498236c1c4778fdcba0bfbb556adf8aa333ea
[ "Apache-2.0" ]
14
2020-02-03T23:39:51.000Z
2021-07-20T16:24:25.000Z
buildbot/clang_tidy.py
elizabethandrews/llvm
308498236c1c4778fdcba0bfbb556adf8aa333ea
[ "Apache-2.0" ]
5
2020-07-22T16:56:37.000Z
2022-01-08T02:50:20.000Z
import argparse import os import subprocess import sys FILE_EXTENSIONS = [".h", ".hpp", ".c", ".cc", ".cpp"] def do_clang_tidy(args): ret = False merge_base_cmd = ["git", "merge-base", "origin/{}".format(args.base_branch), args.branch] print(merge_base_cmd) base_commit = subprocess.check_output(merge...
41.898551
111
0.628156
import argparse import os import subprocess import sys FILE_EXTENSIONS = [".h", ".hpp", ".c", ".cc", ".cpp"] def do_clang_tidy(args): ret = False merge_base_cmd = ["git", "merge-base", "origin/{}".format(args.base_branch), args.branch] print(merge_base_cmd) base_commit = subprocess.check_output(merge...
true
true
1c045aad48fecb10a3526c660d390a64493390b8
19,447
py
Python
kafka/consumer/subscription_state.py
tcpcloud/debian-python-kafka
4d165955553608fed0735c07553fef59305844b4
[ "Apache-2.0" ]
null
null
null
kafka/consumer/subscription_state.py
tcpcloud/debian-python-kafka
4d165955553608fed0735c07553fef59305844b4
[ "Apache-2.0" ]
null
null
null
kafka/consumer/subscription_state.py
tcpcloud/debian-python-kafka
4d165955553608fed0735c07553fef59305844b4
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import abc import logging import re import six from kafka.errors import IllegalStateError from kafka.protocol.offset import OffsetResetStrategy from kafka.structs import OffsetAndMetadata log = logging.getLogger(__name__) class SubscriptionState(object): """ A class ...
41.911638
89
0.687407
from __future__ import absolute_import import abc import logging import re import six from kafka.errors import IllegalStateError from kafka.protocol.offset import OffsetResetStrategy from kafka.structs import OffsetAndMetadata log = logging.getLogger(__name__) class SubscriptionState(object): _SUBSCRIPTION_EX...
true
true
1c045c5d0daa63d0dd097f213c2fca35d3c375a1
2,950
py
Python
data/p2DJ/New/program/qiskit/simulator/startQiskit61.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit61.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit61.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=7 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as...
27.830189
82
0.622373
import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as nx def bui...
true
true
1c045ca515940c570117f2d6d443969d4e585005
968
py
Python
schnadmin/localization.py
tonimichel/djpl-schnadmin
48fde154a3a534a80e6406d6f5518d8d43e40415
[ "MIT" ]
null
null
null
schnadmin/localization.py
tonimichel/djpl-schnadmin
48fde154a3a534a80e6406d6f5518d8d43e40415
[ "MIT" ]
null
null
null
schnadmin/localization.py
tonimichel/djpl-schnadmin
48fde154a3a534a80e6406d6f5518d8d43e40415
[ "MIT" ]
null
null
null
from django.contrib import admin import django.forms class LocalizedAdmin(admin.ModelAdmin): def get_form(self, *args, **kwargs): form = super(LocalizedAdmin, self).get_form(*args, **kwargs) localize_form(form) return form def localize_form(form): ''' Patch <form> (class) to loca...
35.851852
106
0.637397
from django.contrib import admin import django.forms class LocalizedAdmin(admin.ModelAdmin): def get_form(self, *args, **kwargs): form = super(LocalizedAdmin, self).get_form(*args, **kwargs) localize_form(form) return form def localize_form(form): def forminit(self, *args, **kwargs):...
true
true
1c045dbec56cd5768f9c33b6147086e9b654e275
9,199
py
Python
redbot/syntax/rfc7230.py
plambert/redbot
49b0fa9fb6da655dd8db6fe4273baa9460ed5847
[ "MIT" ]
null
null
null
redbot/syntax/rfc7230.py
plambert/redbot
49b0fa9fb6da655dd8db6fe4273baa9460ed5847
[ "MIT" ]
null
null
null
redbot/syntax/rfc7230.py
plambert/redbot
49b0fa9fb6da655dd8db6fe4273baa9460ed5847
[ "MIT" ]
null
null
null
# pylint: disable=line-too-long, unused-import """ Regex for RFC7230 These regex are directly derived from the collected ABNF in RFC7230: <http://httpwg.org/specs/rfc7230.html#collected.abnf> They should be processed with re.VERBOSE. """ from .rfc5234 import ALPHA, CR, LF, CRLF, CTL, DIGIT, DQUOTE, HEXDIG, HTAB,...
26.586705
146
0.585716
from .rfc5234 import ALPHA, CR, LF, CRLF, CTL, DIGIT, DQUOTE, HEXDIG, HTAB, OCTET, SP, VCHAR from .rfc3986 import URI_reference, absolute_URI, authority, fragment, path_abempty, port, query, relative_part, scheme, segment, host as uri_host SPEC_URL = "http://httpwg.org/specs/rfc7230" OWS = r"(?: {SP} | {HTAB} )*...
true
true
1c045f2948b546f4862db164e0b2e85bad1269ef
3,161
py
Python
ls.py
baklanovp/pystella
47a8b9c3dcd343bf80fba80c8468b803f0f842ce
[ "MIT" ]
1
2019-08-08T13:11:57.000Z
2019-08-08T13:11:57.000Z
ls.py
cradesto/pystella
f6f44ed12d9648585a52a09e15d494daa4c70c59
[ "MIT" ]
9
2015-07-11T16:39:57.000Z
2021-11-23T07:31:49.000Z
ls.py
cradesto/pystella
f6f44ed12d9648585a52a09e15d494daa4c70c59
[ "MIT" ]
1
2019-08-08T13:08:55.000Z
2019-08-08T13:08:55.000Z
#!/usr/bin/env python3 import argparse import logging import os import sys from os.path import dirname import pystella as ps from pystella.util.string_misc import print_table, list_to_table __author__ = 'bakl' ROOT_DIRECTORY = dirname(dirname(os.path.abspath(__file__))) logging.basicConfig() logger = logging.getL...
31.61
96
0.504271
import argparse import logging import os import sys from os.path import dirname import pystella as ps from pystella.util.string_misc import print_table, list_to_table __author__ = 'bakl' ROOT_DIRECTORY = dirname(dirname(os.path.abspath(__file__))) logging.basicConfig() logger = logging.getLogger(__name__) logger....
true
true
1c045fb494df58df9eb8a9eab6c559f839113457
4,711
py
Python
Image/image_metadata.py
mllzl/earthengine-py-notebooks
cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5
[ "MIT" ]
1
2020-03-26T04:21:15.000Z
2020-03-26T04:21:15.000Z
Image/image_metadata.py
mllzl/earthengine-py-notebooks
cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5
[ "MIT" ]
null
null
null
Image/image_metadata.py
mllzl/earthengine-py-notebooks
cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5
[ "MIT" ]
null
null
null
# %% """ <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/image_metadata.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank"...
49.589474
1,021
0.743154
import subprocess try: import geemap except ImportError: print('geemap package not installed. Installing ...') subprocess.check_call(["python", '-m', 'pip', 'install', 'geemap']) try: import google.colab import geemap.eefolium as emap except: import geemap as emap import ee try: ee.Ini...
true
true
1c045fc06f5593cb9f826fb0c3ce9cf4a4b2757d
2,584
py
Python
src/parts/NvidiaGpuData.py
rszab003/hardware-monitor-linux
bf627fdf8478d1db393ab3d9dbf7a35664360b07
[ "MIT" ]
null
null
null
src/parts/NvidiaGpuData.py
rszab003/hardware-monitor-linux
bf627fdf8478d1db393ab3d9dbf7a35664360b07
[ "MIT" ]
null
null
null
src/parts/NvidiaGpuData.py
rszab003/hardware-monitor-linux
bf627fdf8478d1db393ab3d9dbf7a35664360b07
[ "MIT" ]
null
null
null
import subprocess, concurrent.futures def getGpuName() -> str: name = subprocess.run(["nvidia-smi", "--query-gpu=name", "--format=csv"], text=True, capture_output=True, check=True) return name.stdout.split("\n")[1] def getTotalMemory() -> int: totMem = subprocess.run(["nvidia-smi", "--query-gpu=memory.t...
38.567164
143
0.674149
import subprocess, concurrent.futures def getGpuName() -> str: name = subprocess.run(["nvidia-smi", "--query-gpu=name", "--format=csv"], text=True, capture_output=True, check=True) return name.stdout.split("\n")[1] def getTotalMemory() -> int: totMem = subprocess.run(["nvidia-smi", "--query-gpu=memory.t...
true
true
1c0460f84ff5b248ecde8e0615c668de70fb72a2
3,792
py
Python
bokeh/sphinxext/bokeh_sitemap.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
null
null
null
bokeh/sphinxext/bokeh_sitemap.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
null
null
null
bokeh/sphinxext/bokeh_sitemap.py
g-parki/bokeh
664ead5306bba64609e734d4105c8aa8cfb76d81
[ "BSD-3-Clause" ]
null
null
null
# ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -----------------------------------------------------------------...
32.135593
138
0.455169
from __future__ import annotations import logging log = logging.getLogger(__name__) from html import escape from os.path import join from sphinx.errors import SphinxError from sphinx.util import status_iterator from . import PARALLEL_SAFE __all__ = ( "build_finished", "html_page_context", "setup",...
true
true
1c0461b0e7beeebfcd9db03d6baac00957f5ebbd
7,465
py
Python
tensorflow_datasets/image/celeba.py
tmatha/datasets
936e5f2ebd0e14b5ee3116de7d1690d53933f7cf
[ "Apache-2.0" ]
2
2019-10-20T05:40:10.000Z
2019-10-31T17:25:52.000Z
tensorflow_datasets/image/celeba.py
tmatha/datasets
936e5f2ebd0e14b5ee3116de7d1690d53933f7cf
[ "Apache-2.0" ]
1
2019-05-03T13:04:57.000Z
2019-05-03T13:04:57.000Z
tensorflow_datasets/image/celeba.py
tmatha/datasets
936e5f2ebd0e14b5ee3116de7d1690d53933f7cf
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets 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 appl...
35.889423
85
0.66939
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorflow as tf import tensorflow_datasets.public_api as tfds IMG_ALIGNED_DATA = ("https://drive.google.com/uc?export=download&" "id=0B7EVK8r0v71pZjFTYXZWM3FlRnM") EVAL...
true
true
1c0461c42cc549d1ab8566db360e1f13de57bfb4
860
py
Python
problem019.py
mazayus/ProjectEuler
64aebd5d80031fab2f0ef3c44c3a1118212ab613
[ "MIT" ]
null
null
null
problem019.py
mazayus/ProjectEuler
64aebd5d80031fab2f0ef3c44c3a1118212ab613
[ "MIT" ]
null
null
null
problem019.py
mazayus/ProjectEuler
64aebd5d80031fab2f0ef3c44c3a1118212ab613
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from itertools import * def dates(year, month, day): def is_leap_year(year): return (year % 400 == 0) or (year % 100 != 0 and year % 4 == 0) def days_per_month(year, month): if month == 2: return 29 if is_leap_year(year) else 28 elif month in [4, 6,...
26.875
71
0.527907
from itertools import * def dates(year, month, day): def is_leap_year(year): return (year % 400 == 0) or (year % 100 != 0 and year % 4 == 0) def days_per_month(year, month): if month == 2: return 29 if is_leap_year(year) else 28 elif month in [4, 6, 9, 11]: re...
true
true
1c04624996ff94a9c53a52b03926911ca6b25a6d
8,044
py
Python
models/UCSharedModelProCommon.py
erfect2020/DecompositionForFusion
73e65485b84a3802ecd80b8b926108d103be1a62
[ "MIT" ]
null
null
null
models/UCSharedModelProCommon.py
erfect2020/DecompositionForFusion
73e65485b84a3802ecd80b8b926108d103be1a62
[ "MIT" ]
null
null
null
models/UCSharedModelProCommon.py
erfect2020/DecompositionForFusion
73e65485b84a3802ecd80b8b926108d103be1a62
[ "MIT" ]
null
null
null
import torch.nn as nn import torch import torch.nn.init as init from .resnet import ResNestLayer, Bottleneck import math class UCSharedNetPro(nn.Module): def __init__(self): super(UCSharedNetPro, self).__init__() encoder_upper = [nn.Conv2d(3, 16, 3, 1, 1, bias=True), nn.Re...
57.049645
138
0.706614
import torch.nn as nn import torch import torch.nn.init as init from .resnet import ResNestLayer, Bottleneck import math class UCSharedNetPro(nn.Module): def __init__(self): super(UCSharedNetPro, self).__init__() encoder_upper = [nn.Conv2d(3, 16, 3, 1, 1, bias=True), nn.Re...
true
true
1c04629936b973a8489f562de08f06bac183b760
379
py
Python
roadmap/views.py
GerasymenkoS/django-developer-test
1b27f41720a607cf7adf891aac0f8f2204ddcade
[ "MIT" ]
null
null
null
roadmap/views.py
GerasymenkoS/django-developer-test
1b27f41720a607cf7adf891aac0f8f2204ddcade
[ "MIT" ]
null
null
null
roadmap/views.py
GerasymenkoS/django-developer-test
1b27f41720a607cf7adf891aac0f8f2204ddcade
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView from rest_framework import viewsets from roadmap.models import Project from roadmap.serializers import ProjectSerializer class ProjectViewSet(viewsets.ModelViewSet): queryset = Project.objects.all() serializer_class = ProjectSerializer class DashboadTemplate(Tem...
27.071429
49
0.823219
from django.views.generic import TemplateView from rest_framework import viewsets from roadmap.models import Project from roadmap.serializers import ProjectSerializer class ProjectViewSet(viewsets.ModelViewSet): queryset = Project.objects.all() serializer_class = ProjectSerializer class DashboadTemplate(Tem...
true
true
1c046407244deb02d0099a3e7440668c299e7d9b
10,677
py
Python
wcxf/cli.py
peterstangl/wcxf-python
20efadb04955a47672c36760d73d5ba74c5a662e
[ "MIT" ]
null
null
null
wcxf/cli.py
peterstangl/wcxf-python
20efadb04955a47672c36760d73d5ba74c5a662e
[ "MIT" ]
null
null
null
wcxf/cli.py
peterstangl/wcxf-python
20efadb04955a47672c36760d73d5ba74c5a662e
[ "MIT" ]
null
null
null
import argparse import wcxf import sys import logging import os import yaml import pylha def wcxf_cli(): parser = argparse.ArgumentParser(description="Command line interface to manipulate WCxf files.") subparsers = parser.add_subparsers(title='subcommands') # convert parser_convert = subparsers.add_...
47.453333
205
0.612813
import argparse import wcxf import sys import logging import os import yaml import pylha def wcxf_cli(): parser = argparse.ArgumentParser(description="Command line interface to manipulate WCxf files.") subparsers = parser.add_subparsers(title='subcommands') parser_convert = subparsers.add_parser('co...
true
true
1c0464b8a8ea5bbb5af3c1bbc8f1a3665ac93cd8
22,954
py
Python
steam/utils.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
null
null
null
steam/utils.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
null
null
null
steam/utils.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015 Rossen Georgiev <rossen@rgp.io> Copyright (c) 2015-present Rapptz Copyright (c) 2020 James 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 res...
29.926988
120
0.624248
from __future__ import annotations import abc import asyncio import builtins import contextvars import functools import html import io import json import re import struct import sys from collections import deque from collections.abc import Awaitable, Callable, Coroutine, Generator, Iterable, Mapping, Sized from inspe...
true
true
1c0465d006a3b88776e0671e79dacaf838ab361e
916
py
Python
qudarap/tests/QTexLookupTest.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
11
2020-07-05T02:39:32.000Z
2022-03-20T18:52:44.000Z
qudarap/tests/QTexLookupTest.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
null
null
null
qudarap/tests/QTexLookupTest.py
hanswenzel/opticks
b75b5929b6cf36a5eedeffb3031af2920f75f9f0
[ "Apache-2.0" ]
4
2020-09-03T20:36:32.000Z
2022-01-19T07:42:21.000Z
#!/usr/bin/env python """ :: ipython -i tests/QTexLookupTest.py """ import os, logging, numpy as np log = logging.getLogger(__name__) class QTexLookupTest(object): FOLD = os.path.expandvars("/tmp/$USER/opticks/QTexLookupTest") def __init__(self, fold=None): if fold is None: fold =...
23.487179
67
0.546943
import os, logging, numpy as np log = logging.getLogger(__name__) class QTexLookupTest(object): FOLD = os.path.expandvars("/tmp/$USER/opticks/QTexLookupTest") def __init__(self, fold=None): if fold is None: fold = self.FOLD pass names = os.listdir(fold) lo...
true
true
1c0465d9c7d94a1e3d32f60894c67ae319b99de9
8,788
py
Python
holdem/playercontrol.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
50
2016-10-07T02:21:12.000Z
2022-01-18T04:15:28.000Z
holdem/playercontrol.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
null
null
null
holdem/playercontrol.py
hckynumber9/nn-holdem
ef49a91369733eb1453c5db71c77f644ca91fa23
[ "Unlicense", "MIT" ]
19
2017-04-10T01:28:49.000Z
2021-04-18T04:50:22.000Z
import numpy as np import uuid from threading import Thread import xmlrpc.client from xmlrpc.server import SimpleXMLRPCServer from .holdemai import HoldemAI from deuces.deuces import Card # xmlrpc.client.Marshaller.dispatch[long] = lambda _, v, w: w("<value><i8>%d</i8></value>" % v) # xmlrpc.client.Marshaller.dispat...
35.152
150
0.505007
import numpy as np import uuid from threading import Thread import xmlrpc.client from xmlrpc.server import SimpleXMLRPCServer from .holdemai import HoldemAI from deuces.deuces import Card class PlayerControl(object): def __init__(self, host, port, playerID, ai_flag = False, ai_type = -1, name = 'Alice', stack =...
true
true
1c046770125028ad6fa04b0f534c199d7d398233
1,676
py
Python
twitchtube/api.py
Hexiro/twitchtube
22bc9a1dc45adae57c1a22ef1b9e837c12059897
[ "MIT" ]
null
null
null
twitchtube/api.py
Hexiro/twitchtube
22bc9a1dc45adae57c1a22ef1b9e837c12059897
[ "MIT" ]
null
null
null
twitchtube/api.py
Hexiro/twitchtube
22bc9a1dc45adae57c1a22ef1b9e837c12059897
[ "MIT" ]
null
null
null
import json import requests local = locals() def request(endpoint: str, headers: dict, params: dict) -> requests.Response: return requests.get( "https://api.twitch.tv/" + endpoint, headers=headers, params=params ) def data(slug: str, oauth_token: str, client_id: str) -> requests.Response: retu...
30.472727
115
0.630668
import json import requests local = locals() def request(endpoint: str, headers: dict, params: dict) -> requests.Response: return requests.get( "https://api.twitch.tv/" + endpoint, headers=headers, params=params ) def data(slug: str, oauth_token: str, client_id: str) -> requests.Response: retu...
true
true
1c046825a8d678724e17abef320d499e6796666a
3,483
py
Python
fleiss/main/algorithm.py
sethmachine/iaa
493e625ae839fcbf2f72ed97f8ce29b727c5fb41
[ "MIT" ]
null
null
null
fleiss/main/algorithm.py
sethmachine/iaa
493e625ae839fcbf2f72ed97f8ce29b727c5fb41
[ "MIT" ]
null
null
null
fleiss/main/algorithm.py
sethmachine/iaa
493e625ae839fcbf2f72ed97f8ce29b727c5fb41
[ "MIT" ]
null
null
null
""" fleiss.py by Marco Lui, Dec 2010 Based on http://en.wikipedia.org/wiki/Fleiss'_kappa and Cardillo G. (2007) Fleisses kappa: compute the Fleiss'es kappa for multiple raters. http://www.mathworks.com/matlabcentral/fileexchange/15426 """ import numpy from scipy.special import erfc def fleiss_wikpedia(data): ...
29.516949
100
0.562733
""" fleiss.py by Marco Lui, Dec 2010 Based on http://en.wikipedia.org/wiki/Fleiss'_kappa and Cardillo G. (2007) Fleisses kappa: compute the Fleiss'es kappa for multiple raters. http://www.mathworks.com/matlabcentral/fileexchange/15426 """ import numpy from scipy.special import erfc def fleiss_wikpedia(data): ...
false
true
1c0468ae212e6ef97fbfcddc913965fa7a633f7b
7,592
py
Python
oommfc/drivers/driver.py
spinachslayer420/MSE598-SAF-Project
4719afdb6e90e9deb91268fe9a88e1cbf2b34a86
[ "BSD-3-Clause" ]
null
null
null
oommfc/drivers/driver.py
spinachslayer420/MSE598-SAF-Project
4719afdb6e90e9deb91268fe9a88e1cbf2b34a86
[ "BSD-3-Clause" ]
null
null
null
oommfc/drivers/driver.py
spinachslayer420/MSE598-SAF-Project
4719afdb6e90e9deb91268fe9a88e1cbf2b34a86
[ "BSD-3-Clause" ]
null
null
null
import os import sys import abc import glob import json import shutil import datetime import contextlib import oommfc as oc import ubermagtable as ut import discretisedfield as df import micromagneticmodel as mm @contextlib.contextmanager def _changedir(dirname): """Context manager for changing directory. ""...
36.5
79
0.526475
import os import sys import abc import glob import json import shutil import datetime import contextlib import oommfc as oc import ubermagtable as ut import discretisedfield as df import micromagneticmodel as mm @contextlib.contextmanager def _changedir(dirname): cwd = os.getcwd() os.chdir(dirname) try: ...
true
true
1c0468f6560ea2f0e87b535e09f9030eb41932d4
1,533
py
Python
bronze_labels/create_bronze_json_files.py
strubell/coref
76dac84605daf39857e1c2dff939d30dfe9b6384
[ "Apache-2.0" ]
null
null
null
bronze_labels/create_bronze_json_files.py
strubell/coref
76dac84605daf39857e1c2dff939d30dfe9b6384
[ "Apache-2.0" ]
null
null
null
bronze_labels/create_bronze_json_files.py
strubell/coref
76dac84605daf39857e1c2dff939d30dfe9b6384
[ "Apache-2.0" ]
null
null
null
import collections import json import sys def get_bronze_mentions(clusters, predicted_mentions): gold_mentions = set(tuple(i) for i in sum(clusters, [])) print(gold_mentions) high_precision = sorted(list( predicted_mentions.intersection(gold_mentions))) high_recall = sorted(list( predicted_mentions.uni...
31.9375
76
0.680365
import collections import json import sys def get_bronze_mentions(clusters, predicted_mentions): gold_mentions = set(tuple(i) for i in sum(clusters, [])) print(gold_mentions) high_precision = sorted(list( predicted_mentions.intersection(gold_mentions))) high_recall = sorted(list( predicted_mentions.uni...
true
true
1c046a2d6d5f62b1040b7f336cf94239815333bb
54,823
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_private_link_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_private_link_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_private_link_services_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.525376
260
0.67468
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
1c046b3372d2a3915d28884bff4042aaa7ff06b1
11,194
py
Python
tradefed_cluster/predefined_message_api_test.py
maksonlee/tradefed_cluster
d1153743ce8ddcad752443b23851015630862aea
[ "Apache-2.0" ]
null
null
null
tradefed_cluster/predefined_message_api_test.py
maksonlee/tradefed_cluster
d1153743ce8ddcad752443b23851015630862aea
[ "Apache-2.0" ]
null
null
null
tradefed_cluster/predefined_message_api_test.py
maksonlee/tradefed_cluster
d1153743ce8ddcad752443b23851015630862aea
[ "Apache-2.0" ]
null
null
null
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
41.306273
78
0.708773
import unittest from protorpc import protojson from tradefed_cluster import api_messages from tradefed_cluster import api_test from tradefed_cluster import datastore_entities from tradefed_cluster.util import ndb_shim as ndb class PredefinedMessageApiTest(api_test.ApiTest): def testCreatePredefinedMessage_succ...
true
true
1c046b7c45775a9f6573954bd89d9d5f53d88d60
3,268
py
Python
kutana/router.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
kutana/router.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
kutana/router.py
sakost/kutana
7695902803f17e1ce6109b5f9a8a7c24126d322f
[ "MIT" ]
null
null
null
from sortedcontainers import SortedList from .handler import HandlerResponse as hr class Router: __slots__ = ("priority",) def __init__(self, priority=0): self.priority = priority def _key(self, handler): """Key for sorting handlers.""" return ( handler.group_state ==...
28.417391
79
0.605569
from sortedcontainers import SortedList from .handler import HandlerResponse as hr class Router: __slots__ = ("priority",) def __init__(self, priority=0): self.priority = priority def _key(self, handler): return ( handler.group_state == "*", handler.user_state == ...
true
true
1c046d8fece5b55cb3d172c2530331ed2d187d0e
2,567
py
Python
bitjoy/dtypes/bytes_.py
senavs/BitJoy
347538d69ed38df2082192e7991f09e9f94d3d11
[ "MIT" ]
null
null
null
bitjoy/dtypes/bytes_.py
senavs/BitJoy
347538d69ed38df2082192e7991f09e9f94d3d11
[ "MIT" ]
null
null
null
bitjoy/dtypes/bytes_.py
senavs/BitJoy
347538d69ed38df2082192e7991f09e9f94d3d11
[ "MIT" ]
null
null
null
from itertools import zip_longest from typing import Sequence, List from .bits import Bit from .circuits import Adder class Bytes: def __init__(self, bits: Sequence[Bit], architecture: int = None): """Bytes class :param bits: sequence of bits to make a bytes :type: Sequence[Bit] ...
28.522222
112
0.585119
from itertools import zip_longest from typing import Sequence, List from .bits import Bit from .circuits import Adder class Bytes: def __init__(self, bits: Sequence[Bit], architecture: int = None): bits = list(bits) bits_length = len(bits) if not architecture: architecture ...
true
true
1c046dceb153fa20d786bbc30734425364e1ace2
6,048
py
Python
2018/12/2018_Day_12a.py
vScourge/Advent_of_Code
91c743e20e1105d25bcc30da882677ce11c8092a
[ "MIT" ]
null
null
null
2018/12/2018_Day_12a.py
vScourge/Advent_of_Code
91c743e20e1105d25bcc30da882677ce11c8092a
[ "MIT" ]
null
null
null
2018/12/2018_Day_12a.py
vScourge/Advent_of_Code
91c743e20e1105d25bcc30da882677ce11c8092a
[ "MIT" ]
null
null
null
""" --- Day 12: Subterranean Sustainability --- The year 518 is significantly more underground than your history books implied. Either that, or you've arrived in a vast cavern network under the North Pole. After exploring a little, you discover a long tunnel that contains a row of small pots as far as you can see to y...
36
157
0.536045
import sys import time import numpy class Note( ): def __init__( self, line ): self.pattern = [ c == '#' for c in line[ :5 ] ] self.result = line[ -1 ] == '#' self.line = line a = 3 def __repr__( self ): return '<Note {0}>'.format( self.line ) if __name__ == "__main__": notes = [ ] for line ...
true
true
1c046e1ce16f99db8f4cd2dab657b1828c23d97a
253
py
Python
docker-notebook/config/jupyter_notebook_config.py
andriygav/MachineLearning
7ef6a439add8a536c7862565aa56bdd46bd84888
[ "MIT" ]
5
2020-12-11T07:34:45.000Z
2021-06-15T19:31:50.000Z
docker-notebook/config/jupyter_notebook_config.py
andriygav/MachineLearning
7ef6a439add8a536c7862565aa56bdd46bd84888
[ "MIT" ]
null
null
null
docker-notebook/config/jupyter_notebook_config.py
andriygav/MachineLearning
7ef6a439add8a536c7862565aa56bdd46bd84888
[ "MIT" ]
null
null
null
c.NotebookApp.ip = '0.0.0.0' c.NotebookApp.password = u'' c.NotebookApp.token='' c.NotebookApp.open_browser = False c.NotebookApp.enable_mathjax = False c.NotebookApp.allow_root = True c.NotebookApp.port = 9000 c.NotebookApp.notebook_dir = '/workspace/'
31.625
42
0.770751
c.NotebookApp.ip = '0.0.0.0' c.NotebookApp.password = u'' c.NotebookApp.token='' c.NotebookApp.open_browser = False c.NotebookApp.enable_mathjax = False c.NotebookApp.allow_root = True c.NotebookApp.port = 9000 c.NotebookApp.notebook_dir = '/workspace/'
true
true
1c046ee2da0269a26a2f7470fa5ac699d3c95b93
38,141
py
Python
venv/lib/python3.8/site-packages/kivy/core/text/__init__.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
6
2021-07-26T14:21:25.000Z
2021-07-26T14:32:01.000Z
venv/lib/python3.8/site-packages/kivy/core/text/__init__.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
5
2021-02-27T21:31:47.000Z
2021-04-05T21:49:38.000Z
venv/lib/python3.8/site-packages/kivy/core/text/__init__.py
felipesch92/projeto_kivy
382827b9a632c5c3989a3129a2d3ee29b0defcf3
[ "MIT" ]
1
2022-03-03T13:37:22.000Z
2022-03-03T13:37:22.000Z
''' Text ==== An abstraction of text creation. Depending of the selected backend, the accuracy of text rendering may vary. .. versionchanged:: 1.10.1 :meth:`LabelBase.find_base_direction` added. .. versionchanged:: 1.5.0 :attr:`LabelBase.line_height` added. .. versionchanged:: 1.0.7 The :class:`LabelBas...
37.614398
79
0.574552
__all__ = ('LabelBase', 'Label', 'FontContextManagerBase', 'FontContextManager') import re import os from ast import literal_eval from functools import partial from copy import copy from kivy import kivy_data_dir from kivy.config import Config from kivy.utils import platform from kivy.graphics.texture impo...
true
true
1c0470c427779475d9e6af9d183023e12aae96aa
3,267
py
Python
airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/utils/common.py
curanaj/airbyte-dbt-demo
f6b8ccd8f8e57b7ea84caf814b14d836338e8007
[ "MIT" ]
null
null
null
airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/utils/common.py
curanaj/airbyte-dbt-demo
f6b8ccd8f8e57b7ea84caf814b14d836338e8007
[ "MIT" ]
null
null
null
airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/utils/common.py
curanaj/airbyte-dbt-demo
f6b8ccd8f8e57b7ea84caf814b14d836338e8007
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
37.988372
116
0.746863
from collections import UserDict from pathlib import Path from typing import Iterable, List import pytest from yaml import load try: from yaml import CLoader as Loader except ImportError: from yaml import Loader from airbyte_cdk.models import AirbyteMessage, ConfiguredAirbyteCatalog, SyncMode from source_a...
true
true
1c04717c2fe0b16f51da1ed5ea5ab0744471019e
845
py
Python
app/__init__.py
Mutembeijoe/pitch
d03a7f011d2620e322fc8eed352a4e254ba5e283
[ "MIT" ]
null
null
null
app/__init__.py
Mutembeijoe/pitch
d03a7f011d2620e322fc8eed352a4e254ba5e283
[ "MIT" ]
4
2021-06-08T20:29:36.000Z
2022-03-12T00:02:51.000Z
app/__init__.py
Mutembeijoe/pitch
d03a7f011d2620e322fc8eed352a4e254ba5e283
[ "MIT" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager from app.config import config_options db = SQLAlchemy() bcrypt = Bcrypt() login_manager = LoginManager() login_manager.login_view = 'users.login' login_manager.login_message_category ...
22.236842
55
0.770414
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager from app.config import config_options db = SQLAlchemy() bcrypt = Bcrypt() login_manager = LoginManager() login_manager.login_view = 'users.login' login_manager.login_message_category ...
true
true
1c047261d6ab622a3cdbbdec5129ef09ef159145
36,678
py
Python
nets/mj_gaitcopy_model.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
1
2022-01-25T17:32:47.000Z
2022-01-25T17:32:47.000Z
nets/mj_gaitcopy_model.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
null
null
null
nets/mj_gaitcopy_model.py
avagait/gaitcopy
2fee760156b289ef12f19fb366fb62cf535c305e
[ "MIT" ]
null
null
null
# Copies signatures # (c) MJMJ/2021 import tensorflow as tf import tensorflow.keras.backend as K import tensorflow_addons as tfa import deepdish as dd import os import numpy as np from nets.triplet_loss_all import TripletBatchAllLoss # =============================================================== # Version 1 of L1-...
48.773936
156
0.679808
import tensorflow as tf import tensorflow.keras.backend as K import tensorflow_addons as tfa import deepdish as dd import os import numpy as np from nets.triplet_loss_all import TripletBatchAllLoss HUBER_DELTA = 0.5 def mj_smoothL1(y_true, y_pred): x = K.abs(y_true - y_pred) x = K.switch(x < HUBER_DELTA, 0....
true
true
1c0472c7d896d0221f6abe798487b270ebfd8ad8
2,346
py
Python
tests/raft_node_state.py
lycantropos/consensual
0dcb850a39a81bbbb7b79fe6e7f8ce2fc4588c69
[ "MIT" ]
2
2022-02-15T08:10:35.000Z
2022-02-15T15:22:16.000Z
tests/raft_node_state.py
lycantropos/consensual
0dcb850a39a81bbbb7b79fe6e7f8ce2fc4588c69
[ "MIT" ]
null
null
null
tests/raft_node_state.py
lycantropos/consensual
0dcb850a39a81bbbb7b79fe6e7f8ce2fc4588c69
[ "MIT" ]
null
null
null
from typing import (Any, Dict, List, Optional) from reprit.base import generate_repr from consensual.core.raft.command import Command from consensual.core.raft.hints import (NodeId, Term) from consensual.core.raft.reco...
35.545455
70
0.537511
from typing import (Any, Dict, List, Optional) from reprit.base import generate_repr from consensual.core.raft.command import Command from consensual.core.raft.hints import (NodeId, Term) from consensual.core.raft.reco...
true
true
1c047342c6039d71f19e731a182afeed7777d06a
3,547
py
Python
discordpurge.py
Asymmetritek/discordpurge
e09f80806fa16333711aa7448bf86556a700fc37
[ "MIT" ]
2
2020-02-09T01:32:21.000Z
2020-10-05T02:28:59.000Z
discordpurge.py
Asymmetritek/discordpurge
e09f80806fa16333711aa7448bf86556a700fc37
[ "MIT" ]
1
2020-01-01T04:35:15.000Z
2020-01-01T16:04:52.000Z
discordpurge.py
Asymmetritek/discordpurge
e09f80806fa16333711aa7448bf86556a700fc37
[ "MIT" ]
2
2021-04-04T11:10:43.000Z
2021-11-12T20:53:36.000Z
"""discordpurge Usage: discordpurge.py [-q | --quiet] [--after=<utc_datetime>] [--before=<utc_datetime>] <target> Options: -q --quiet Disable interactive confirmation check """ import asyncio import datetime import sys from pathlib import Path import discord import dateutil.parser as du_parser from docopt i...
35.828283
118
0.626163
import asyncio import datetime import sys from pathlib import Path import discord import dateutil.parser as du_parser from docopt import docopt client = discord.Client() @client.event async def on_ready(): try: counter = 0 print(f"Logged in as '{client.user}'") print("Acquiring ...
true
true
1c04741e91b0b6876fec74af248eb8398c73dde7
127
py
Python
nifcloud/__init__.py
tnaoto/nifcloud-sdk-python
67d7383b8b486efb0394a7453893b0233ca7be6a
[ "Apache-2.0" ]
null
null
null
nifcloud/__init__.py
tnaoto/nifcloud-sdk-python
67d7383b8b486efb0394a7453893b0233ca7be6a
[ "Apache-2.0" ]
null
null
null
nifcloud/__init__.py
tnaoto/nifcloud-sdk-python
67d7383b8b486efb0394a7453893b0233ca7be6a
[ "Apache-2.0" ]
null
null
null
from . import (auth, configprovider, loaders, parsers, serialize, # noqa: F401 session) __version__ = '0.1.8'
25.4
79
0.629921
from . import (auth, configprovider, loaders, parsers, serialize, session) __version__ = '0.1.8'
true
true
1c04744f337bf96688232fdcb8ec520b5680a930
2,743
py
Python
acq4/devices/Camera/DevTemplate.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
1
2020-06-04T17:04:53.000Z
2020-06-04T17:04:53.000Z
acq4/devices/Camera/DevTemplate.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
24
2016-09-27T17:25:24.000Z
2017-03-02T21:00:11.000Z
acq4/devices/Camera/DevTemplate.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
4
2016-10-19T06:39:36.000Z
2019-09-30T21:06:45.000Z
# -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file './acq4/devices/Camera/DevTemplate.ui' # # Created: Tue Dec 24 01:49:07 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtG...
42.2
96
0.731316
from __future__ import print_function from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig): return QtGui.QApplication.translat...
true
true
1c047488cc3a1cb6fd442067505bc9dfce45b39e
53,387
py
Python
retrofit/MachineLearning.py
SeanBenner/RetroFit
1417775c2154c2127b3dedaf133f8f21d5f1adfa
[ "MIT" ]
null
null
null
retrofit/MachineLearning.py
SeanBenner/RetroFit
1417775c2154c2127b3dedaf133f8f21d5f1adfa
[ "MIT" ]
null
null
null
retrofit/MachineLearning.py
SeanBenner/RetroFit
1417775c2154c2127b3dedaf133f8f21d5f1adfa
[ "MIT" ]
null
null
null
# Module: MachineLearning # Author: Adrian Antico <adrianantico@gmail.com> # License: MIT # Release: retrofit 0.1.4 # Last modified : 2021-09-15 def ML0_GetModelData(TrainData=None, ValidationData=None, TestData=None, ArgsList=None, TargetColumnName=None, NumericColumnNames=None, CategoricalColumnNames=None, TextColum...
36.12111
323
0.598273
def ML0_GetModelData(TrainData=None, ValidationData=None, TestData=None, ArgsList=None, TargetColumnName=None, NumericColumnNames=None, CategoricalColumnNames=None, TextColumnNames=None, WeightColumnName=None, Threads=-1, Processing='catboost', InputFrame='datatable'): if not ArgsList is None: Targe...
true
true
1c04752ff607d45e201c88b87ab6dd54d8d91255
57,792
py
Python
core/controllers/suggestion_test.py
kevjumba/oppia
2618d2d85a5320c8ff4dcd700ccbc67b4d36fdf4
[ "Apache-2.0" ]
1
2021-06-26T00:31:08.000Z
2021-06-26T00:31:08.000Z
core/controllers/suggestion_test.py
kevjumba/oppia
2618d2d85a5320c8ff4dcd700ccbc67b4d36fdf4
[ "Apache-2.0" ]
null
null
null
core/controllers/suggestion_test.py
kevjumba/oppia
2618d2d85a5320c8ff4dcd700ccbc67b4d36fdf4
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
40.413986
111
0.605395
from __future__ import absolute_import from __future__ import unicode_literals from constants import constants from core.domain import exp_domain from core.domain import exp_fetchers from core.domain import exp_services from core.domain import feedback_services from core.domain import question_domain from core.dom...
true
true
1c04755d6378f1c851c4d939cad512fbd79be96c
282
py
Python
code/sin_detect.py
mahehu/SGN-41007
c8ed169a0a5f70fb87b99448e39a573c0df584b2
[ "MIT" ]
61
2017-01-09T07:48:08.000Z
2021-12-15T15:13:49.000Z
code/sin_detect.py
mahehu/SGN-41007
c8ed169a0a5f70fb87b99448e39a573c0df584b2
[ "MIT" ]
null
null
null
code/sin_detect.py
mahehu/SGN-41007
c8ed169a0a5f70fb87b99448e39a573c0df584b2
[ "MIT" ]
46
2017-01-10T19:32:04.000Z
2020-11-20T08:29:20.000Z
# -*- coding: utf-8 -*- """ Created on Tue Jan 16 16:38:19 2018 @author: hehu """ import numpy as np def detect(x, frequency, Fs, L = 128): n = np.arange(L) h = np.exp(-2 * np.pi * 1j * frequency * n / Fs) y = np.abs(np.convolve(h, x, 'same')) return y
16.588235
52
0.535461
import numpy as np def detect(x, frequency, Fs, L = 128): n = np.arange(L) h = np.exp(-2 * np.pi * 1j * frequency * n / Fs) y = np.abs(np.convolve(h, x, 'same')) return y
true
true
1c0475c8f0c7caaca7a7022ae163ea20d922ee7c
3,490
py
Python
modelci/app/experimental/endpoints/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
null
null
null
modelci/app/experimental/endpoints/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
null
null
null
modelci/app/experimental/endpoints/model_structure.py
FerdinandZhong/ML-Model-CI
90fa2de056dca05031f0787b96c520dc57dc664d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Li Yuanming Email: yli056@e.ntu.edu.sg Date: 1/31/2021 ML model structure related API """ import torch from fastapi import APIRouter from modelci.hub.manager import get_remote_model_weight from modelci.types.bo import Engine from modelci.persistence.service i...
35.979381
110
0.612607
import torch from fastapi import APIRouter from modelci.hub.manager import get_remote_model_weight from modelci.types.bo import Engine from modelci.persistence.service import ModelService from modelci.experimental.model.model_structure import Structure router = APIRouter() @router.get('/{id}', response_model=Stru...
true
true
1c047608da291ba30cb1969139666e78e1b1df48
14,379
py
Python
orchestrator/tests/settings.py
spacebel/MAJA
3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e
[ "Apache-2.0" ]
57
2020-09-30T08:51:22.000Z
2021-12-19T20:28:30.000Z
orchestrator/tests/settings.py
spacebel/MAJA
3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e
[ "Apache-2.0" ]
34
2020-09-29T21:27:22.000Z
2022-02-03T09:56:45.000Z
orchestrator/tests/settings.py
spacebel/MAJA
3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e
[ "Apache-2.0" ]
14
2020-10-11T13:17:59.000Z
2022-03-09T15:58:19.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES) # # 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 # # ...
49.243151
120
0.68913
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
true
true
1c0476d46e4b20c8529c689cfd5d9ff63a8a3b33
6,475
py
Python
cesiumpy/entities/entity.py
lucas-bremond/cesiumpy
a7dd633194ae798dbc79961e6ff231aa313d8dfc
[ "Apache-2.0" ]
null
null
null
cesiumpy/entities/entity.py
lucas-bremond/cesiumpy
a7dd633194ae798dbc79961e6ff231aa313d8dfc
[ "Apache-2.0" ]
null
null
null
cesiumpy/entities/entity.py
lucas-bremond/cesiumpy
a7dd633194ae798dbc79961e6ff231aa313d8dfc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import collections import traitlets import cesiumpy from cesiumpy.base import _CesiumObject import cesiumpy.entities.cartesian as cartesian import cesiumpy.constants as constants import cesiumpy.time as time import cesiumpy.position as pos...
30.399061
97
0.623938
from __future__ import unicode_literals import collections import traitlets import cesiumpy from cesiumpy.base import _CesiumObject import cesiumpy.entities.cartesian as cartesian import cesiumpy.constants as constants import cesiumpy.time as time import cesiumpy.position as position from cesiumpy.path_graphics impo...
true
true
1c0477dc196096923cd064fb451533b4f39a89ef
1,907
py
Python
t03_pseudorandom/lcg.py
lucasjoao/computer_security
b9ea933e6a486dadc1b332bd6c45cd2d6944b8de
[ "MIT" ]
null
null
null
t03_pseudorandom/lcg.py
lucasjoao/computer_security
b9ea933e6a486dadc1b332bd6c45cd2d6944b8de
[ "MIT" ]
null
null
null
t03_pseudorandom/lcg.py
lucasjoao/computer_security
b9ea933e6a486dadc1b332bd6c45cd2d6944b8de
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Implementacao do 'Linear congruential generator'""" import sys class lcg: """Classe que constroi o gerador de numeros pseudo-aleatorios Atributos: multiplier: numero multiplicador da formula increment: numero que faz a adicao da formula seed: semente do ger...
28.893939
80
0.576298
import sys class lcg: def __init__(self, multiplier, increment, seed, modulus): if modulus > 0 and 0 < multiplier < modulus and \ 0 <= increment < modulus and 0 <= seed < modulus: self.a = multiplier self.c = increment self.r0 = seed self.m = mo...
true
true
1c047838bb56ffc427826ae61554db16de6bb5f0
5,416
py
Python
docs/conf.py
mcauser/Electronutlabs_CircuitPython_ILI9163
36904a945fedb691326a549a5512627840979696
[ "MIT" ]
1
2021-05-08T19:10:52.000Z
2021-05-08T19:10:52.000Z
docs/conf.py
mcauser/Electronutlabs_CircuitPython_ILI9163
36904a945fedb691326a549a5512627840979696
[ "MIT" ]
null
null
null
docs/conf.py
mcauser/Electronutlabs_CircuitPython_ILI9163
36904a945fedb691326a549a5512627840979696
[ "MIT" ]
2
2020-12-07T13:34:35.000Z
2021-07-05T17:24:29.000Z
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extens...
33.639752
236
0.690547
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx.ext.todo', ] autodoc_mock_imports = ["digitalio", "busio", "displayio"] intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None...
true
true
1c047871f2be3e26413bf9d1607954e747891a23
5,767
py
Python
Recursive/test.py
simon2112/OCR
506ec018dc67832b41979784bfc847e1c7d73480
[ "MIT" ]
5
2020-02-29T09:09:01.000Z
2021-03-16T07:02:52.000Z
Recursive/test.py
simon2112/OCR
506ec018dc67832b41979784bfc847e1c7d73480
[ "MIT" ]
null
null
null
Recursive/test.py
simon2112/OCR
506ec018dc67832b41979784bfc847e1c7d73480
[ "MIT" ]
1
2021-03-16T07:02:53.000Z
2021-03-16T07:02:53.000Z
from parse_args import parse_args import editdistance import numpy as np import tensorflow as tf from cnn import build_cnn from network import build_network from tools import load_img import tools flags = parse_args() class Dataset: def __init__(self,x): self._index_in_epoch = 0 self._epochs_compl...
31.686813
130
0.530258
from parse_args import parse_args import editdistance import numpy as np import tensorflow as tf from cnn import build_cnn from network import build_network from tools import load_img import tools flags = parse_args() class Dataset: def __init__(self,x): self._index_in_epoch = 0 self._epochs_compl...
true
true
1c0478a1c5ec272b9e10611b7064bb6b74b57d0e
6,785
py
Python
pele_platform/Utilities/Helpers/system_prep.py
cescgina/pele_platform
9db1f69c35bb2b188047ddcdb4b3280964f86b77
[ "Apache-2.0" ]
null
null
null
pele_platform/Utilities/Helpers/system_prep.py
cescgina/pele_platform
9db1f69c35bb2b188047ddcdb4b3280964f86b77
[ "Apache-2.0" ]
null
null
null
pele_platform/Utilities/Helpers/system_prep.py
cescgina/pele_platform
9db1f69c35bb2b188047ddcdb4b3280964f86b77
[ "Apache-2.0" ]
null
null
null
import os import sys import subprocess import argparse sys.path.append( os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ) ) import pele_platform.constants.constants as cs class SystemBuilder(object): def __init__(self, receptor, ligand, residue, pele_...
34.441624
99
0.571113
import os import sys import subprocess import argparse sys.path.append( os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ) ) import pele_platform.constants.constants as cs class SystemBuilder(object): def __init__(self, receptor, ligand, residue, pele_...
true
true
1c0479e0fd2035d54efdfe3f63935319ae240d32
395
py
Python
exercicios2/ex048.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
exercicios2/ex048.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
exercicios2/ex048.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
# faça um programa que calcule a soma entre todos os numeros impares que são multiplos de 3 e se encontrem # no intervalo de 1 ate 500. soma = 0 cont = 0 f = 0 for c in range(1, 501, 2): if c % 3 == 0: cont = cont + 1 soma = soma + c print(f'a soma de todos os numeros dará {soma} com {cont} valores ...
26.333333
106
0.622785
soma = 0 cont = 0 f = 0 for c in range(1, 501, 2): if c % 3 == 0: cont = cont + 1 soma = soma + c print(f'a soma de todos os numeros dará {soma} com {cont} valores ') for b in range(3, 501, 6): f += b print(f)
true
true
1c047af9c7dc611753d00af4b01add00c98b44ac
5,343
py
Python
kubernetes_asyncio/client/models/v1beta1_certificate_signing_request_status.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_certificate_signing_request_status.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_certificate_signing_request_status.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.15.9 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
34.694805
188
0.627176
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1beta1CertificateSigningRequestStatus(object): openapi_types = { 'certificate': 'str', 'conditions': 'list[V1beta1CertificateSigningRequestCondition]' } attribute_map = { ...
true
true
1c047b0d5030c0dac89ead66b02f5ce28f39fbac
2,798
py
Python
src/fig_package/format/ynf/cYnf.py
yo16/fig_viewer_202107
aa97d2bead56ea991b4dda27327cae9a83ff21f7
[ "MIT" ]
null
null
null
src/fig_package/format/ynf/cYnf.py
yo16/fig_viewer_202107
aa97d2bead56ea991b4dda27327cae9a83ff21f7
[ "MIT" ]
null
null
null
src/fig_package/format/ynf/cYnf.py
yo16/fig_viewer_202107
aa97d2bead56ea991b4dda27327cae9a83ff21f7
[ "MIT" ]
null
null
null
# YNF(Yo Neutral Format) class import datetime import pickle from typing import Dict from ...common.funcs import get_default_logger from .element import cYnfElement class cYnf(): def __init__(self, canvas_info:Dict, logger=None): self.logger = logger or get_default_logger() # Ynf要素リスト sel...
26.903846
102
0.531451
import datetime import pickle from typing import Dict from ...common.funcs import get_default_logger from .element import cYnfElement class cYnf(): def __init__(self, canvas_info:Dict, logger=None): self.logger = logger or get_default_logger() self.elements = [] self.canv...
true
true
1c047b3def6148d99d0febe91266d7513f271cda
160
py
Python
utils/status.py
nigelbowden/wlanpi-chat-bot
cedab0e83d6e33d47f66c1a3be202564f95ac408
[ "MIT" ]
null
null
null
utils/status.py
nigelbowden/wlanpi-chat-bot
cedab0e83d6e33d47f66c1a3be202564f95ac408
[ "MIT" ]
null
null
null
utils/status.py
nigelbowden/wlanpi-chat-bot
cedab0e83d6e33d47f66c1a3be202564f95ac408
[ "MIT" ]
null
null
null
import os def get_status(): stream = os.popen('/opt/wlanpi-chat-bot/scripts/probe_status_msg.sh') startup_msg = stream.read() return startup_msg
17.777778
73
0.70625
import os def get_status(): stream = os.popen('/opt/wlanpi-chat-bot/scripts/probe_status_msg.sh') startup_msg = stream.read() return startup_msg
true
true
1c047ba988d7434febb3dacbd723c1cd3f843fa6
9,507
py
Python
heat/engine/resources/openstack/manila/share_network.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/manila/share_network.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/manila/share_network.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
39.448133
78
0.60324
from heat.common import exception from heat.common.i18n import _ from heat.engine import attributes from heat.engine import constraints from heat.engine import properties from heat.engine import resource from heat.engine import support from heat.engine import translation class ManilaShareNetwork(resource.Resource): ...
true
true
1c047bbd84c656d7ec0133cde9dbed12af05d77e
177,772
py
Python
src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
3
2019-01-11T06:16:40.000Z
2021-02-24T23:48:21.000Z
src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
null
null
null
src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
2
2019-02-06T12:52:00.000Z
2019-04-11T23:19:28.000Z
# Copyright 2012, Contrail Systems, Inc. # """ .. attention:: Fix the license string """ import copy import requests import re import uuid from cfgm_common import jsonutils as json import time import socket import netaddr from netaddr import IPNetwork, IPSet, IPAddress import gevent import bottle from neutron.common ...
42.036415
147
0.573341
""" .. attention:: Fix the license string """ import copy import requests import re import uuid from cfgm_common import jsonutils as json import time import socket import netaddr from netaddr import IPNetwork, IPSet, IPAddress import gevent import bottle from neutron.common import constants from cfgm_common import e...
false
true
1c047c2c7c59e0d6136b41a1a846a31c7e02aaa1
15,673
py
Python
astropy/units/quantity_helper/helpers.py
zabop/astropy
11b3214f18b74aea5e3f8349e50ae1b09c39d30e
[ "BSD-3-Clause" ]
1
2019-03-11T12:26:49.000Z
2019-03-11T12:26:49.000Z
astropy/units/quantity_helper/helpers.py
nabobalis/astropy
9f77b9a0ffe18e4c767e36f00e2e8728135c0e11
[ "BSD-3-Clause" ]
1
2019-10-09T18:54:27.000Z
2019-10-09T18:54:27.000Z
astropy/units/quantity_helper/helpers.py
nabobalis/astropy
9f77b9a0ffe18e4c767e36f00e2e8728135c0e11
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # The idea for this module (but no code) was borrowed from the # quantities (http://pythonhosted.org/quantities/) package. """Helper functions for Quantity. In particular, this implements the logic that determines scaling and resul...
35.864989
79
0.67326
from fractions import Fraction import numpy as np from astropy.units.core import ( UnitConversionError, UnitsError, UnitTypeError, dimensionless_unscaled, get_current_unit_registry, unit_scale_converter) from . import UFUNC_HELPERS, UNSUPPORTED_UFUNCS def _d(unit): if unit is None: return dime...
true
true
1c047c4764bc2d0a04f716ab0179809dbce6b19d
9,680
py
Python
scripts/rlg_train.py
krishpop/leibnizgym
21deb066af612b764c25a28d37bfa8f9cf6c124d
[ "BSD-3-Clause" ]
null
null
null
scripts/rlg_train.py
krishpop/leibnizgym
21deb066af612b764c25a28d37bfa8f9cf6c124d
[ "BSD-3-Clause" ]
null
null
null
scripts/rlg_train.py
krishpop/leibnizgym
21deb066af612b764c25a28d37bfa8f9cf6c124d
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and relat...
36.806084
123
0.659091
from isaacgym import rlgpu from rlgpu.utils.config import set_np_formatting, set_seed from leibnizgym.envs.trifinger import TrifingerEnv as Trifinger from leibnizgym.wrappers.vec_task import VecTaskPython from leibnizgym.utils.config_utils import load_cfg, get_args from leibnizgym.utils.errors import InvalidTaskNameEr...
true
true
1c047e08582d962ce22ab2e61ed4f7a09efd30a8
1,021
py
Python
jupyter_singleton/displaydatahook.py
EricMende/jupyter_singleton
7edf380a216b4e52a98f9ec5b8fdb1c4b453aadc
[ "MIT" ]
2
2019-10-06T07:02:52.000Z
2019-10-26T09:38:36.000Z
jupyter_singleton/displaydatahook.py
EricMende/jupyter_singleton
7edf380a216b4e52a98f9ec5b8fdb1c4b453aadc
[ "MIT" ]
null
null
null
jupyter_singleton/displaydatahook.py
EricMende/jupyter_singleton
7edf380a216b4e52a98f9ec5b8fdb1c4b453aadc
[ "MIT" ]
1
2019-10-26T09:39:02.000Z
2019-10-26T09:39:02.000Z
class DisplayDataHook: """ NOTE: this is a quick'n'dirty solution to be able to send the correct parent_header to the browser in the few circumstances I use. It is not tested for multi-threads and the use of 'update_display_data' This is related to the github-issue #113 of the ipykernel project. However...
31.90625
113
0.645446
class DisplayDataHook: parent_header = None def set_parent(self, parent): if parent is None or 'header' not in parent: self.parent_header = None else: self.parent_header = parent['header'] def reset_parent(self): self.parent_header = None def __call__(...
true
true
1c047e5a694b275ca840104f3bc7048eafdb88a8
1,585
py
Python
Data_Analysis/pilot1/processing/data_processing.py
TheGoldLab/Audio_2AFC_Analysis
9bfcb7e869ca70e9d19af402c96b9ce16be02167
[ "Apache-2.0" ]
1
2019-04-04T14:21:08.000Z
2019-04-04T14:21:08.000Z
Data_Analysis/pilot1/processing/data_processing.py
TheGoldLab/Audio_2AFC_Analysis
9bfcb7e869ca70e9d19af402c96b9ce16be02167
[ "Apache-2.0" ]
2
2019-04-19T14:10:58.000Z
2019-04-23T18:07:31.000Z
Data_Analysis/pilot1/processing/data_processing.py
TheGoldLab/Audio_2AFC_Analysis
9bfcb7e869ca70e9d19af402c96b9ce16be02167
[ "Apache-2.0" ]
null
null
null
""" module containing functions for managing data files from experiment """ import pandas as pd import os data_mapping = pd.read_csv('../../data_mapping.csv') blocks = {0: 'pred', 1: 'rep'} num_blocks = len(blocks) num_subjects = data_mapping['subject'].unique().shape[0] base_data_folder = os.path.expanduser('~/Audio...
33.723404
116
0.702208
import pandas as pd import os data_mapping = pd.read_csv('../../data_mapping.csv') blocks = {0: 'pred', 1: 'rep'} num_blocks = len(blocks) num_subjects = data_mapping['subject'].unique().shape[0] base_data_folder = os.path.expanduser('~/Audio2AFC_CP/processed/') plot_data_folder = base_data_folder + 'plots/' def ma...
true
true
1c047e911253e2778b1dc7887586867632b9001c
1,657
py
Python
main.py
ashtneoi/tiny-notes
66532bd99d3065515fbb62d2aeeb23edc3950387
[ "MIT" ]
null
null
null
main.py
ashtneoi/tiny-notes
66532bd99d3065515fbb62d2aeeb23edc3950387
[ "MIT" ]
null
null
null
main.py
ashtneoi/tiny-notes
66532bd99d3065515fbb62d2aeeb23edc3950387
[ "MIT" ]
null
null
null
import datetime import html import re import toml from werkzeug.utils import redirect from bakery import render_path from tiny_tantilla import \ create_single_page_app, HTMLResponse, static_redirect, status def note(req): today_str = datetime.datetime.now( datetime.timezone(datetime.timedelta(hours=...
27.163934
71
0.579964
import datetime import html import re import toml from werkzeug.utils import redirect from bakery import render_path from tiny_tantilla import \ create_single_page_app, HTMLResponse, static_redirect, status def note(req): today_str = datetime.datetime.now( datetime.timezone(datetime.timedelta(hours=...
true
true
1c047edce0945f1d3a696ff9750d05c89014476e
22,599
py
Python
spinup/algos/maxsqn/maxsqn_football.py
kaixindelele/DRL
74bb73caafd30547be0de7cdf0f6b945e51ecf6f
[ "MIT" ]
93
2019-01-03T09:49:37.000Z
2022-03-25T08:51:50.000Z
spinup/algos/maxsqn/maxsqn_football.py
kaixindelele/DRL
74bb73caafd30547be0de7cdf0f6b945e51ecf6f
[ "MIT" ]
7
2019-07-01T01:42:26.000Z
2020-07-17T18:21:10.000Z
spinup/algos/maxsqn/maxsqn_football.py
kaixindelele/DRL
74bb73caafd30547be0de7cdf0f6b945e51ecf6f
[ "MIT" ]
32
2019-01-18T01:34:36.000Z
2021-11-24T06:39:53.000Z
import numpy as np import tensorflow as tf from numbers import Number import gym import time, os from spinup.algos.maxsqn import core from spinup.algos.maxsqn.core import get_vars from spinup.utils.logx import EpochLogger from gym.spaces import Box, Discrete class ReplayBuffer: """ A simple FIFO experience rep...
41.542279
254
0.568122
import numpy as np import tensorflow as tf from numbers import Number import gym import time, os from spinup.algos.maxsqn import core from spinup.algos.maxsqn.core import get_vars from spinup.utils.logx import EpochLogger from gym.spaces import Box, Discrete class ReplayBuffer: def __init__(self, obs_dim, act_dim...
true
true
1c047f9b10d1cd3f722811f9e01c5c15bd46d036
486
py
Python
venv/Scripts/easy_install-3.6-script.py
t-amell/circle-game
6b54f1b21464c0c3ce1c0284416f98f68c6bc40c
[ "MIT" ]
null
null
null
venv/Scripts/easy_install-3.6-script.py
t-amell/circle-game
6b54f1b21464c0c3ce1c0284416f98f68c6bc40c
[ "MIT" ]
null
null
null
venv/Scripts/easy_install-3.6-script.py
t-amell/circle-game
6b54f1b21464c0c3ce1c0284416f98f68c6bc40c
[ "MIT" ]
null
null
null
#!"C:\Users\Trevo\Desktop\WorkTime\Project Files\Python\circle-game\venv\Scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.6' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv...
37.384615
92
0.697531
__requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install-3.6')() )
true
true
1c047feb849543a7be26fb0120ea73f507707b19
2,394
py
Python
test/logic/test_mapper.py
DLR-RM/rafcon-task-planner-plugin
9d004c76aa6f54c992a2f3f00b9dd98f9fb4e498
[ "BSD-3-Clause" ]
1
2020-05-21T17:08:02.000Z
2020-05-21T17:08:02.000Z
test/logic/test_mapper.py
DLR-RM/rafcon-task-planner-plugin
9d004c76aa6f54c992a2f3f00b9dd98f9fb4e498
[ "BSD-3-Clause" ]
null
null
null
test/logic/test_mapper.py
DLR-RM/rafcon-task-planner-plugin
9d004c76aa6f54c992a2f3f00b9dd98f9fb4e498
[ "BSD-3-Clause" ]
null
null
null
import os import pytest import utils from utils import call_gui_callback from rafcontpp.logic.mapper import Mapper from rafcontpp.model.datastore import datastore_from_file @pytest.fixture def datastore(): base_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_data') facts_path = os.pa...
30.692308
95
0.681287
import os import pytest import utils from utils import call_gui_callback from rafcontpp.logic.mapper import Mapper from rafcontpp.model.datastore import datastore_from_file @pytest.fixture def datastore(): base_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_data') facts_path = os.pa...
true
true
1c04800c267eb8119d47f288782c2312dbe2ff2a
1,095
py
Python
raybot/__main__.py
Zverik/bot_na_rayone
b1586ed2c73b28fab5bb75d70c747a61f573d80d
[ "0BSD" ]
32
2021-01-23T17:26:18.000Z
2022-01-19T14:23:57.000Z
raybot/__main__.py
Zverik/bot_na_rayone
b1586ed2c73b28fab5bb75d70c747a61f573d80d
[ "0BSD" ]
null
null
null
raybot/__main__.py
Zverik/bot_na_rayone
b1586ed2c73b28fab5bb75d70c747a61f573d80d
[ "0BSD" ]
5
2021-02-01T13:51:46.000Z
2021-02-16T21:17:20.000Z
from raybot.model import db from raybot.bot import dp from raybot.cli import buildings, photos, test_map, missing import raybot.handlers # noqa import logging import sys import os from aiogram import executor async def shutdown(dp): await db.close() def main(): if len(sys.argv) < 2 or os.path.isdir(sys.arg...
27.375
80
0.605479
from raybot.model import db from raybot.bot import dp from raybot.cli import buildings, photos, test_map, missing import raybot.handlers import logging import sys import os from aiogram import executor async def shutdown(dp): await db.close() def main(): if len(sys.argv) < 2 or os.path.isdir(sys.argv[1]): ...
true
true
1c048094a9387feda48566c831958cf834185885
8,075
py
Python
keras/util/augment.py
rjuppa/vmmr
a968b869e00fe46ef862fe794b063318a66c894f
[ "MIT" ]
null
null
null
keras/util/augment.py
rjuppa/vmmr
a968b869e00fe46ef862fe794b063318a66c894f
[ "MIT" ]
null
null
null
keras/util/augment.py
rjuppa/vmmr
a968b869e00fe46ef862fe794b063318a66c894f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # create a dataset with same size of classes # use augmentation if necessary import os, math from os.path import join import cv2 import numpy as np import random import shutil TOTAL = 5000 MIN_LIMIT = 50 parent_path = os.path.abspath('.') # root = "/Users/radekj/devroot/vmmr/datasets/" root ...
31.666667
84
0.551579
import os, math from os.path import join import cv2 import numpy as np import random import shutil TOTAL = 5000 MIN_LIMIT = 50 parent_path = os.path.abspath('.') root = "/storage/plzen1/home/radekj/vmmr/datasets" class ImageProcessor: image = None original = None width = 320 height = 240 mark...
true
true
1c048182a927de5a6aad47b990d3a6541653aaa3
147
py
Python
examples/print_as_table.py
Narasimha1997/py_cpu
8bea803a8a5c711ecbfb36e30907d4affee7d62d
[ "Apache-2.0" ]
16
2020-11-28T08:16:14.000Z
2022-01-14T19:20:47.000Z
examples/print_as_table.py
pranavms13/py_cpu
f075719fd8ecda2d645860899be68c1f60ce44f9
[ "Apache-2.0" ]
3
2020-11-28T12:06:37.000Z
2022-01-26T03:24:27.000Z
examples/print_as_table.py
pranavms13/py_cpu
f075719fd8ecda2d645860899be68c1f60ce44f9
[ "Apache-2.0" ]
1
2020-11-28T11:49:56.000Z
2020-11-28T11:49:56.000Z
import py_cpu #obtain CPU info cpu_info = py_cpu.CPUInfo() #call pprint method cpu_info.print_as_table() #subscriptable: print(cpu_info['arch'])
14.7
27
0.77551
import py_cpu cpu_info = py_cpu.CPUInfo() cpu_info.print_as_table() print(cpu_info['arch'])
true
true
1c0482e120a8d36a5a0df284f08d94521ea1f2c2
2,708
py
Python
PyimageTutorial/Module 4 Image Classification and Machine Learning/Module_4_7_Advanced_Image_Pyramid/pyimagesearch/indexer/baseindexer.py
wcsodw1/Computer-Vision-with-Artificial-intelligence
1fc58466bf82c33939fae911140737a8d9681ebd
[ "MIT" ]
2
2020-02-12T12:17:01.000Z
2021-01-07T02:31:18.000Z
PyimageTutorial/Module 4 Image Classification and Machine Learning/Module_4_7_Advanced_Image_Pyramid/pyimagesearch/indexer/baseindexer.py
wcsodw1/Computer-Vision-with-Artificial-intelligence
1fc58466bf82c33939fae911140737a8d9681ebd
[ "MIT" ]
1
2020-03-22T06:33:10.000Z
2020-03-22T06:33:10.000Z
PyimageTutorial/Module 4 Image Classification and Machine Learning/Module_4_7_Advanced_Image_Pyramid/pyimagesearch/indexer/baseindexer.py
wcsodw1/Computer-Vision-with-Artificial-intelligence
1fc58466bf82c33939fae911140737a8d9681ebd
[ "MIT" ]
3
2020-02-18T05:24:13.000Z
2020-09-21T06:58:58.000Z
# import the necessary packages from __future__ import print_function import numpy as np import datetime class BaseIndexer(object): def __init__(self, dbPath, estNumImages=500, maxBufferSize=50000, dbResizeFactor=2, verbose=True): # store the database path, estimated number of images in the dataset, max # buffe...
31.126437
84
0.716396
from __future__ import print_function import numpy as np import datetime class BaseIndexer(object): def __init__(self, dbPath, estNumImages=500, maxBufferSize=50000, dbResizeFactor=2, verbose=True): self.dbPath = dbPath self.estNumImages = estNumImages self.maxBufferSize = maxBufferSize self.dbResizeFac...
true
true
1c0482e9185dd4f993e7c2edd4d6eedf1b94ef85
325
py
Python
entity/cards/LETL_011H/LETL_333.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
102
2021-10-20T09:06:39.000Z
2022-03-28T13:35:11.000Z
entity/cards/LETL_011H/LETL_333.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
98
2021-10-19T16:13:27.000Z
2022-03-27T13:27:49.000Z
entity/cards/LETL_011H/LETL_333.py
x014/lushi_script
edab2b88e3f0de8139de2541ab2daa331f777c0e
[ "MIT" ]
55
2021-10-19T03:56:50.000Z
2022-03-25T08:25:26.000Z
# -*- coding: utf-8 -*- from hearthstone.entities import Entity from entity.spell_entity import SpellEntity class LETL_333(SpellEntity): """ 神圣之眼4 祈福和集束之光恢复的生命值增加8点。 """ def __init__(self, entity: Entity): super().__init__(entity) def equip(self, hero): pass ...
17.105263
43
0.603077
from hearthstone.entities import Entity from entity.spell_entity import SpellEntity class LETL_333(SpellEntity): def __init__(self, entity: Entity): super().__init__(entity) def equip(self, hero): pass
true
true
1c0484adf3b16c2cfd60338e0ec52d3b4d41f4b5
37,436
py
Python
gammapy/modeling/models/spatial.py
aaguasca/gammapy
b1a4e9dbaeec23b3eaca1c874752e92432920a42
[ "BSD-3-Clause" ]
null
null
null
gammapy/modeling/models/spatial.py
aaguasca/gammapy
b1a4e9dbaeec23b3eaca1c874752e92432920a42
[ "BSD-3-Clause" ]
null
null
null
gammapy/modeling/models/spatial.py
aaguasca/gammapy
b1a4e9dbaeec23b3eaca1c874752e92432920a42
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Spatial models.""" import logging import os import numpy as np import scipy.integrate import scipy.special import astropy.units as u from astropy.coordinates import Angle, SkyCoord from astropy.coordinates.angle_utilities import angular_separation, posi...
31.538332
99
0.584464
import logging import os import numpy as np import scipy.integrate import scipy.special import astropy.units as u from astropy.coordinates import Angle, SkyCoord from astropy.coordinates.angle_utilities import angular_separation, position_angle from astropy.utils import lazyproperty from regions import ( CircleAnnu...
true
true
1c04850e923ca5784e04d55251425f9609b80a84
209
py
Python
hccoverage/urls.py
iafisher/am-i-covered
1b6b9f1ddf54ca01e059e6a9624b8e9e047cc5d0
[ "MIT" ]
null
null
null
hccoverage/urls.py
iafisher/am-i-covered
1b6b9f1ddf54ca01e059e6a9624b8e9e047cc5d0
[ "MIT" ]
null
null
null
hccoverage/urls.py
iafisher/am-i-covered
1b6b9f1ddf54ca01e059e6a9624b8e9e047cc5d0
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("demos/am-i-covered/admin/", admin.site.urls), path("demos/am-i-covered/", include("coverage_app.urls")), ]
26.125
62
0.712919
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("demos/am-i-covered/admin/", admin.site.urls), path("demos/am-i-covered/", include("coverage_app.urls")), ]
true
true
1c0485af5ab8eab44604acb0c7f0b600c6225fc6
205
py
Python
Accuracy.py
TypicalDefender/Handwrittern_digit_recongnition
66b88c5d28b383a0cbbb17cf37a2d215b20e8d3b
[ "Unlicense" ]
null
null
null
Accuracy.py
TypicalDefender/Handwrittern_digit_recongnition
66b88c5d28b383a0cbbb17cf37a2d215b20e8d3b
[ "Unlicense" ]
null
null
null
Accuracy.py
TypicalDefender/Handwrittern_digit_recongnition
66b88c5d28b383a0cbbb17cf37a2d215b20e8d3b
[ "Unlicense" ]
null
null
null
#accuracy p = clf.predict([xtest]) count = 0 for i in range(0,21000): count += 1 if p[i]: print(actual_label[i]) else: print("0") print("ACCURACY", (count/21000)*100)
18.636364
39
0.541463
p = clf.predict([xtest]) count = 0 for i in range(0,21000): count += 1 if p[i]: print(actual_label[i]) else: print("0") print("ACCURACY", (count/21000)*100)
true
true
1c048614915959cb6657c192cb9d878f225977f3
10,392
py
Python
compss/programming_model/bindings/python/src/pycompss/worker/piper/piper_worker.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
compss/programming_model/bindings/python/src/pycompss/worker/piper/piper_worker.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
compss/programming_model/bindings/python/src/pycompss/worker/piper/piper_worker.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
33.960784
88
0.658968
import os import sys import signal from pycompss.util.typing_helper import typing from pycompss.util.process.manager import initialize_multiprocessing from pycompss.util.process.manager import Queue from pycompss.util.process.manager import new_queue from pycompss.util.process.manager import create_process from pyc...
true
true
1c0486973742e6656ae62866d14cf7b11c33d128
584
py
Python
Question Set 1 - (Selection Statement)/Version 3/Version 3 - Randula/main.py
Randula98/Python-For-Beginners
e41a6014be882f01c6ccdcbe2167e2b581646eee
[ "MIT" ]
6
2021-12-14T17:52:11.000Z
2021-12-19T20:22:44.000Z
Question Set 1 - (Selection Statement)/Version 3/Version 3 - Randula/main.py
GIHAA/Python-For-Beginners
e41a6014be882f01c6ccdcbe2167e2b581646eee
[ "MIT" ]
null
null
null
Question Set 1 - (Selection Statement)/Version 3/Version 3 - Randula/main.py
GIHAA/Python-For-Beginners
e41a6014be882f01c6ccdcbe2167e2b581646eee
[ "MIT" ]
2
2021-12-19T18:50:30.000Z
2022-01-01T23:05:18.000Z
#get user input for age age = input("Age : ") age = int(age) #get user input for bank balance bankBalance = input("Bank Balance : ") bankBalance = float(bankBalance) while bankBalance < 0: print("Invalid Input!! Try again") bankBalance = input("Bank Balance : ") #find the gift according to the age and the ba...
22.461538
56
0.633562
age = input("Age : ") age = int(age) bankBalance = input("Bank Balance : ") bankBalance = float(bankBalance) while bankBalance < 0: print("Invalid Input!! Try again") bankBalance = input("Bank Balance : ") if age <= 18: if bankBalance > 100000: gift = "Tablet" else: gift = "School bag...
true
true
1c04869ee3601a3a378e7d6942eebb6d50e33532
491
py
Python
Lib/site-packages/plotly/validators/layout/yaxis/title/font/_color.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/layout/yaxis/title/font/_color.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/layout/yaxis/title/font/_color.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='color', parent_name='layout.yaxis.title.font', **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name,...
25.842105
66
0.602851
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='color', parent_name='layout.yaxis.title.font', **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name,...
true
true
1c0487d5c9892c0e84a04485a42430103193baa2
498
py
Python
tests/asyncio.py
programmingLego/pybricks-FindingDirections
c0eb5c67893110e34dd2f4fe981a37b44b64a1c7
[ "MIT" ]
null
null
null
tests/asyncio.py
programmingLego/pybricks-FindingDirections
c0eb5c67893110e34dd2f4fe981a37b44b64a1c7
[ "MIT" ]
1
2021-11-28T23:26:19.000Z
2021-11-28T23:31:21.000Z
tests/asyncio.py
programmingLego/pybricks-FindingDirections
c0eb5c67893110e34dd2f4fe981a37b44b64a1c7
[ "MIT" ]
null
null
null
import uasyncio async def blink(led, period_ms): while True: led.on() await uasyncio.sleep_ms(5) led.off() await uasyncio.sleep_ms(period_ms) async def main(led1, led2): uasyncio.create_task(blink(led1, 700)) uasyncio.create_task(blink(led2, 400)) await uasyncio.sleep_m...
22.636364
42
0.684739
import uasyncio async def blink(led, period_ms): while True: led.on() await uasyncio.sleep_ms(5) led.off() await uasyncio.sleep_ms(period_ms) async def main(led1, led2): uasyncio.create_task(blink(led1, 700)) uasyncio.create_task(blink(led2, 400)) await uasyncio.sleep_m...
true
true
1c0487e687b21da7a4022ce0e8af711fb8c96929
7,429
py
Python
VSR/Backend/Torch/Models/Drn.py
Kadantte/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
1,447
2018-06-04T08:44:07.000Z
2022-03-29T06:19:10.000Z
VSR/Backend/Torch/Models/Drn.py
pipixiapipi/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
96
2018-08-29T01:02:45.000Z
2022-01-12T06:00:01.000Z
VSR/Backend/Torch/Models/Drn.py
pipixiapipi/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
307
2018-06-26T13:35:54.000Z
2022-01-21T09:01:54.000Z
# Copyright (c): Wenyi Tang 2017-2019. # Author: Wenyi Tang # Email: wenyi.tang@intel.com # Update Date: 2019/5/21 下午4:56 import torch import torch.nn as nn import torch.nn.functional as F from VSR.Backend.Torch.Models.Ops.Loss import total_variance from .Model import SuperResolution from .Ops.Blocks import EasyC...
31.88412
75
0.611657
import torch import torch.nn as nn import torch.nn.functional as F from VSR.Backend.Torch.Models.Ops.Loss import total_variance from .Model import SuperResolution from .Ops.Blocks import EasyConv2d from .Ops.Scale import Upsample from ..Framework.Summary import get_writer from ..Util import Metrics class NoiseExtra...
true
true
1c0488471ad82890d4cdb94eec8808bb4437d83f
4,854
py
Python
hypercorn/asyncio/h11.py
ampstat/hypercorn
6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd
[ "MIT" ]
null
null
null
hypercorn/asyncio/h11.py
ampstat/hypercorn
6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd
[ "MIT" ]
null
null
null
hypercorn/asyncio/h11.py
ampstat/hypercorn
6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd
[ "MIT" ]
null
null
null
import asyncio from typing import Optional import h11 from .base import HTTPServer from ..asgi.h11 import H11Mixin from ..asgi.run import H2CProtocolRequired from ..asgi.utils import ASGIHTTPState from ..config import Config from ..typing import ASGIFramework, H11SendableEvent class H11Server(HTTPServer, H11Mixin):...
37.921875
95
0.565101
import asyncio from typing import Optional import h11 from .base import HTTPServer from ..asgi.h11 import H11Mixin from ..asgi.run import H2CProtocolRequired from ..asgi.utils import ASGIHTTPState from ..config import Config from ..typing import ASGIFramework, H11SendableEvent class H11Server(HTTPServer, H11Mixin):...
true
true
1c04898c7389d2c681af2ea1fda5f569c6bbc39c
2,072
py
Python
ex6/emailFeatures.py
SkyAndCloud/Coursera-AndrewNG-ML-Python
586edffdcc3e0811ac186a00b78897b0a75a07d0
[ "MIT" ]
3
2017-10-22T13:18:03.000Z
2017-10-26T11:46:20.000Z
ex6/emailFeatures.py
SkyAndCloud/Coursera-AndrewNG-ML-Python
586edffdcc3e0811ac186a00b78897b0a75a07d0
[ "MIT" ]
null
null
null
ex6/emailFeatures.py
SkyAndCloud/Coursera-AndrewNG-ML-Python
586edffdcc3e0811ac186a00b78897b0a75a07d0
[ "MIT" ]
1
2018-10-16T01:50:45.000Z
2018-10-16T01:50:45.000Z
import numpy as np def emailFeatures(word_indices): """takes in a word_indices vector and produces a feature vector from the word indices. """ # Total number of words in the dictionary n = 1899 # You need to return the following variables correctly. x = np.zeros(n) # ====================== YOUR ...
35.724138
75
0.525579
import numpy as np def emailFeatures(word_indices): n = 1899 x = np.zeros(n) for idx in word_indices: x[int(idx)] = 1 return x
true
true