hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
72d3b2344864c102c1f3172f717ed4ec52b97b5c
2,050
py
Python
tools/dataset_building/limit_density.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
tools/dataset_building/limit_density.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
tools/dataset_building/limit_density.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import argparse import numpy as np # Modified from: CosmiQ Solaris # https://github.com/CosmiQ/solaris/blob/master/solaris/preproc/sar.py def haversine(lat1, lon1, lat2, lon2, rad=False, radius=6.371E6): """ Haversine formula for distance between two points given their latitude and lo...
32.03125
75
0.609756
#!/usr/bin/env python import csv import argparse import numpy as np import pandas as pd import tqdm # Modified from: CosmiQ Solaris # https://github.com/CosmiQ/solaris/blob/master/solaris/preproc/sar.py def haversine(lat1, lon1, lat2, lon2, rad=False, radius=6.371E6): """ Haversine formula for distance betwee...
0
0
0
0
0
996
0
-23
90
a926adeeae5e6a18471aa287cd2d0a24f03b3693
1,595
py
Python
__init__.py
HappyRay/anki-addon-test
f947070fa7eb47f95d84a9f6b5707a822ea75161
[ "Apache-2.0" ]
null
null
null
__init__.py
HappyRay/anki-addon-test
f947070fa7eb47f95d84a9f6b5707a822ea75161
[ "Apache-2.0" ]
null
null
null
__init__.py
HappyRay/anki-addon-test
f947070fa7eb47f95d84a9f6b5707a822ea75161
[ "Apache-2.0" ]
null
null
null
# import the main window object (mw) from aqt from aqt import mw # import the "show info" tool from utils.py # import all of the Qt GUI library # We're going to add a menu item below. First we want to create a function to # be called when the menu item is activated. # create a new menu item, "test" action = QActi...
31.27451
93
0.684013
# import the main window object (mw) from aqt from aqt import mw # import the "show info" tool from utils.py from aqt.utils import showInfo # import all of the Qt GUI library from aqt.qt import * # We're going to add a menu item below. First we want to create a function to # be called when the menu item is activated....
6
0
0
0
0
967
0
8
90
a5b597dda0e02678d4bc53de2fd6dc1b66489dbe
4,210
py
Python
changes/listeners/build_revision.py
bowlofstew/changes
ebd393520e0fdb07c240a8d4e8747281b6186e28
[ "Apache-2.0" ]
null
null
null
changes/listeners/build_revision.py
bowlofstew/changes
ebd393520e0fdb07c240a8d4e8747281b6186e28
[ "Apache-2.0" ]
null
null
null
changes/listeners/build_revision.py
bowlofstew/changes
ebd393520e0fdb07c240a8d4e8747281b6186e28
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import
36.608696
148
0.595724
from __future__ import absolute_import import logging from flask import current_app from changes.api.build_index import BuildIndexAPIView from changes.models import ProjectStatus, Project, ProjectConfigError, ProjectOptionsHelper, Revision from changes.utils.diff_parser import DiffParser from changes.utils.project_tr...
0
0
0
3,468
0
279
0
220
202
39145ba22026f38331d59b821d26f97cac5a0876
2,332
py
Python
TestScripts/TestWebScraping.py
HansFriedrichSchwanecke/EquityRiseAndFallTearSheet
a65ceeb04c4cdacafd8eb3dcc1e52b25654c3e19
[ "MIT" ]
null
null
null
TestScripts/TestWebScraping.py
HansFriedrichSchwanecke/EquityRiseAndFallTearSheet
a65ceeb04c4cdacafd8eb3dcc1e52b25654c3e19
[ "MIT" ]
null
null
null
TestScripts/TestWebScraping.py
HansFriedrichSchwanecke/EquityRiseAndFallTearSheet
a65ceeb04c4cdacafd8eb3dcc1e52b25654c3e19
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC import time driver_path = 'msedgedriver.exe' constituents_url = 'https://www.stoxx.com/index-details?symbol=SXXP' table...
29.518987
120
0.706261
import timeit import selenium.webdriver from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC import time import pandas as pd ...
0
0
0
0
0
0
0
20
90
bd182b2ee422cb743cc750e17448d7ac07f848a6
5,191
py
Python
src/runners/tfa_runner.py
ChenyangTang/bark-ml
1d2ab1957bf49929e27d718dd4bd3912162197b8
[ "MIT" ]
null
null
null
src/runners/tfa_runner.py
ChenyangTang/bark-ml
1d2ab1957bf49929e27d718dd4bd3912162197b8
[ "MIT" ]
null
null
null
src/runners/tfa_runner.py
ChenyangTang/bark-ml
1d2ab1957bf49929e27d718dd4bd3912162197b8
[ "MIT" ]
null
null
null
import logging import tensorflow as tf tf.compat.v1.enable_v2_behavior() logger = logging.getLogger() # NOTE(@hart): this will print all statements # logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
37.890511
108
0.681372
import sys import logging import time import tensorflow as tf tf.compat.v1.enable_v2_behavior() from tf_agents.drivers import dynamic_step_driver from tf_agents.drivers import dynamic_episode_driver from modules.runtime.commons.parameters import ParameterServer from tf_agents.metrics import tf_metrics from tf_agents....
0
0
0
4,552
0
0
0
183
246
a56fdb86ec479a0b307f3343c329ab6ccf839751
760
py
Python
setup.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
4
2020-04-16T22:57:00.000Z
2021-10-05T02:37:58.000Z
setup.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
112
2020-05-21T09:47:14.000Z
2022-03-20T16:00:27.000Z
setup.py
BuildJet/lagtraj
a49bff9c165b225b37e212dec4c1d319452cc3f3
[ "MIT" ]
5
2020-05-14T11:04:07.000Z
2022-03-11T16:38:35.000Z
#!/usr/bin/env python from setuptools import setup, find_packages import versioneer INSTALL_REQUIRES = open("requirements.txt").readlines() setup( name="lagtraj", version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="Python trajectory code for Lagrangian simulations", ...
31.666667
71
0.703947
#!/usr/bin/env python from setuptools import setup, find_packages import versioneer INSTALL_REQUIRES = open("requirements.txt").readlines() setup( name="lagtraj", version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="Python trajectory code for Lagrangian simulations", ...
0
0
0
0
0
0
0
0
0
aee8828cea0fd749235f9d7e36d30e4e14ddf27e
138
py
Python
Pyon exercicios/Exercicios/021.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
Pyon exercicios/Exercicios/021.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
Pyon exercicios/Exercicios/021.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
#executar um audio mp3 import pygame pygame.init() pygame.mixer.music.load('BlackDog.mp3') pygame.mixer.music.play() pygame.event.wait()
17.25
39
0.768116
#executar um audio mp3 import pygame pygame.init() pygame.mixer.music.load('BlackDog.mp3') pygame.mixer.music.play() pygame.event.wait()
0
0
0
0
0
0
0
0
0
6c7b3d8dec1fd101207e35c912d98c7301395c27
273
py
Python
catalog/bindings/gmd/geometric_complex.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/geometric_complex.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/gmd/geometric_complex.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
__NAMESPACE__ = "http://www.opengis.net/gml"
24.818182
68
0.783883
from dataclasses import dataclass from bindings.gmd.geometric_complex_type import GeometricComplexType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class GeometricComplex(GeometricComplexType): class Meta: namespace = "http://www.opengis.net/gml"
0
100
0
0
0
0
0
59
67
0bf3ff960e9ba03544b4330daf97aa30ac87da93
2,041
py
Python
run.py
NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations
fda26f5cfe41f3e64bff4602dc010d6f6be183f8
[ "MIT" ]
3
2020-01-15T03:17:52.000Z
2020-09-30T20:12:53.000Z
run.py
NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations
fda26f5cfe41f3e64bff4602dc010d6f6be183f8
[ "MIT" ]
null
null
null
run.py
NCBI-Codeathons/Identifying-bulk-RNA-seq-derived-biomarkers-of-cancer-risk-within-single-cell-populations
fda26f5cfe41f3e64bff4602dc010d6f6be183f8
[ "MIT" ]
2
2021-05-17T20:59:33.000Z
2021-05-27T07:30:42.000Z
import sys # # Load data # scRNAdata = H5COUNTS('data/GSE103224.h5') # # Preprocess data # scRNAdata.preprocess_data(log_normalize=True, filter_genes=False, n_neighbors=False, umap=False) # # Add clustering results # scRNAdata.add_clustering_results(path='data/interim/', tumor_ids=[1, 2, 3, 4, 5, 6, 7, 8]) # # # Get a...
37.109091
134
0.711906
import sys, getopt, subprocess from src.common.load_h5 import H5COUNTS from src.preprocess.build_h5_GSE103224 import build_h5 import pandas as pd # # Load data # scRNAdata = H5COUNTS('data/GSE103224.h5') # # Preprocess data # scRNAdata.preprocess_data(log_normalize=True, filter_genes=False, n_neighbors=False, umap=Fal...
0
0
0
0
0
511
0
69
89
3677aecafa8af2453264a152c0aa94e0c15da665
186
py
Python
main.py
ZzAZz4/recon_app
00a430e8cf3657b923286fe13d39f0706290608c
[ "MIT" ]
null
null
null
main.py
ZzAZz4/recon_app
00a430e8cf3657b923286fe13d39f0706290608c
[ "MIT" ]
null
null
null
main.py
ZzAZz4/recon_app
00a430e8cf3657b923286fe13d39f0706290608c
[ "MIT" ]
1
2020-12-16T03:55:02.000Z
2020-12-16T03:55:02.000Z
if __name__ == "__main__": MainApp().run()
16.909091
34
0.682796
from kivy.app import App from kivy.uix.button import Button from kivy import utils class MainApp(App): def build(self): pass if __name__ == "__main__": MainApp().run()
0
0
0
32
0
0
0
17
89
b27777f3d4622fee2e631a02cb9de8c559c5e33d
227
py
Python
tuiuiu/contrib/sitemaps/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
3
2019-08-08T09:09:35.000Z
2020-12-15T18:04:17.000Z
tuiuiu/contrib/sitemaps/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
null
null
null
tuiuiu/contrib/sitemaps/apps.py
caputomarcos/tuiuiu.io
d8fb57cf95487e7fe1454b2130ef18acc916da46
[ "BSD-3-Clause" ]
1
2017-09-09T20:10:40.000Z
2017-09-09T20:10:40.000Z
from __future__ import absolute_import, unicode_literals
22.7
56
0.770925
from __future__ import absolute_import, unicode_literals from django.apps import AppConfig class SitemapsAppConfig(AppConfig): name = 'tuiuiu.contrib.sitemaps' label = 'sitemaps' verbose_name = "Tuiuiu sitemaps"
0
0
0
111
0
0
0
12
46
a9c0784c20aa7324f070f9a0f1a0cc3f287c3b63
10,391
py
Python
scripts/Agents.py
Youngl41/A3C
e82a93eca37ded7814be58ee253abd7d08e27355
[ "Apache-2.0" ]
null
null
null
scripts/Agents.py
Youngl41/A3C
e82a93eca37ded7814be58ee253abd7d08e27355
[ "Apache-2.0" ]
null
null
null
scripts/Agents.py
Youngl41/A3C
e82a93eca37ded7814be58ee253abd7d08e27355
[ "Apache-2.0" ]
null
null
null
# env.unwrapped.get_action_meanings() #====================================================== # Agent classes #====================================================== ''' Info: Version: 1.0 Author: Young Lee Created: Friday, 16 August 2019 ''' # Import modules import os import sys try: get_ipython(...
47.884793
295
0.590992
# env.unwrapped.get_action_meanings() #====================================================== # Agent classes #====================================================== ''' Info: Version: 1.0 Author: Young Lee Created: Friday, 16 August 2019 ''' # Import modules import os import re import sys try: ge...
0
0
0
7,160
0
0
0
425
670
319df75b5ec5c80ff285a5dd8607c14cab95ac51
351
py
Python
examples/fastapi_integration/src/fastapi_integration/congratulations/role_checking.py
maximsakhno/galo-ioc
d300cc0e63e6ad375b7d2e75ac2b2e2fda30da4f
[ "MIT" ]
9
2022-01-16T11:45:00.000Z
2022-03-23T07:42:24.000Z
examples/fastapi_integration/src/fastapi_integration/congratulations/role_checking.py
maximsakhno/galo-ioc
d300cc0e63e6ad375b7d2e75ac2b2e2fda30da4f
[ "MIT" ]
2
2022-01-16T12:03:14.000Z
2022-01-16T12:11:27.000Z
examples/fastapi_integration/src/fastapi_integration/congratulations/role_checking.py
maximsakhno/galo-ioc
d300cc0e63e6ad375b7d2e75ac2b2e2fda30da4f
[ "MIT" ]
null
null
null
__all__ = [ "load", ]
27
87
0.777778
from fastapi_integration.current_user_resolvers.role_checkers import RoleCheckerFactory from galo_ioc import get_factory __all__ = [ "load", ] def load() -> None: role_checker_factory = get_factory(RoleCheckerFactory) role_checker = role_checker_factory() role_checker.register_roles_for_route("POST",...
0
0
0
0
0
179
0
77
67
12c32d59d3ae193352b3e3043ee04147f412d795
2,783
py
Python
src/build/android/pylib/instrumentation/test_package.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
1
2018-01-02T15:42:08.000Z
2018-01-02T15:42:08.000Z
src/build/android/pylib/instrumentation/test_package.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
null
null
null
src/build/android/pylib/instrumentation/test_package.py
bopopescu/MQUIC
703e944ec981366cfd2528943b1def2c72b7e49d
[ "MIT" ]
1
2020-07-25T02:05:49.000Z
2020-07-25T02:05:49.000Z
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Class representing instrumentation test apk and jar."""
35.679487
80
0.740927
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Class representing instrumentation test apk and jar.""" import os from devil.android import apk_helper from pylib.instrumentation import test_jar fr...
0
0
0
2,388
0
0
0
55
113
7310a4fa6daa6cfe1b119f1478c9d97c6d3e9123
1,303
py
Python
cliboa/test/util/test_cache.py
chiru1221/cliboa
0aad84f237b7c0d8a5ae0cbd27b9d70f97acbee1
[ "MIT" ]
null
null
null
cliboa/test/util/test_cache.py
chiru1221/cliboa
0aad84f237b7c0d8a5ae0cbd27b9d70f97acbee1
[ "MIT" ]
null
null
null
cliboa/test/util/test_cache.py
chiru1221/cliboa
0aad84f237b7c0d8a5ae0cbd27b9d70f97acbee1
[ "MIT" ]
1
2020-12-20T10:59:16.000Z
2020-12-20T10:59:16.000Z
# # Copyright 2019 BrainPad Inc. All Rights Reserved. # # 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, me...
37.228571
86
0.72218
# # Copyright 2019 BrainPad Inc. All Rights Reserved. # # 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, me...
0
0
0
592
0
0
0
6
68
2033b6dddfb77b16a6c23592bad60a247462cec3
7,719
py
Python
src/analysis_diagrams.py
seedatnabeel/Data-Imputation-Uncertainty
ffde47089546702b42045a92f9796bc1b5b7a662
[ "Apache-2.0" ]
null
null
null
src/analysis_diagrams.py
seedatnabeel/Data-Imputation-Uncertainty
ffde47089546702b42045a92f9796bc1b5b7a662
[ "Apache-2.0" ]
null
null
null
src/analysis_diagrams.py
seedatnabeel/Data-Imputation-Uncertainty
ffde47089546702b42045a92f9796bc1b5b7a662
[ "Apache-2.0" ]
null
null
null
from utils import myrmse from sklearn.metrics import (accuracy_score, roc_auc_score, mean_squared_error) import numpy as np import random import matplotlib.pyplot as plt def performance_vs_confidence( original_data, imp_data, missing_data, testY, test_idx, total_uncertainty, coeff_variatio...
29.018797
104
0.62832
from utils import normdata, myrmse from sklearn.metrics import ( accuracy_score, roc_curve, auc, roc_auc_score, mean_squared_error, ) import numpy as np import random import matplotlib.pyplot as plt def performance_vs_confidence( original_data, imp_data, missing_data, testY, te...
0
0
0
0
0
0
0
49
0
7be1a277da21b142d3eccde4f5166dabe54f8d13
9,710
py
Python
bblogger/deserialize.py
lohmega/jamble
ca7d2788c584cfb1c86ae766d06f6a9d57a60974
[ "Apache-2.0" ]
null
null
null
bblogger/deserialize.py
lohmega/jamble
ca7d2788c584cfb1c86ae766d06f6a9d57a60974
[ "Apache-2.0" ]
3
2020-05-27T13:00:45.000Z
2020-09-29T12:42:23.000Z
bblogger/deserialize.py
lohmega/jamble
ca7d2788c584cfb1c86ae766d06f6a9d57a60974
[ "Apache-2.0" ]
null
null
null
import logging # not needed in python >= 3.6? as default dict keeps order try: except ImportError: # not in debian stretch dpkg/apt version of the pb lib from bblogger.defs import BlueBerryLogEntryFields logger = logging.getLogger(__name__) TXT_COL_WIDTH = 10 _COLNAME_TO_FLD = {} _COLNAME_TO_UNITS = {} _COLNA...
29.603659
89
0.564367
import logging import csv import json from platform import system from sys import stderr, stdout # not needed in python >= 3.6? as default dict keeps order from collections import OrderedDict, deque try: from google.protobuf.json_format import MessageToDict except ImportError: # not in debian stretch dpkg/ap...
0
43
0
8,493
0
103
0
149
303
c448d924e39cdd3b511d47b105bb773ffd02d4fe
121
py
Python
error_handlers/__init__.py
NikitolProject/idm_lp
a1eeb1c12e1918a715beb63c3bee97b7e1404801
[ "MIT" ]
2
2020-11-04T15:16:08.000Z
2020-11-04T15:55:29.000Z
error_handlers/__init__.py
Dlol0ne/idm_lp
3a5563024a3062d74b8c47259c4241554f073b39
[ "MIT" ]
null
null
null
error_handlers/__init__.py
Dlol0ne/idm_lp
3a5563024a3062d74b8c47259c4241554f073b39
[ "MIT" ]
1
2021-03-04T03:00:06.000Z
2021-03-04T03:00:06.000Z
from error_handlers import captha from error_handlers import rps error_handlers_bp = ( rps.user, captha.user, )
15.125
33
0.752066
from error_handlers import captha from error_handlers import rps error_handlers_bp = ( rps.user, captha.user, )
0
0
0
0
0
0
0
0
0
4a43febd8c2f697fbbc2dd319b189c165f503979
5,422
py
Python
SimTools/test_RNA_describe.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
1
2021-08-16T14:49:04.000Z
2021-08-16T14:49:04.000Z
SimTools/test_RNA_describe.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
SimTools/test_RNA_describe.py
ShepherdCode/Soars2021
ab4f304eaa09e52d260152397a6c53d7a05457da
[ "MIT" ]
null
null
null
# The following unix command will run all tests. # $ pytest # The -v option will list each test and show progress. # $ pytest -v # By default, pytest captures stdout unless the tests fail. # Use this option to see the output of print() statements. # $ pytest --capture=tee-sys
42.359375
83
0.610107
import pytest from RNA_describe import RNA_describer from RNA_describe import ORF_counter from RNA_describe import ORF_RE # The following unix command will run all tests. # $ pytest # The -v option will list each test and show progress. # $ pytest -v # By default, pytest captures stdout unless the tests fail. # Use th...
0
0
0
4,953
0
0
0
34
157
980eb881b9183a85e8a0d89ebe3875d7adc604ce
4,544
py
Python
scripts/gen_negative_agreements.py
aistairc/lm_syntax_negative
19889a84d6ce32531fe82dfeea7a48df233d7f50
[ "MIT" ]
3
2020-05-07T06:58:53.000Z
2021-02-19T13:37:57.000Z
scripts/gen_negative_agreements.py
aistairc/lm_syntax_negative
19889a84d6ce32531fe82dfeea7a48df233d7f50
[ "MIT" ]
null
null
null
scripts/gen_negative_agreements.py
aistairc/lm_syntax_negative
19889a84d6ce32531fe82dfeea7a48df233d7f50
[ "MIT" ]
null
null
null
import argparse if __name__ == '__main__': parser = argparse.ArgumentParser('Generate negative examples for LM agreement task.') parser.add_argument('--source', required=True, type=str) parser.add_argument('--output', default='verb_negative_examples.txt') args = parser.parse_args() run(args)
37.553719
97
0.559419
import argparse import corenlp import gzip import inflect from tqdm import tqdm def open_f(fn, mode='rt'): if fn.endswith('.gz'): return gzip.open(fn, mode) else: return open(fn, mode) class VerbFinder(object): def __init__(self): # each position is a pair (idx, si...
0
0
0
3,028
0
1,066
0
-24
157
50236fdf6467d13205dc115c04971b4092f2ea4f
5,125
py
Python
snake.py
0Franky/snAIke
ddabb04c68e81d21b6ad23454ea2b8d67357aefb
[ "MIT" ]
null
null
null
snake.py
0Franky/snAIke
ddabb04c68e81d21b6ad23454ea2b8d67357aefb
[ "MIT" ]
1
2020-05-16T14:33:39.000Z
2020-05-16T14:33:39.000Z
snake.py
0Franky/ai-battleship
ddabb04c68e81d21b6ad23454ea2b8d67357aefb
[ "MIT" ]
1
2020-11-08T17:08:10.000Z
2020-11-08T17:08:10.000Z
# Valentin Mac # valentin.mace@kedgebs.com # Developed for fun # Feel free to use this code as you wish as long as you quote me as author """ snake.py ~~~~~~~~~~ This module is for building the snake itself in the snake game The snake: - Is on the form of a list, each element for a body block (containing its coordin...
37.962963
116
0.58478
# Valentin Macé # valentin.mace@kedgebs.com # Developed for fun # Feel free to use this code as you wish as long as you quote me as author """ snake.py ~~~~~~~~~~ This module is for building the snake itself in the snake game The snake: - Is on the form of a list, each element for a body block (containing its coordi...
2
0
0
4,428
0
0
0
7
46
80cdfea7dc48867c436f0e3fb26d31ebb7279008
4,414
py
Python
tests.py
gwpicard/flask-kanban
49a13635d14723639bde896d802e8f67b1c3147e
[ "MIT" ]
9
2019-02-01T01:17:28.000Z
2022-02-01T14:50:58.000Z
tests.py
gwpicard/flask-kanban
49a13635d14723639bde896d802e8f67b1c3147e
[ "MIT" ]
null
null
null
tests.py
gwpicard/flask-kanban
49a13635d14723639bde896d802e8f67b1c3147e
[ "MIT" ]
1
2022-02-21T11:20:49.000Z
2022-02-21T11:20:49.000Z
# project/test_basic.py import unittest TEST_DB = 'test.db' if __name__ == "__main__": unittest.main()
34.217054
104
0.646353
# project/test_basic.py import os import unittest from app.app import Kanban_app from app.models import db, User, Card TEST_DB = 'test.db' class BasicTests(unittest.TestCase): # execute before each test def setUp(self): Kanban_app.config['TESTING'] = True # set test mode Kanban_app.config['...
0
0
0
4,201
0
0
0
13
91
914dc2978f7ce70ef0733bfca7b7d211db0b3238
1,823
py
Python
src/pwned_passwords_django/api.py
jdufresne/pwned-passwords-django
664df66b54f662a26d98f34f1713281a15d0eb0b
[ "BSD-3-Clause" ]
102
2018-03-06T11:46:40.000Z
2022-03-23T17:25:19.000Z
src/pwned_passwords_django/api.py
jdufresne/pwned-passwords-django
664df66b54f662a26d98f34f1713281a15d0eb0b
[ "BSD-3-Clause" ]
24
2018-03-08T08:19:54.000Z
2020-11-05T11:09:03.000Z
src/pwned_passwords_django/api.py
jdufresne/pwned-passwords-django
664df66b54f662a26d98f34f1713281a15d0eb0b
[ "BSD-3-Clause" ]
6
2018-03-07T22:19:48.000Z
2020-05-05T00:43:52.000Z
""" Direct access to the Pwned Passwords API for checking whether a password is compromised. """ import hashlib import logging import sys import requests from django.conf import settings from . import __version__ log = logging.getLogger(__name__) API_ENDPOINT = "https://api.pwnedpasswords.com/range/{}" REQUEST_TI...
28.046154
86
0.675261
""" Direct access to the Pwned Passwords API for checking whether a password is compromised. """ import hashlib import logging import sys import requests from django.conf import settings from . import __version__ log = logging.getLogger(__name__) API_ENDPOINT = "https://api.pwnedpasswords.com/range/{}" REQUEST_TI...
0
0
0
0
0
0
0
0
0
906c9cd8624d841bd93c4dfadff12bec3fb9bb94
3,004
py
Python
tests/python/test_dataset_methods.py
billschereriii/SmartRedis
63147106d90df11765b5dd93f03df64a26937da6
[ "BSD-2-Clause" ]
null
null
null
tests/python/test_dataset_methods.py
billschereriii/SmartRedis
63147106d90df11765b5dd93f03df64a26937da6
[ "BSD-2-Clause" ]
null
null
null
tests/python/test_dataset_methods.py
billschereriii/SmartRedis
63147106d90df11765b5dd93f03df64a26937da6
[ "BSD-2-Clause" ]
null
null
null
import numpy as np from smartredis import Dataset def test_add_get_tensor(mock_data): """Test adding and retrieving 1D tensors to a dataset and with all datatypes """ dataset = Dataset("test-dataset") # 1D tensors of all data types data = mock_data.create_data(10) add_get_arrays(dataset,...
26.121739
91
0.649134
import numpy as np from smartredis import Dataset def test_add_get_tensor(mock_data): """Test adding and retrieving 1D tensors to a dataset and with all datatypes """ dataset = Dataset("test-dataset") # 1D tensors of all data types data = mock_data.create_data(10) add_get_arrays(dataset,...
0
0
0
0
0
0
0
0
0
137463cfc39f1173fd92189be66736d31bb70731
341
py
Python
ants/cyants/ex-setup.py
bwhewe-13/ants
6923cfc1603e0cd90c2ae90fa0fed6dd86edc0b2
[ "MIT" ]
null
null
null
ants/cyants/ex-setup.py
bwhewe-13/ants
6923cfc1603e0cd90c2ae90fa0fed6dd86edc0b2
[ "MIT" ]
null
null
null
ants/cyants/ex-setup.py
bwhewe-13/ants
6923cfc1603e0cd90c2ae90fa0fed6dd86edc0b2
[ "MIT" ]
null
null
null
from distutils.core import setup from Cython.Build import cythonize # ext = Extension(name="wrap_fib", source=["cfibc.c", "wrap_fib.pyx"]) # ext = ["hermite_splines.pyx", "source_iteration.pyx", "splines.pyx"] ext = ["multi_group.pyx", "x_sweeps.pyx"] #, "x_sweeps.pxd"] setup(ext_modules=cythonize(ext, language_lev...
34.1
71
0.721408
from distutils.core import setup, Extension from Cython.Build import cythonize # ext = Extension(name="wrap_fib", source=["cfibc.c", "wrap_fib.pyx"]) # ext = ["hermite_splines.pyx", "source_iteration.pyx", "splines.pyx"] ext = ["multi_group.pyx", "x_sweeps.pyx"] #, "x_sweeps.pxd"] setup(ext_modules=cythonize(ext, l...
0
0
0
0
0
0
0
11
0
9c8267f71830eb7f8fa7c49b3f712bc593dfe2dd
205
py
Python
bus_plan/wsgi.py
diegopmayer/bussiness_plan
56f7491a9b1767f60341e003648a7b9a946a877c
[ "MIT" ]
null
null
null
bus_plan/wsgi.py
diegopmayer/bussiness_plan
56f7491a9b1767f60341e003648a7b9a946a877c
[ "MIT" ]
2
2019-02-27T16:46:53.000Z
2019-05-07T00:32:10.000Z
bus_plan/wsgi.py
diegopmayer/bussiness_plan
56f7491a9b1767f60341e003648a7b9a946a877c
[ "MIT" ]
null
null
null
import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bus_plan.settings') application = Cling(get_wsgi_application())
20.5
68
0.82439
import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bus_plan.settings') application = Cling(get_wsgi_application())
0
0
0
0
0
0
0
0
0
e851c09d856bac197cdb3242af940148b3e9a3ea
210
py
Python
awaitawaitawait.py
bmintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
2
2018-11-12T10:33:13.000Z
2019-02-24T05:01:40.000Z
awaitawaitawait.py
iomintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
null
null
null
awaitawaitawait.py
iomintz/python-snippets
982861c173bf4bcd5d908514a9e8b1914a580a5d
[ "CC0-1.0" ]
2
2018-11-24T08:16:59.000Z
2019-02-24T04:41:30.000Z
#!/usr/bin/env python3 # encoding: utf-8 import asyncio asyncio.run(main())
15
49
0.633333
#!/usr/bin/env python3 # encoding: utf-8 import asyncio async def f(*, n=5): if n == 1: return True return f(n=n-1) async def main(): print(await (await (await (await (await f()))))) asyncio.run(main())
0
0
86
0
0
0
0
0
46
58fe7c9a90e9776fd8838d8eb40a468fc3594ba1
792
py
Python
examples/windows/python/example.py
gomiero/bin2src
5b1e849873631fe2bef76cc77ed18026cd90c2d9
[ "MIT" ]
1
2022-03-07T08:21:49.000Z
2022-03-07T08:21:49.000Z
examples/windows/python/example.py
gomiero/bin2src
5b1e849873631fe2bef76cc77ed18026cd90c2d9
[ "MIT" ]
null
null
null
examples/windows/python/example.py
gomiero/bin2src
5b1e849873631fe2bef76cc77ed18026cd90c2d9
[ "MIT" ]
1
2021-08-02T08:07:16.000Z
2021-08-02T08:07:16.000Z
# # Embed a photo data inside a Tk frame # import tkinter as tk AUTHOR = "Alexandre Gomiero de Oliveira" REPO = "https://github.com/gomiero/bin2src" # Entry point: create the root window... root = tk.Tk() # ...the App instance... app = App(master = root) # ...and run the main loop. app.mainloop()
28.285714
82
0.651515
# # Embed a photo data inside a Tk frame # import tkinter as tk import smimgpng as smimg AUTHOR = "Alexandre Gomiero de Oliveira" REPO = "https://github.com/gomiero/bin2src" class App(tk.Frame): def __init__(self, master): super().__init__(master) self.config(width=427, height=640) canvas ...
0
0
0
443
0
0
0
3
45
7640a854eb6514e315d4382f00b04b6a3bbf1c3f
5,852
py
Python
lib/eval.py
yzhq97/SCKR
601545db60eac3845e0eeaaae6b0580d4a41d949
[ "MIT" ]
7
2019-05-02T07:26:46.000Z
2020-04-06T06:59:25.000Z
lib/eval.py
yzhq97/SCKR
601545db60eac3845e0eeaaae6b0580d4a41d949
[ "MIT" ]
1
2019-06-06T18:26:25.000Z
2020-11-07T08:39:39.000Z
lib/eval.py
yzhq97/SCKR
601545db60eac3845e0eeaaae6b0580d4a41d949
[ "MIT" ]
3
2019-09-20T09:14:19.000Z
2021-02-13T15:17:59.000Z
from lib.mlnet import MLNet from data.data_loader import DataLoader from data.utils import split_and_pack import tensorflow as tf import numpy as np import time def get_descs_and_labels(net: MLNet, sess: tf.Session, modal, paths_with_labels, process_fn, batch_size): """ This function ...
36.805031
140
0.645762
from lib.mlnet import MLNet from data.data_loader import DataLoader from data.utils import split_and_pack import tensorflow as tf import numpy as np import time def get_descs_and_labels(net: MLNet, sess: tf.Session, modal, paths_with_labels, process_fn, batch_size): """ This function ...
0
0
0
0
0
2,327
0
0
23
c685fdb6b92c9e8375aa383895edecf724d650b5
379
py
Python
tests/exceptions/test_repo_not_found.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
1
2021-04-13T23:10:11.000Z
2021-04-13T23:10:11.000Z
tests/exceptions/test_repo_not_found.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
4
2021-01-27T00:06:12.000Z
2021-02-12T01:20:32.000Z
tests/exceptions/test_repo_not_found.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
1
2021-05-07T05:07:29.000Z
2021-05-07T05:07:29.000Z
"""Testing invalid cookiecutter template repositories.""" import pytest from tackle import exceptions, main def test_should_raise_error_if_repo_does_not_exist(chdir): """Cookiecutter invocation with non-exist repository should raise error.""" chdir('/') with pytest.raises(exceptions.UnknownSourceExceptio...
31.583333
79
0.76781
"""Testing invalid cookiecutter template repositories.""" import pytest from tackle import exceptions, main def test_should_raise_error_if_repo_does_not_exist(chdir): """Cookiecutter invocation with non-exist repository should raise error.""" chdir('/') with pytest.raises(exceptions.UnknownSourceExceptio...
0
0
0
0
0
0
0
0
0
8785153ec48817e3188a7b8b4bf14392a9bd7b80
6,260
py
Python
src/analyze_orig_data.py
MadryLab/dataset-replication-analysis
f06ee16f0bb1c119492c6134788e62457ad9f5bb
[ "MIT" ]
25
2020-05-19T20:06:58.000Z
2022-01-19T07:41:06.000Z
src/analyze_orig_data.py
MadryLab/dataset-replication-analysis
f06ee16f0bb1c119492c6134788e62457ad9f5bb
[ "MIT" ]
null
null
null
src/analyze_orig_data.py
MadryLab/dataset-replication-analysis
f06ee16f0bb1c119492c6134788e62457ad9f5bb
[ "MIT" ]
5
2020-05-20T06:30:56.000Z
2021-03-03T00:46:24.000Z
import torch as ch import pandas as pd import numpy as np from pathlib import Path from pathos.multiprocessing import Pool from argparse import ArgumentParser import matplotlib as mpl from matplotlib import rc from matplotlib import pyplot as plt import seaborn as sns sns.set() mpl.style.use('ggplot') rc('font', **{'f...
40.387097
117
0.620128
import torch as ch import pandas as pd import numpy as np from pathlib import Path from pathos.multiprocessing import Pool from argparse import ArgumentParser from numpy.random import seed import matplotlib as mpl from matplotlib import rc from matplotlib import pyplot as plt import seaborn as sns sns.set() mpl.style....
0
0
0
0
0
3,529
0
8
271
f78ed197c79dd4247a597e1b42e0f17b20112e58
1,525
py
Python
remote-notify/server.py
JOndra91/siliness
a0aa3af1f57ec15e9ebfa952351cb3e6d644e8f7
[ "Unlicense" ]
null
null
null
remote-notify/server.py
JOndra91/siliness
a0aa3af1f57ec15e9ebfa952351cb3e6d644e8f7
[ "Unlicense" ]
null
null
null
remote-notify/server.py
JOndra91/siliness
a0aa3af1f57ec15e9ebfa952351cb3e6d644e8f7
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 if __name__ == '__main__': main()
27.232143
63
0.566557
#!/usr/bin/python3 import argparse from http import server import json import subprocess def main(): argp = argparse.ArgumentParser() argp.add_argument('--host', default='0.0.0.0') argp.add_argument('--port', default=6969, type=int) # argp.add_argument('--password') args = argp.parse_args() ...
0
0
0
1,019
0
328
0
-18
135
c073e119a8186298ac7dffa8adb5db13b57599fc
212
py
Python
rexplore/initialize.py
Seraphyx/reddit_explorer
a0c23e995c893fb40875a9248d9527b9402a1b95
[ "Apache-2.0" ]
null
null
null
rexplore/initialize.py
Seraphyx/reddit_explorer
a0c23e995c893fb40875a9248d9527b9402a1b95
[ "Apache-2.0" ]
null
null
null
rexplore/initialize.py
Seraphyx/reddit_explorer
a0c23e995c893fb40875a9248d9527b9402a1b95
[ "Apache-2.0" ]
null
null
null
import configparser def initialize(config_path): ''' Import a config .ini file. It should have the following definition: ''' config = configparser.ConfigParser() config.read(config_path)
14.133333
41
0.745283
import mysql import configparser def initialize(config_path): ''' Import a config .ini file. It should have the following definition: ''' config = configparser.ConfigParser() config.read(config_path)
0
0
0
0
0
0
0
-9
22
0c8fcd1a6114c33b2a99b9de62a42b63033f28bd
1,406
py
Python
tests/test_parsers.py
ggoldman1/project1
28a9b36a0873ee1ecb391b818611dfe119a87048
[ "MIT" ]
null
null
null
tests/test_parsers.py
ggoldman1/project1
28a9b36a0873ee1ecb391b818611dfe119a87048
[ "MIT" ]
null
null
null
tests/test_parsers.py
ggoldman1/project1
28a9b36a0873ee1ecb391b818611dfe119a87048
[ "MIT" ]
null
null
null
# write tests for parsers from seqparser import (FastaParser, FastqParser) def test_freebie_parser_1(): """ This one is a freebie DO NOT MODIFY THIS FUNCTION """ assert True def test_freebie_parser_2(): """ This too is a freebie DO NOT MODIFY THIS FUNCTION """ assert 1 != 2 ...
26.037037
107
0.652916
# write tests for parsers from seqparser import ( FastaParser, FastqParser) def test_freebie_parser_1(): """ This one is a freebie DO NOT MODIFY THIS FUNCTION """ assert True def test_freebie_parser_2(): """ This too is a freebie DO NOT MODIFY THIS FUNCTION """ ...
0
0
0
0
0
0
0
17
0
4c6a9382b347ed5d441f6449ab4c5d19324704dd
1,692
py
Python
home/migrations/0003_auto_20220326_0711.py
SeanCodeMedia/codeMedia-django
734284859e35f24bc4a0131154f175614804d4fa
[ "MIT" ]
null
null
null
home/migrations/0003_auto_20220326_0711.py
SeanCodeMedia/codeMedia-django
734284859e35f24bc4a0131154f175614804d4fa
[ "MIT" ]
null
null
null
home/migrations/0003_auto_20220326_0711.py
SeanCodeMedia/codeMedia-django
734284859e35f24bc4a0131154f175614804d4fa
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2022-03-26 11:11
30.214286
106
0.550827
# Generated by Django 3.1.2 on 2022-03-26 11:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0002_home_main_photo'), ] operations = [ migrations.RemoveField( model_name='home', name='icon1', ),...
0
0
0
1,578
0
0
0
19
46
08975034e5eeea126f26be92ee6ee1566c77c249
8,678
py
Python
src/everythingAboutTheMetalAPI/chapter09/__main__.py
pome-ta/pystaMetalStudy
530248ad8621ec951fcbaf450ebd26ac2752e540
[ "MIT" ]
1
2021-08-05T04:31:02.000Z
2021-08-05T04:31:02.000Z
src/everythingAboutTheMetalAPI/chapter09/__main__.py
pome-ta/pystaMetalStudy
530248ad8621ec951fcbaf450ebd26ac2752e540
[ "MIT" ]
2
2021-08-14T03:33:12.000Z
2021-11-11T06:25:01.000Z
src/everythingAboutTheMetalAPI/chapter09/__main__.py
pome-ta/pystaMetalStudy
530248ad8621ec951fcbaf450ebd26ac2752e540
[ "MIT" ]
null
null
null
import pathlib import ctypes import numpy as np from objc_util import c, create_objc_class, ObjCClass #import pdbg shader_path = pathlib.Path('./Shaders.metal') # --- load objc classes MTKView = ObjCClass('MTKView') MTLCompileOptions = ObjCClass('MTLCompileOptions') MTLRenderPipelineDescriptor = ObjCClass('MTLRe...
31.442029
151
0.671583
import pathlib import ctypes import numpy as np from objc_util import c, create_objc_class, ObjCClass, ObjCInstance import ui #import pdbg shader_path = pathlib.Path('./Shaders.metal') # --- load objc classes MTKView = ObjCClass('MTKView') MTLCompileOptions = ObjCClass('MTLCompileOptions') MTLRenderPipelineDescr...
93
0
0
2,396
0
3,854
0
2
206
8cd547ed24dfc46665b2b6848260fc45380cd132
8,521
py
Python
ncmapi.py
NKID00/NeteaseCloudMusicApiPy
731e8c405928d38be693739cff6449e3426d22c7
[ "MIT" ]
null
null
null
ncmapi.py
NKID00/NeteaseCloudMusicApiPy
731e8c405928d38be693739cff6449e3426d22c7
[ "MIT" ]
null
null
null
ncmapi.py
NKID00/NeteaseCloudMusicApiPy
731e8c405928d38be693739cff6449e3426d22c7
[ "MIT" ]
null
null
null
'''NeteaseCloudMusicApiPy NeteaseCloudMusicApi Python https://github.com/NKID00/NeteaseCloudMusicApiPy MIT License Copyright (c) 2020 NKID00 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 wit...
35.065844
78
0.593006
'''NeteaseCloudMusicApiPy NeteaseCloudMusicApi 的 Python 绑定 https://github.com/NKID00/NeteaseCloudMusicApiPy MIT License Copyright (c) 2020 NKID00 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 ...
963
501
0
5,492
0
0
0
56
178
821f7729b184207b23c910240f3e1ceacd2e28df
12,862
py
Python
tests/test_datasets.py
platiagro/projects
00da234b35003bb0ecc2d22a997e08737ceda044
[ "Apache-2.0" ]
6
2019-09-16T13:07:20.000Z
2021-06-02T19:02:05.000Z
tests/test_datasets.py
platiagro/projects
00da234b35003bb0ecc2d22a997e08737ceda044
[ "Apache-2.0" ]
325
2019-09-20T20:06:00.000Z
2022-03-30T15:05:49.000Z
tests/test_datasets.py
platiagro/projects
00da234b35003bb0ecc2d22a997e08737ceda044
[ "Apache-2.0" ]
17
2019-08-02T16:55:47.000Z
2021-06-26T19:13:35.000Z
# -*- coding: utf-8 -*- import unittest.mock as mock from fastapi.testclient import TestClient from projects.api.main import app from projects.database import session_scope import tests.util as util app.dependency_overrides[session_scope] = util.override_session_scope TEST_CLIENT = TestClient(app)
33.235142
132
0.594698
# -*- coding: utf-8 -*- import unittest import unittest.mock as mock from fastapi.testclient import TestClient from projects.api.main import app from projects.database import session_scope import tests.util as util app.dependency_overrides[session_scope] = util.override_session_scope TEST_CLIENT = TestClient(app) ...
0
9,935
0
2,584
0
0
0
-6
45
ae6c947746f3d9976489ea081db5ec36cf12f7d9
117
py
Python
tests/test_django2_2_fixers.py
pakal/django-compat-patcher
62c1a766807f2be11b03ea481fbb4c9f9e6529ba
[ "MIT" ]
12
2017-05-21T10:52:45.000Z
2022-03-04T09:52:58.000Z
tests/test_django2_2_fixers.py
pakal/django-compat-patcher
62c1a766807f2be11b03ea481fbb4c9f9e6529ba
[ "MIT" ]
18
2019-04-18T12:42:18.000Z
2022-02-23T09:38:45.000Z
tests/test_django2_2_fixers.py
pakal/django-compat-patcher
62c1a766807f2be11b03ea481fbb4c9f9e6529ba
[ "MIT" ]
2
2019-05-07T20:28:25.000Z
2022-03-03T22:13:15.000Z
from __future__ import absolute_import, print_function, unicode_literals # NOTHING FOR NOW
16.714286
72
0.846154
from __future__ import absolute_import, print_function, unicode_literals import _test_utilities # NOTHING FOR NOW
0
0
0
0
0
0
0
1
23
71479f55708352b7b69778fa052c2356f1afdd1e
4,738
py
Python
main.py
Amirmoradi94/SmartCar
4c0f17a6a98e6db46769787dc95d11e48b335488
[ "MIT" ]
3
2021-01-15T04:33:43.000Z
2021-02-15T18:20:15.000Z
main.py
Amirmoradi94/SmartCar
4c0f17a6a98e6db46769787dc95d11e48b335488
[ "MIT" ]
null
null
null
main.py
Amirmoradi94/SmartCar
4c0f17a6a98e6db46769787dc95d11e48b335488
[ "MIT" ]
1
2021-04-07T15:38:47.000Z
2021-04-07T15:38:47.000Z
# -*- coding: utf-8 -*- """ Created on Thu Dec 3 21:40:05 2020 @author: Amir Moradi """ import cv2 from Utils.undistortion import undistortion from Utils.angle_calculation import angle_calculation import numpy as np import serial video_StreamL = cv2.VideoCapture(2) # index of left camera video_StreamR = cv2.Video...
36.728682
120
0.548122
# -*- coding: utf-8 -*- """ Created on Thu Dec 3 21:40:05 2020 @author: Amir Moradi """ import cv2 from Utils.undistortion import undistortion from Utils.angle_calculation import angle_calculation import numpy as np import serial video_StreamL = cv2.VideoCapture(2) # index of left camera video_StreamR = cv2.Video...
2
0
0
0
0
0
0
0
0
96636c79f61d2c52c4c27582d3d3210f08ece747
3,547
py
Python
bot/exts/cricket.py
ShakyaMajumdar/ShaqqueBot
f618ae21e4bf700d86674399670634e8d1cc1dc9
[ "MIT" ]
null
null
null
bot/exts/cricket.py
ShakyaMajumdar/ShaqqueBot
f618ae21e4bf700d86674399670634e8d1cc1dc9
[ "MIT" ]
null
null
null
bot/exts/cricket.py
ShakyaMajumdar/ShaqqueBot
f618ae21e4bf700d86674399670634e8d1cc1dc9
[ "MIT" ]
null
null
null
# from pprint import pprint from discord.ext import commands from bot import constants API_URL = "https://livescore6.p.rapidapi.com/matches/v2/" LIVE_MATCHES_URL = API_URL + "list-live" HEADERS = { "x-rapidapi-key": constants.RAPIDAPI_KEY, "x-rapidapi-host": constants.RAPIDAPI_LIVESCORE6_HOST, } def setu...
32.842593
120
0.480124
from dataclasses import dataclass # from pprint import pprint import aiohttp import discord from discord.ext import commands from bot import constants API_URL = "https://livescore6.p.rapidapi.com/matches/v2/" LIVE_MATCHES_URL = API_URL + "list-live" HEADERS = { "x-rapidapi-key": constants.RAPIDAPI_KEY, "x-r...
0
2,910
0
127
0
0
0
-2
113
fb2b3853f43ad28f2ba2ee5903c79c030ef5c9c5
1,662
py
Python
families/ubuntutw_family.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
families/ubuntutw_family.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
families/ubuntutw_family.py
Botomatik/JackBot
58651d8b5a5bcead2a2eb79849019cb4f972b7cd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
19.325581
96
0.427798
# -*- coding: utf-8 -*- import family class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'ubuntutw' #Set the family name; this should be the same as in the filename. self.langs = { 'zh': None, } self.namespaces[-2] = {...
177
0
0
1,540
0
0
0
-8
46
10b3905d95f1693576c1d6105f16c89c21dc74cc
422
py
Python
keggretrieve.py
dewuem/python-bioinf
9dc45a467fc884644157ef75c4e3c34f5fd8ebcf
[ "MIT" ]
1
2019-06-26T23:27:05.000Z
2019-06-26T23:27:05.000Z
keggretrieve.py
dewuem/python-bioinf
9dc45a467fc884644157ef75c4e3c34f5fd8ebcf
[ "MIT" ]
null
null
null
keggretrieve.py
dewuem/python-bioinf
9dc45a467fc884644157ef75c4e3c34f5fd8ebcf
[ "MIT" ]
null
null
null
#!/usr/bin/python2 # coding: utf-8 # Daniel Elsner # Get the amino acid sequence from the correct url for a kegg entry... # Use best with GNU parallel (Tange 2011a) and an input list containing all the gene IDs from a kegg pathway. import sys from bs4 import BeautifulSoup import requests url = sys.argv[1] r = r...
17.583333
109
0.729858
#!/usr/bin/python2 # coding: utf-8 # Daniel Elsner # Get the amino acid sequence from the correct url for a kegg entry... # Use best with GNU parallel (Tange 2011a) and an input list containing all the gene IDs from a kegg pathway. import sys from bs4 import BeautifulSoup import requests url = sys.argv[1] r = r...
0
0
0
0
0
0
0
0
0
a5d94fadc5c483bc4f0c130583259b8d58126dd1
3,209
py
Python
kogia/core/models.py
pascalpepe/kogia
af41f857729144f3c747a812345892e21d561e89
[ "Apache-2.0" ]
null
null
null
kogia/core/models.py
pascalpepe/kogia
af41f857729144f3c747a812345892e21d561e89
[ "Apache-2.0" ]
null
null
null
kogia/core/models.py
pascalpepe/kogia
af41f857729144f3c747a812345892e21d561e89
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2017-2020 Pascal Pepe <contact@pascalpepe.com> # # 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 applic...
23.423358
74
0.63727
# Copyright (C) 2017-2020 Pascal Pepe <contact@pascalpepe.com> # # 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 applic...
0
0
0
2,282
0
0
0
41
251
65145260a9407e4c4c5f11fa168a6c7e6ff28eaf
985
py
Python
example/sql.py
kmuehlbauer/wetterdienst
85e72ccdbd00f0e8285e1ba24800dfafb81ccd63
[ "MIT" ]
1
2021-01-23T22:52:52.000Z
2021-01-23T22:52:52.000Z
example/sql.py
kmuehlbauer/wetterdienst
85e72ccdbd00f0e8285e1ba24800dfafb81ccd63
[ "MIT" ]
null
null
null
example/sql.py
kmuehlbauer/wetterdienst
85e72ccdbd00f0e8285e1ba24800dfafb81ccd63
[ "MIT" ]
null
null
null
""" ===== About ===== Acquire measurement information from DWD and filter using SQL. ===== Setup ===== :: pip install wetterdienst[sql] """ import logging log = logging.getLogger() if __name__ == "__main__": main()
18.240741
84
0.652792
""" ===== About ===== Acquire measurement information from DWD and filter using SQL. ===== Setup ===== :: pip install wetterdienst[sql] """ import logging from wetterdienst import DWDStationRequest from wetterdienst import TimeResolution, Parameter, PeriodType log = logging.getLogger() def sql_example(): ...
0
0
0
0
0
600
0
62
91
717ef021b534903c9c8167a5c7531193230a9ab0
2,400
py
Python
click_game/MainWindow.py
HSU-S21-CS232/gui-examples
5f7d011dd13cee0648a3d69f1774edef7424e422
[ "Apache-2.0" ]
null
null
null
click_game/MainWindow.py
HSU-S21-CS232/gui-examples
5f7d011dd13cee0648a3d69f1774edef7424e422
[ "Apache-2.0" ]
null
null
null
click_game/MainWindow.py
HSU-S21-CS232/gui-examples
5f7d011dd13cee0648a3d69f1774edef7424e422
[ "Apache-2.0" ]
null
null
null
import sys #be sure to import any widget that you want to manipulate from PySide2.QtWidgets import QApplication if __name__ == '__main__': app = QApplication(sys.argv) main_window = MainWindow() sys.exit(app.exec_())
30.379747
92
0.63375
import sys from enum import Enum from PySide2.QtUiTools import QUiLoader #allows us to load .ui files #be sure to import any widget that you want to manipulate from PySide2.QtWidgets import QApplication, QPushButton, QGridLayout, QSizePolicy from PySide2.QtCore import QFile, QObject import random class MainWindow(QOb...
0
0
0
1,959
0
0
0
69
140
2de795b5bf05bc4e60da1705586f10f407d4268b
1,573
py
Python
list-quotas-regional.py
thiago-a-azevedo/gcp-resource-list
df7fe500f86b745e1815c8d510f8dca6e8bc355c
[ "Apache-2.0" ]
2
2022-02-05T21:05:43.000Z
2022-02-06T01:55:50.000Z
list-quotas-regional.py
thiago-a-azevedo/gcp-resource-list
df7fe500f86b745e1815c8d510f8dca6e8bc355c
[ "Apache-2.0" ]
null
null
null
list-quotas-regional.py
thiago-a-azevedo/gcp-resource-list
df7fe500f86b745e1815c8d510f8dca6e8bc355c
[ "Apache-2.0" ]
null
null
null
# List GCP Regional project quotas # Official GCP SDK (Python) Documentation: https://googleapis.github.io/google-api-python-client/docs/dyn/ import argparse from googleapiclient import discovery from oauth2client.client import GoogleCredentials from google.cloud import resource_manager client = resource_manager.Clien...
32.770833
106
0.689129
# List GCP Regional project quotas # Official GCP SDK (Python) Documentation: https://googleapis.github.io/google-api-python-client/docs/dyn/ import json import ipcalc import sys import argparse from googleapiclient import discovery from oauth2client.client import GoogleCredentials from google.cloud import resource_ma...
0
0
0
0
0
0
0
-29
67
df462c1c222636422e075517ef3000fe1439adb5
411
py
Python
osmaxx/profile/admin.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
null
null
null
osmaxx/profile/admin.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
null
null
null
osmaxx/profile/admin.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
null
null
null
from django.contrib import admin from osmaxx.profile.models import Profile admin.site.register(Profile, ProfileAdmin)
24.176471
58
0.751825
from django import forms from django.contrib import admin from osmaxx.profile.models import Profile class ProfileAdminForm(forms.ModelForm): class Meta: model = Profile fields = ['associated_user', 'unverified_email'] class ProfileAdmin(admin.ModelAdmin): list_display = ['associated_user', ...
0
0
0
219
0
0
0
3
68
1abc0cd17b3be692c4ae6a95012e1e744129a64f
6,798
py
Python
rdkit/ML/ModelPackage/UnitTestPackage.py
kazuyaujihara/rdkit
06027dcd05674787b61f27ba46ec0d42a6037540
[ "BSD-3-Clause" ]
1,609
2015-01-05T02:41:13.000Z
2022-03-30T21:57:24.000Z
rdkit/ML/ModelPackage/UnitTestPackage.py
kazuyaujihara/rdkit
06027dcd05674787b61f27ba46ec0d42a6037540
[ "BSD-3-Clause" ]
3,412
2015-01-06T12:13:33.000Z
2022-03-31T17:25:41.000Z
rdkit/ML/ModelPackage/UnitTestPackage.py
bp-kelley/rdkit
e0de7c9622ce73894b1e7d9568532f6d5638058a
[ "BSD-3-Clause" ]
811
2015-01-11T03:33:48.000Z
2022-03-28T11:57:49.000Z
# # Copyright (C) 2002-2008 greg Landrum and Rational Discovery LLC # """ unit tests for the model and descriptor packager """ import unittest if __name__ == '__main__': # pragma: nocover unittest.main()
38.191011
104
0.597823
# # Copyright (C) 2002-2008 greg Landrum and Rational Discovery LLC # """ unit tests for the model and descriptor packager """ import os import random import unittest from xml.dom import minidom from xml.etree import ElementTree as ET from rdkit import Chem from rdkit import RDConfig from rdkit.Chem import Descripto...
0
0
0
5,878
0
147
0
179
378
0700d43171f01aecee586622fd901c92050a6f9c
2,501
py
Python
tests/test_metrics_list.py
amitsagtani97/prometheus-api-client-python
49d0fdfc9a1fcfd5f51c53972cd2fcd223b1ddcf
[ "MIT" ]
3
2020-05-06T06:39:00.000Z
2020-06-05T06:23:05.000Z
tests/test_metrics_list.py
amitsagtani97/prometheus-api-client-python
49d0fdfc9a1fcfd5f51c53972cd2fcd223b1ddcf
[ "MIT" ]
2
2020-07-14T14:50:39.000Z
2020-08-10T02:27:44.000Z
tests/test_metrics_list.py
amitsagtani97/prometheus-api-client-python
49d0fdfc9a1fcfd5f51c53972cd2fcd223b1ddcf
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
33.346667
100
0.608956
import unittest import json import os import datetime from prometheus_api_client import MetricsList class TestMetricsList(unittest.TestCase): def setUp(self): """ read metrics stored as jsons in './tests/metrics' """ self.raw_metrics_list = list() for (dir_path, _, file_nam...
0
0
0
2,328
0
0
0
-4
111
a757eb7b2184767f8ea2351b30cce6601a45be78
1,076
py
Python
captioning/utils/div_utils.py
HongkuanZhang/self-critical.pytorch
deccb8bf624ad6771193dfdfbe71bec958c7f715
[ "MIT" ]
1,030
2017-11-18T09:15:26.000Z
2022-03-29T05:35:24.000Z
misc/div_utils.py
sgondala/GoogleConceptualCaptioning
b7aef355bcf893d9f1e2250efd3a9b0e30646331
[ "MIT" ]
261
2017-06-09T03:45:54.000Z
2022-03-30T05:19:20.000Z
misc/div_utils.py
sgondala/GoogleConceptualCaptioning
b7aef355bcf893d9f1e2250efd3a9b0e30646331
[ "MIT" ]
332
2017-05-10T02:28:48.000Z
2022-03-30T08:26:33.000Z
# -----------------------------------------------
28.315789
67
0.596654
from random import uniform import numpy as np from collections import OrderedDict, defaultdict from itertools import tee import time # ----------------------------------------------- def find_ngrams(input_list, n): return zip(*[input_list[i:] for i in range(n)]) def compute_div_n(caps,n=1): aggr_div = [] for ...
0
0
0
0
0
825
0
23
178
fbcedc37d1242b6a75437cb537ee7a1051dfc8d8
358
py
Python
tests/test_bonddata.py
andrew-block/jamesbond
9820526df12cc7b62b93638788ca8bbef2081c9b
[ "MIT" ]
3
2021-10-18T18:51:40.000Z
2021-12-20T15:45:26.000Z
tests/test_bonddata.py
andrew-block/jamesbond
9820526df12cc7b62b93638788ca8bbef2081c9b
[ "MIT" ]
null
null
null
tests/test_bonddata.py
andrew-block/jamesbond
9820526df12cc7b62b93638788ca8bbef2081c9b
[ "MIT" ]
3
2020-08-27T11:06:02.000Z
2021-08-10T10:13:24.000Z
from jamesbond import bonddata def test_load_data(): """ Test the row & column count (shape) Test the first column from the last row of the dataset 'Spectre'. """ df = bonddata.load_data() shape = df.shape last_row_first_col = df.iloc[-1, 1] assert shape == (24, 27) assert last_row...
23.866667
69
0.659218
import pytest from jamesbond import bonddata def test_load_data(): """ Test the row & column count (shape) Test the first column from the last row of the dataset 'Spectre'. """ df = bonddata.load_data() shape = df.shape last_row_first_col = df.iloc[-1, 1] assert shape == (24, 27) a...
0
0
0
0
0
0
0
-8
22
7c28549faf904dad9ced65ad4b3cab1ce627221f
40
py
Python
tests/__init__.py
bgailleton/helplotlib
1c517e997cbb7dca021b589d8237637f09040c42
[ "MIT" ]
null
null
null
tests/__init__.py
bgailleton/helplotlib
1c517e997cbb7dca021b589d8237637f09040c42
[ "MIT" ]
null
null
null
tests/__init__.py
bgailleton/helplotlib
1c517e997cbb7dca021b589d8237637f09040c42
[ "MIT" ]
null
null
null
"""Unit test package for helplotlib."""
20
39
0.7
"""Unit test package for helplotlib."""
0
0
0
0
0
0
0
0
0
43cd4c86ae09c8f5727dc536abc8a702deb94a79
52
py
Python
testcase/test.py
songhuijuantianxiezuo/songhuijuan
a80f4add92035914c61ccf5d873e4bc2063ef147
[ "MIT" ]
null
null
null
testcase/test.py
songhuijuantianxiezuo/songhuijuan
a80f4add92035914c61ccf5d873e4bc2063ef147
[ "MIT" ]
null
null
null
testcase/test.py
songhuijuantianxiezuo/songhuijuan
a80f4add92035914c61ccf5d873e4bc2063ef147
[ "MIT" ]
null
null
null
a=1,b=2 print(assertEqual(a,b)) #
7.428571
32
0.538462
a=1,b=2 print(assertEqual(a,b)) #验证是否一致
18
0
0
0
0
0
0
0
0
c4c753f45db71b0be93714242ffc0238d4d7156f
10,257
py
Python
matlab_test_files/invfreqs_test.py
vishalbelsare/parametric_modeling
9bfe5df35671930043215c8f6c855af8f49e28bf
[ "BSD-3-Clause" ]
37
2015-02-01T12:03:48.000Z
2021-12-23T14:38:38.000Z
matlab_test_files/invfreqs_test.py
vishalbelsare/parametric_modeling
9bfe5df35671930043215c8f6c855af8f49e28bf
[ "BSD-3-Clause" ]
2
2015-07-27T11:34:24.000Z
2019-12-11T13:39:18.000Z
matlab_test_files/invfreqs_test.py
vishalbelsare/parametric_modeling
9bfe5df35671930043215c8f6c855af8f49e28bf
[ "BSD-3-Clause" ]
19
2016-09-06T20:23:19.000Z
2021-11-07T16:07:40.000Z
# if available import pylab (from matlibplot) try: except ImportError: pass
35.989474
253
0.538267
import numpy as np import scipy import matcompat # if available import pylab (from matlibplot) try: import matplotlib.pylab as plt except ImportError: pass def invfreqs(g, w, varargin): # Local Variables: realFlag, cg, realStr, D31, gndir, t1, cw, nk, kom, nm, na, nb, Vcap, V1, rg, pf, rw, tol, maxiter,...
0
0
0
0
0
10,047
0
-8
138
000b1fd18754a4d6247223a1d655166753c79f23
22,046
py
Python
corehq/apps/api/es.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/api/es.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/api/es.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
import logging from dimagi.utils.parsing import ISO_DATE_FORMAT from corehq.apps.api.resources.v0_1 import TASTYPIE_RESERVED_GET_PARAMS from corehq.pillows.base import VALUE_TAG logger = logging.getLogger('es') def report_term_filter(terms, mapping): """convert terms to correct #value term queries based up...
37.177066
144
0.606459
import copy import datetime import json import logging from django.http import HttpResponse from django.utils.decorators import classonlymethod, method_decorator from django.views.generic import View from corehq.util.es.elasticsearch import ElasticsearchException, NotFoundError from casexml.apps.case.models import C...
0
1,206
0
14,035
0
3,059
0
759
854
0079cd9a1c9858deccf8054f86b028bf23ff6bd4
489
py
Python
Day 5 Assign 2.py
dishabhavsar/Letsupgrade-python-b7
3c78bfe8aaa113a003efcccdb3d1787c95aef78e
[ "Apache-2.0" ]
null
null
null
Day 5 Assign 2.py
dishabhavsar/Letsupgrade-python-b7
3c78bfe8aaa113a003efcccdb3d1787c95aef78e
[ "Apache-2.0" ]
null
null
null
Day 5 Assign 2.py
dishabhavsar/Letsupgrade-python-b7
3c78bfe8aaa113a003efcccdb3d1787c95aef78e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[69]: # In[70]: isPrime(7) # In[71]: isPrime(8) # In[72]: pno = [] # In[73]: lst = list(range(0,2500)) # In[74]: for item in lst: if isPrime(item): pno.append(item) # In[75]: print(pno) # In[76]: lst_prime_no = filter(isPrime,lst) # I...
6.985714
34
0.507157
#!/usr/bin/env python # coding: utf-8 # In[69]: def isPrime(n): for i in range(2,n): if n % i ==0: return False else: return True # In[70]: isPrime(7) # In[71]: isPrime(8) # In[72]: pno = [] # In[73]: lst = list(range(0,2500)) # In[74]: for item in lst: if ...
0
0
0
0
0
96
0
0
23
3bb68af9b0478d9ea6afdf11b949fe5e580705ff
5,131
py
Python
deliver/tests/converter/test_converter.py
sirech/deliver
0ddb47d9b7c7a4bddfcf92e4bd683803c95efd3a
[ "MIT" ]
3
2017-06-07T21:48:20.000Z
2020-06-15T16:27:43.000Z
deliver/tests/converter/test_converter.py
sirech/deliver
0ddb47d9b7c7a4bddfcf92e4bd683803c95efd3a
[ "MIT" ]
null
null
null
deliver/tests/converter/test_converter.py
sirech/deliver
0ddb47d9b7c7a4bddfcf92e4bd683803c95efd3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
38.291045
99
0.653479
# -*- coding: utf-8 -*- from deliver.tests.test_base import BaseTest, load_msg, load_all_msg class ConverterTest(BaseTest): '''Tests for the UnicodeMessage class''' def setUp(self): super(ConverterTest,self).setUp() self.msg = load_msg('sample3') def get_text(self, decode=False): ...
32
0
0
4,999
0
0
0
47
45
4b059cdf1fee82342ebf26912e0f23a357b0cc33
1,961
py
Python
example/crawler/pool_client.py
Chisanan232/multirunnable
7223e49750dc3d3ccf7ebcd3d292138916b582f2
[ "Apache-2.0" ]
1
2022-03-18T15:20:53.000Z
2022-03-18T15:20:53.000Z
example/crawler/pool_client.py
Chisanan232/multirunnable
7223e49750dc3d3ccf7ebcd3d292138916b582f2
[ "Apache-2.0" ]
null
null
null
example/crawler/pool_client.py
Chisanan232/multirunnable
7223e49750dc3d3ccf7ebcd3d292138916b582f2
[ "Apache-2.0" ]
null
null
null
import os DEVELOPMENT_MODE = os.getenv("DEVELOPMENT_MODE", True) if DEVELOPMENT_MODE: # Import package multirunnable import pathlib import sys package_path = str(pathlib.Path(__file__).absolute().parent.parent.parent) sys.path.append(package_path) # multirunnable package if __name__ == '__...
30.169231
153
0.688424
import requests import random import os DEVELOPMENT_MODE = os.getenv("DEVELOPMENT_MODE", True) if DEVELOPMENT_MODE: # Import package multirunnable import pathlib import sys package_path = str(pathlib.Path(__file__).absolute().parent.parent.parent) sys.path.append(package_path) # multirunnable pac...
0
0
0
1,373
0
0
0
34
112
853a07f29158122ed01614d80889727843fe1daf
3,733
py
Python
jetson/train.py
team7561/2022RapidReact
8b6e0d2a24411100689774c6c2e3b76c1c69deab
[ "BSD-3-Clause" ]
null
null
null
jetson/train.py
team7561/2022RapidReact
8b6e0d2a24411100689774c6c2e3b76c1c69deab
[ "BSD-3-Clause" ]
null
null
null
jetson/train.py
team7561/2022RapidReact
8b6e0d2a24411100689774c6c2e3b76c1c69deab
[ "BSD-3-Clause" ]
null
null
null
# %% import torch import torchvision import torchvision.transforms as transforms device = torch.device('cuda') TASK = 'balls' CATEGORIES = ['red_ball',' blue_ball'] DATASETS = ['A'] TRANSFORMS = transforms.Compose([ transforms.ColorJitter(0.2, 0.2, 0.2, 0.2), transforms.Resize((224, 224)), tr...
28.715385
162
0.583981
# %% import torch import torchvision import threading import time from utils import preprocess import torch.nn.functional as F import traitlets import torchvision.transforms as transforms from dataset import ImageClassificationDataset device = torch.device('cuda') TASK = 'balls' CATEGORIES = ['red_ball','...
0
0
0
0
0
2,034
0
22
217
16ecd44268339807a3ab50f1f6e9552e1c4a7e7f
2,500
py
Python
tests/functional/push/test_remove_channels_from_push.py
Versature/pubnub-python
a558d212a44ada6fbf2793a32e93685c959b8b22
[ "MIT" ]
null
null
null
tests/functional/push/test_remove_channels_from_push.py
Versature/pubnub-python
a558d212a44ada6fbf2793a32e93685c959b8b22
[ "MIT" ]
null
null
null
tests/functional/push/test_remove_channels_from_push.py
Versature/pubnub-python
a558d212a44ada6fbf2793a32e93685c959b8b22
[ "MIT" ]
null
null
null
try: from mock import MagicMock except ImportError:
34.246575
117
0.656
import unittest try: from mock import MagicMock except ImportError: from unittest.mock import MagicMock from pubnub.pubnub import PubNub import pubnub.enums from pubnub.endpoints.push.remove_channels_from_push import RemoveChannelsFromPush from tests.helper import pnconf, sdk_name class TestRemoveChannels...
0
0
0
2,182
0
0
0
98
162
70d0c88563906e11580cfe5c56c6f22438a75531
280
py
Python
Python/find the Rhombus Area.py
Bijitakc/Hacktoberfest2021-2
167e7c81dc9c5cc83fd604ea1d4bce52aa882605
[ "MIT" ]
20
2021-10-06T13:51:46.000Z
2021-11-11T16:12:17.000Z
Python/find the Rhombus Area.py
Bijitakc/Hacktoberfest2021-2
167e7c81dc9c5cc83fd604ea1d4bce52aa882605
[ "MIT" ]
42
2021-10-08T09:49:17.000Z
2021-10-21T23:18:39.000Z
Python/find the Rhombus Area.py
Bijitakc/Hacktoberfest2021-2
167e7c81dc9c5cc83fd604ea1d4bce52aa882605
[ "MIT" ]
97
2021-10-06T13:04:34.000Z
2021-11-11T16:12:21.000Z
rhombusD1 = float(input("Enter Rhombus First Diagonal = ")) rhombusD2 = float(input("Enter Rhombus Second Diagonal = ")) rhombusArea = calRhombusArea(rhombusD1, rhombusD2) print("The Area of a Rhombus = %.3f" %rhombusArea)
25.454545
60
0.710714
def calRhombusArea(d1, d2): return (d1 * d2)/2 rhombusD1 = float(input("Enter Rhombus First Diagonal = ")) rhombusD2 = float(input("Enter Rhombus Second Diagonal = ")) rhombusArea = calRhombusArea(rhombusD1, rhombusD2) print("The Area of a Rhombus = %.3f" %rhombusArea)
0
0
0
0
0
29
0
0
22
02ae1dd4f0b18eabd2110e77fdbaa8e28cc8fbf7
5,796
py
Python
Testing/elx_compare_overlap.py
eliseemond/elastix
0e8572f4a315e0a8f08b07d5947b4f3ac160b575
[ "Apache-2.0" ]
318
2017-05-22T11:39:46.000Z
2022-03-27T04:40:13.000Z
Testing/elx_compare_overlap.py
eliseemond/elastix
0e8572f4a315e0a8f08b07d5947b4f3ac160b575
[ "Apache-2.0" ]
358
2017-05-22T11:36:05.000Z
2022-03-18T15:49:10.000Z
Testing/elx_compare_overlap.py
eliseemond/elastix
0e8572f4a315e0a8f08b07d5947b4f3ac160b575
[ "Apache-2.0" ]
102
2017-05-22T11:38:44.000Z
2021-12-23T20:27:51.000Z
import sys import os #------------------------------------------------------------------------------- # the main function # Below we deform the moving image segmentation by the current result as well as # by a previous stored result. This makes this test a regression test. # # We could instead compare with a fixed ima...
45.637795
149
0.675811
import sys, subprocess import os import os.path import shutil import re import glob from optparse import OptionParser #------------------------------------------------------------------------------- # the main function # Below we deform the moving image segmentation by the current result as well as # by a previous sto...
0
0
0
0
0
5,103
0
-13
133
2b52a93d3cf4e00721091ea445ca5eee4afc169e
1,771
py
Python
build-tools/code_generator/function_generator/generate_src_nbla_function_cpp.py
PAC-P2P/nnabla
bb7e7d52555a5bc145ec3c9a2e152fa5b11574de
[ "Apache-2.0" ]
1
2021-04-08T00:33:23.000Z
2021-04-08T00:33:23.000Z
build-tools/code_generator/function_generator/generate_src_nbla_function_cpp.py
enomotom/nnabla
1947fe16a0a41d19d76cd916f151aa1991ea1b44
[ "Apache-2.0" ]
null
null
null
build-tools/code_generator/function_generator/generate_src_nbla_function_cpp.py
enomotom/nnabla
1947fe16a0a41d19d76cd916f151aa1991ea1b44
[ "Apache-2.0" ]
1
2020-08-19T08:32:51.000Z
2020-08-19T08:32:51.000Z
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
45.410256
99
0.645963
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
0
0
0
0
0
1,073
0
1
45
7106131880699d6f4381bcf92970ea93379347b3
4,583
py
Python
low_shot_learning/architectures/tools.py
ZhenLiuBuaa/wDAE_GNN_FewShot
6db1e4b1fe99821ffa116be009b5765f47932400
[ "MIT" ]
150
2019-04-06T15:27:15.000Z
2022-03-23T07:52:20.000Z
low_shot_learning/architectures/tools.py
ZhenLiuBuaa/wDAE_GNN_FewShot
6db1e4b1fe99821ffa116be009b5765f47932400
[ "MIT" ]
17
2019-05-14T06:55:04.000Z
2021-03-12T15:45:54.000Z
low_shot_learning/architectures/tools.py
gidariss/wDAE_GNN_FewShot
6db1e4b1fe99821ffa116be009b5765f47932400
[ "MIT" ]
21
2019-06-22T02:26:35.000Z
2022-01-14T15:37:44.000Z
import torch import torch import torch.nn as nn import torch.nn.functional as F def batch_cosine_fully_connected_layer(x_in, weight, scale=None, bias=None): """ Args: x_in: a 3D tensor with shape [meta_batch_size x num_examples x num_features_in] weight: a 3D tensor with shape ...
29.567742
76
0.602444
import torch import torch import torch.nn as nn import torch.nn.functional as F class LinearDiag(nn.Module): def __init__(self, num_features, bias=False): super(LinearDiag, self).__init__() # initialize to the identity transform weight = torch.FloatTensor(num_features).fill_(1) sel...
0
0
0
2,715
0
712
0
0
115
27da8b8c9f15b6143439568cacc7459e3df67bd2
1,527
py
Python
atlasutil/dvpp_process/dvpp_process.py
Atlas200DKTest/sample-facedetection-python
b1266604c853ab04efac6ed6656b192f72d0778c
[ "Apache-2.0" ]
1
2020-04-10T08:48:05.000Z
2020-04-10T08:48:05.000Z
atlasutil/dvpp_process/dvpp_process.py
Atlas200DKTest/sample-facedetection-python
b1266604c853ab04efac6ed6656b192f72d0778c
[ "Apache-2.0" ]
1
2020-01-23T11:41:25.000Z
2020-02-25T08:54:54.000Z
atlasutil/dvpp_process/dvpp_process.py
Atlas200DKTest/sample-facedetection-python
b1266604c853ab04efac6ed6656b192f72d0778c
[ "Apache-2.0" ]
1
2020-04-10T08:47:53.000Z
2020-04-10T08:47:53.000Z
# !/usr/bin/env python # -*- coding:utf-8 -*- JPGENC_FORMAT_NV12 = 0x10
31.8125
113
0.638507
# !/usr/bin/env python # -*- coding:utf-8 -*- import ctypes from ctypes import * import os import numpy as np import time JPGENC_FORMAT_NV12 = 0x10 class CameraImageBuf(Structure): _fields_ = [ ('size', c_uint), ('data', POINTER(c_ubyte)) ] class DvppImageBuffer(Structure): _fields_ =...
0
0
0
1,306
0
0
0
-34
180
0b832f5ceea1a3fbf7ea9c67e5673b38acad18d4
850
py
Python
programmers/lv3/shopping.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv3/shopping.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv3/shopping.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# if __name__ == "__main__": gems = ["DIA", "RUBY", "RUBY", "DIA", "DIA", "EMERALD", "SAPPHIRE", "DIA"] print(solution(gems))
26.5625
78
0.451765
# 보석 쇼핑 def solution(gems): answer = [] counts = {} kinds = len(set(gems)) minimum = 987654321 left, right = 0, 0 while right < len(gems): cur_right = gems[right] counts[cur_right] = counts.get(cur_right, 0) + 1 right += 1 if kinds == len(counts): wh...
12
0
0
0
0
684
0
0
23
022d20ed03d831aaada101ae2cab7e00cafb2ea8
30,512
py
Python
head_tracker.py
kalleknast/head-tracker
df06cc71e1f36d7c752d82f94a010b5258fd1fb9
[ "Apache-2.0" ]
2
2019-06-03T17:21:46.000Z
2021-05-27T04:48:24.000Z
head_tracker.py
kalleknast/head-tracker
df06cc71e1f36d7c752d82f94a010b5258fd1fb9
[ "Apache-2.0" ]
null
null
null
head_tracker.py
kalleknast/head-tracker
df06cc71e1f36d7c752d82f94a010b5258fd1fb9
[ "Apache-2.0" ]
1
2017-03-30T08:23:11.000Z
2017-03-30T08:23:11.000Z
# -*- coding: utf-8 -*- """ Created on Sat Jul 30 15:20:09 2016 @author: hjalmar """ import matplotlib matplotlib.use('Agg')
41.740082
181
0.470897
# -*- coding: utf-8 -*- """ Created on Sat Jul 30 15:20:09 2016 @author: hjalmar """ import tensorflow as tf from ht_helper import HeSD, angle2class, FrameStepper, class2angle, whiten from ht_helper import anglediff, get_max_gaze_line, CountdownPrinter from ht_helper import angles2complex, complex2angles, softmax, get...
0
0
0
29,807
0
0
0
187
343
138027569280d43b0a88e865f59f229b1878cf3b
14,614
py
Python
Py2ExeDecompiler/resources/pyc2.py
kuteminh11/Py2ExeDecompiler
e871e045334074314ab5fc377cfd8955d768c809
[ "Apache-2.0" ]
175
2017-04-25T21:58:42.000Z
2022-03-28T19:19:46.000Z
Py2ExeDecompiler/resources/pyc2.py
nsxz/Py2ExeDecompiler
e871e045334074314ab5fc377cfd8955d768c809
[ "Apache-2.0" ]
2
2017-04-27T11:31:43.000Z
2018-04-02T05:54:01.000Z
Py2ExeDecompiler/resources/pyc2.py
nsxz/Py2ExeDecompiler
e871e045334074314ab5fc377cfd8955d768c809
[ "Apache-2.0" ]
36
2017-04-26T17:22:00.000Z
2021-08-08T09:02:42.000Z
import sys from dis import opmap def clean_ROT_TWO(bcg, skip_xrefs=True): ''' Replace two sequential ROT_TWO sequences with NOPS ''' count = 0 for current in bcg.nodes(): if current.next is None: break if current.opcode == opmap['ROT_TWO'] and \ current....
29.053678
115
0.529561
import marshal import imp import struct import os import sys import base64 import new import dis from dis import opmap, opname class Bytecode(): ''' Class to store individual instruction as a node in the graph ''' def __init__(self, addr, buffer, prev=None, next=None, xrefs=[]): self.opcode = ...
0
0
0
9,818
0
2,324
0
-60
269
be8eb67926a73287d11d270f9ad6d308dbf977a1
23,118
py
Python
rotkehlchen/chain/ethereum/modules/liquity/trove.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
137
2018-03-05T11:53:29.000Z
2019-11-03T16:38:42.000Z
rotkehlchen/chain/ethereum/modules/liquity/trove.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
385
2018-03-08T12:43:41.000Z
2019-11-10T09:15:36.000Z
rotkehlchen/chain/ethereum/modules/liquity/trove.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
59
2018-03-08T10:08:27.000Z
2019-10-26T11:30:44.000Z
import logging from typing import TYPE_CHECKING from rotkehlchen.logging import RotkehlchenLogsAdapter if TYPE_CHECKING: MIN_COLL_RATE = '1.1' logger = logging.getLogger(__name__) log = RotkehlchenLogsAdapter(logger)
40.700704
128
0.541483
import logging from collections import defaultdict from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Dict, List, Literal, NamedTuple, Optional from eth_utils import to_checksum_address from gevent.lock import Semaphore from rotkehlchen.accounting.structures.balance import AssetBalance, Balance ...
0
2,290
0
18,867
0
0
0
1,010
723
09649fc65519ebd7fff4291f0c134bd3591e2f27
792
py
Python
accounts/api/views.py
mcastellin/anem-per-feina
5c7072c560e8e34355f7bbf7db12e36403766e68
[ "MIT" ]
null
null
null
accounts/api/views.py
mcastellin/anem-per-feina
5c7072c560e8e34355f7bbf7db12e36403766e68
[ "MIT" ]
null
null
null
accounts/api/views.py
mcastellin/anem-per-feina
5c7072c560e8e34355f7bbf7db12e36403766e68
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model User = get_user_model()
33
80
0.768939
from rest_framework import decorators, permissions, response, status from rest_framework.request import Request from django.contrib.auth import get_user_model from django.utils.translation import ugettext as _ from .serializers import UserCreateSerializer User = get_user_model() @decorators.api_view(["POST"]) @dec...
0
485
0
0
0
0
0
121
112
3863645c8e2604383c3376d4ce87e6f9580e9466
1,526
py
Python
Blog/migrations/0002_multimedia_news_posttags.py
softrebel/djangoBlog
1c93d15788b37cf3fd53479419064dcaa234ecad
[ "MIT" ]
null
null
null
Blog/migrations/0002_multimedia_news_posttags.py
softrebel/djangoBlog
1c93d15788b37cf3fd53479419064dcaa234ecad
[ "MIT" ]
null
null
null
Blog/migrations/0002_multimedia_news_posttags.py
softrebel/djangoBlog
1c93d15788b37cf3fd53479419064dcaa234ecad
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-31 16:43
38.15
114
0.577326
# Generated by Django 2.1.7 on 2019-03-31 16:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('Blog', '0001_initial'), ] operations = [ migrations.CreateModel( name='MultiMedia', ...
0
0
0
1,379
0
0
0
30
68
183886fe1e13ac8ce545eb2db5d498e15f3c866e
8,435
py
Python
qiskit/transpiler/passes/optimization/consolidate_blocks.py
HuangJunye/qiskit-terra
0c8bb3dbf8d688590431ca79a83ba8aede84ed20
[ "Apache-2.0" ]
null
null
null
qiskit/transpiler/passes/optimization/consolidate_blocks.py
HuangJunye/qiskit-terra
0c8bb3dbf8d688590431ca79a83ba8aede84ed20
[ "Apache-2.0" ]
2
2022-03-30T10:09:44.000Z
2022-03-30T10:09:45.000Z
qiskit/transpiler/passes/optimization/consolidate_blocks.py
HuangJunye/qiskit-terra
0c8bb3dbf8d688590431ca79a83ba8aede84ed20
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
44.867021
90
0.583521
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
0
0
0
7,333
0
0
0
306
200
a41c6af363966da210561bb7fd8f3b3ce7b0c46e
891
py
Python
apps/auth/migrations/0002_websettings.py
realnoobs/wagtail_simple_blog
01b35153f6dd90e9c12234a5aaae8eebe3940f37
[ "MIT" ]
null
null
null
apps/auth/migrations/0002_websettings.py
realnoobs/wagtail_simple_blog
01b35153f6dd90e9c12234a5aaae8eebe3940f37
[ "MIT" ]
null
null
null
apps/auth/migrations/0002_websettings.py
realnoobs/wagtail_simple_blog
01b35153f6dd90e9c12234a5aaae8eebe3940f37
[ "MIT" ]
null
null
null
# Generated by Django 3.2.10 on 2021-12-24 07:16
33
131
0.606061
# Generated by Django 3.2.10 on 2021-12-24 07:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0066_collection_management_permissions'), ('authentication', '0001_initial'), ] operations ...
0
0
0
743
0
0
0
30
68
b442fb3307b5147128f913d2434d01da33a6bf32
12,664
py
Python
feichangzun/allflight.py
Octoberr/feivhangzunpac
af080c9fac777b80c053ce187b8eec6e4b29b2e5
[ "Apache-2.0" ]
null
null
null
feichangzun/allflight.py
Octoberr/feivhangzunpac
af080c9fac777b80c053ce187b8eec6e4b29b2e5
[ "Apache-2.0" ]
null
null
null
feichangzun/allflight.py
Octoberr/feivhangzunpac
af080c9fac777b80c053ce187b8eec6e4b29b2e5
[ "Apache-2.0" ]
null
null
null
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 ' '(KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0'} feichangzun = 'http://www.variflight.com' allUrl = "http://www.variflight.com/sitemap.html?AE71649A58c77=" pausetime = 1000 if __n...
44.591549
108
0.52669
import requests from bs4 import BeautifulSoup from time import sleep from retrying import retry import json import re import pymongo import datetime from feichangzun import config headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 ' '(KHTML, like Gecko) Chrome/...
231
7,619
0
4,178
0
0
0
-18
245
3c6e114d1d7026284730233e91143fd1decf8300
1,103
py
Python
Gauss_elimination.py
subhamkd/Numerical-methods-Grad
0d89e56de3d8db6b0b16b79711ac5559e111f5bf
[ "MIT" ]
null
null
null
Gauss_elimination.py
subhamkd/Numerical-methods-Grad
0d89e56de3d8db6b0b16b79711ac5559e111f5bf
[ "MIT" ]
null
null
null
Gauss_elimination.py
subhamkd/Numerical-methods-Grad
0d89e56de3d8db6b0b16b79711ac5559e111f5bf
[ "MIT" ]
null
null
null
from numpy import zeros n=6 # number of equations A=[[10.0, -1.0, 4.0, 0.0, 2.0, 9.0, 19.0], [0.0, 25.0, -2.0, 7.0, 8.0, 4.0, 2.0], [1.0, 0.0, 15.0, 7.0, 3.0, -2.0, 13.0], [6.0, -1.0, 2.0, 23.0, 0.0, 8.0, -7.0], [-4.0, 2.0, 0.0, 5.0, -25.0, 3.0, -9.0], [0.0, 7.0, -1.0, 5.0, 4.0, -22.0, 2.0]] #the augmented matrix x = ...
30.638889
264
0.468722
from numpy import zeros import time def GE(A): # function for determining solution using Gaussian Elimination # Forward Elimination step start=time.time() for i in range(n): if A[i][i] == 0.0: t=A[i] A[i]=A[i+1] A[i+1]=t for j in range(i+1, n): ...
0
0
0
0
0
704
0
-10
45
39d574e23e5afc9e16a82e90c23924da5242a6a9
3,290
py
Python
ML_prep-master/ML_prep-master/Practical_Coding_Challenges/Solutions/Tic_Tac_Toe_EX3.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
1
2022-01-01T07:18:42.000Z
2022-01-01T07:18:42.000Z
ML_prep-master/ML_prep-master/Practical_Coding_Challenges/Solutions/Tic_Tac_Toe_EX3.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
null
null
null
ML_prep-master/ML_prep-master/Practical_Coding_Challenges/Solutions/Tic_Tac_Toe_EX3.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
null
null
null
""" Code up the game tic tac toe 1 class solution """ if __name__ == "__main__": t = TicTacToe() t.print_board() t.play_game()
26.967213
120
0.518541
""" Code up the game tic tac toe 1 class solution """ class TicTacToe(): def __init__(self): self.board = self.create_board() self.current = 'X' def create_board(self): "Create the board for Tic Tac Toe" board = [['', '', ''], ['', '', ''], [...
0
0
0
3,126
0
0
0
0
23
afc3f86a3c27c3e0823794ed1f7c2e0e76c6fd50
372
py
Python
data/contacts.py
anreysolovyev/python_training
ab109a4a64997ea4a668ec7004c2169d962c8d61
[ "Apache-2.0" ]
null
null
null
data/contacts.py
anreysolovyev/python_training
ab109a4a64997ea4a668ec7004c2169d962c8d61
[ "Apache-2.0" ]
null
null
null
data/contacts.py
anreysolovyev/python_training
ab109a4a64997ea4a668ec7004c2169d962c8d61
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact testdata = [ Contact(firstname="name1", lastname="lastname1", middlename="middlename1", nickname="nickname1", title="title1", company="company1", address="address1", homephone="homephone1", mobilephone="mobphone1", workphone="workphone1", fax="f...
41.333333
91
0.680108
from model.contact import Contact testdata = [ Contact(firstname="name1", lastname="lastname1", middlename="middlename1", nickname="nickname1", title="title1", company="company1", address="address1", homephone="homephone1", mobilephone="mobphone1", workphone="workphone1", fax="f...
0
0
0
0
0
0
0
0
0
d9220984cf73f571b9944f46ad7558d5aec58bfd
20,880
py
Python
ukpsummarizer-be/cplex/python/docplex/docplex/cp/config.py
avineshpvs/vldb2018-sherlock
5e116f42f44c50bcb289be3c4b4b76e29b238c18
[ "Apache-2.0" ]
2
2019-01-13T08:41:00.000Z
2021-03-27T22:55:10.000Z
ukpsummarizer-be/cplex/python/docplex/docplex/cp/config.py
AIPHES/vldb2018-sherlock
3746efa35c4c1769cc4aaeb15aeb9453564e1226
[ "Apache-2.0" ]
null
null
null
ukpsummarizer-be/cplex/python/docplex/docplex/cp/config.py
AIPHES/vldb2018-sherlock
3746efa35c4c1769cc4aaeb15aeb9453564e1226
[ "Apache-2.0" ]
4
2018-11-06T16:12:55.000Z
2019-08-21T13:22:32.000Z
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- """ Configurati...
39.028037
143
0.669109
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- """ Configurati...
0
0
0
0
0
92
0
0
25
fe805a61b2b33eac84f19857fd056154b9478764
2,175
py
Python
pysol_cards/random_base.py
thesamesam/pysol_cards
55aeb94601a9f652b0e6001bf8c24179f5eccd27
[ "MIT" ]
4
2019-06-20T17:00:46.000Z
2021-09-01T22:34:37.000Z
pysol_cards/random_base.py
thesamesam/pysol_cards
55aeb94601a9f652b0e6001bf8c24179f5eccd27
[ "MIT" ]
4
2020-03-08T07:09:51.000Z
2021-11-25T07:09:25.000Z
pysol_cards/random_base.py
thesamesam/pysol_cards
55aeb94601a9f652b0e6001bf8c24179f5eccd27
[ "MIT" ]
1
2021-08-05T20:11:42.000Z
2021-08-05T20:11:42.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright 2019 Shlomi Fish <shlomif@cpan.org> # # Distributed under terms of the MIT license.
24.715909
76
0.584368
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2019 Shlomi Fish <shlomif@cpan.org> # # Distributed under terms of the MIT license. from pysol_cards.errors import SubclassResponsibility class RandomBase(object): DEALS_PYSOL = 0 DEALS_PYSOLFC = 1 DEALS_MS = 2 MAX_SEED ...
2
0
0
1,932
0
0
0
32
46
49b12c74814b733e89f12d59c80b0437328d4604
2,767
py
Python
conceptnet5/builders/morphology.py
CollectiWise/conceptnet
2998df5a9d287ca72032abb1d9b082747ba97c08
[ "Apache-2.0" ]
1
2018-11-27T17:00:57.000Z
2018-11-27T17:00:57.000Z
conceptnet5/builders/morphology.py
MattCurryCom/conceptnet5
a16d94e635aee3d35a22aa04fcad7bb87ce927d8
[ "Apache-2.0" ]
null
null
null
conceptnet5/builders/morphology.py
MattCurryCom/conceptnet5
a16d94e635aee3d35a22aa04fcad7bb87ce927d8
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict from conceptnet5.edges import make_edge from conceptnet5.formats.msgpack_stream import MsgpackStreamWriter from conceptnet5.languages import ATOMIC_SPACE_LANGUAGES from conceptnet5.nodes import split_uri from conceptnet5.uri import get_uri_language, join_uri, Licenses def prepare_...
38.430556
79
0.648356
from collections import defaultdict from conceptnet5.edges import make_edge from conceptnet5.formats.msgpack_stream import MsgpackStreamWriter from conceptnet5.languages import ATOMIC_SPACE_LANGUAGES from conceptnet5.nodes import split_uri from conceptnet5.uri import get_uri_language, join_uri, Licenses def prepare_...
0
0
0
0
0
0
0
0
0
94f484cca39d83c812666097b2a837e523ddf6b0
1,324
py
Python
src/timeset/month.py
eeriksp/timeset
7ac68a3e619057571c77680fe9e12f56fe77f641
[ "MIT" ]
1
2021-06-06T20:17:23.000Z
2021-06-06T20:17:23.000Z
src/timeset/month.py
eeriksp/timeset
7ac68a3e619057571c77680fe9e12f56fe77f641
[ "MIT" ]
null
null
null
src/timeset/month.py
eeriksp/timeset
7ac68a3e619057571c77680fe9e12f56fe77f641
[ "MIT" ]
null
null
null
from __future__ import annotations
33.1
101
0.695619
from __future__ import annotations from calendar import monthrange from datetime import timedelta, date from .timerange import TimeRange from .date_range import daterange class CalendarMonth(TimeRange): """ Represent a calendar month. """ def __init__(self, year: int, month: int): date_rang...
0
622
0
505
0
0
0
48
113
46a2f6aa0d4a527286f097b05049619ed6808a58
1,008
py
Python
no_covers/migrations/0001_initial.py
qiwiGremL1n/blog
2ed534c0c62d91603f39da6b1c7e421b1cbf4047
[ "MIT" ]
null
null
null
no_covers/migrations/0001_initial.py
qiwiGremL1n/blog
2ed534c0c62d91603f39da6b1c7e421b1cbf4047
[ "MIT" ]
null
null
null
no_covers/migrations/0001_initial.py
qiwiGremL1n/blog
2ed534c0c62d91603f39da6b1c7e421b1cbf4047
[ "MIT" ]
null
null
null
# Generated by Django 2.0.2 on 2018-02-06 22:35
36
149
0.595238
# Generated by Django 2.0.2 on 2018-02-06 22:35 from django.db import migrations, models import markupfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Book', fields=[ (...
0
0
0
868
0
0
0
23
68
baab3036b38177c9996cbcb4a9f5047bed5ed26e
94
py
Python
Custom middleware for user to autometically logout after xx.xx.xx time/BlogSite/blogPosts/admin.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
2
2020-02-14T19:23:50.000Z
2020-04-19T08:26:38.000Z
Custom middleware for user to autometically logout after xx.xx.xx time/BlogSite/blogPosts/admin.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
42
2021-02-02T23:08:30.000Z
2022-03-12T00:54:55.000Z
Project _ 2 -- BlogSite/blogPosts/admin.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
1
2022-03-07T08:09:41.000Z
2022-03-07T08:09:41.000Z
from django.contrib import admin from .models import blogPost admin.site.register(blogPost)
15.666667
32
0.819149
from django.contrib import admin from .models import blogPost admin.site.register(blogPost)
0
0
0
0
0
0
0
0
0
0774a8fc8155745e2ffce489ba770491adbcd7b9
68
py
Python
resources/colours.py
PyBot-Development/PyBot-v4
7fb821940bf43ded7d6996342b83afda4174d36e
[ "MIT" ]
null
null
null
resources/colours.py
PyBot-Development/PyBot-v4
7fb821940bf43ded7d6996342b83afda4174d36e
[ "MIT" ]
null
null
null
resources/colours.py
PyBot-Development/PyBot-v4
7fb821940bf43ded7d6996342b83afda4174d36e
[ "MIT" ]
null
null
null
red = 0xff3d3d green = 0xb8ff3d blue = 0x2e66ff yellow = 0xfff94d
17
17
0.735294
red = 0xff3d3d green = 0xb8ff3d blue = 0x2e66ff yellow = 0xfff94d
0
0
0
0
0
0
0
0
0
07944afff49fa24e07a81620b7148f2200f931cc
10,403
py
Python
pyscf/sgx/sgx.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
1
2021-11-12T11:55:25.000Z
2021-11-12T11:55:25.000Z
pyscf/sgx/sgx.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
36
2018-08-22T19:44:03.000Z
2020-05-09T10:02:36.000Z
pyscf/sgx/sgx.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
4
2018-02-14T16:28:28.000Z
2019-08-12T16:40:30.000Z
#!/usr/bin/env python # Copyright 2018-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
33.775974
89
0.604249
#!/usr/bin/env python # Copyright 2018-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
0
194
0
6,504
0
0
0
17
204
d9fe37ca4723be9704a492674ba8604c492b90eb
9,975
py
Python
gobbli/model/base.py
RTIInternational/gobbli
d9ec8132f74ce49dc4bead2fad25b661bcef6e76
[ "Apache-2.0" ]
276
2019-09-13T08:25:51.000Z
2022-03-05T13:07:55.000Z
gobbli/model/base.py
RTIInternational/gobbli
d9ec8132f74ce49dc4bead2fad25b661bcef6e76
[ "Apache-2.0" ]
15
2019-09-06T14:05:30.000Z
2022-01-01T20:15:06.000Z
gobbli/model/base.py
RTIInternational/gobbli
d9ec8132f74ce49dc4bead2fad25b661bcef6e76
[ "Apache-2.0" ]
24
2019-09-18T15:11:42.000Z
2021-12-23T18:59:55.000Z
import logging LOGGER = logging.getLogger(__name__) _WEIGHTS_DIR_NAME = "weights"
34.756098
105
0.602907
import logging import warnings from abc import ABC, abstractmethod from pathlib import Path from timeit import default_timer as timer from typing import Any, Dict, Optional import docker from gobbli.model.context import ContainerTaskContext from gobbli.util import ( format_duration, generate_uuid, gobbli_...
0
2,797
0
6,681
0
0
0
210
201
4bfd526d716c81fc787d1b1f9508eebc364bffcb
2,631
py
Python
aws_gate/list.py
gnought/aws-gate
20728e0926e6eb36b5f6a6c8ed91b21c010674c8
[ "BSD-3-Clause" ]
null
null
null
aws_gate/list.py
gnought/aws-gate
20728e0926e6eb36b5f6a6c8ed91b21c010674c8
[ "BSD-3-Clause" ]
null
null
null
aws_gate/list.py
gnought/aws-gate
20728e0926e6eb36b5f6a6c8ed91b21c010674c8
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- # pylint: disable=unused-argument
30.952941
118
0.733561
# -*- encoding: utf-8 -*- import csv import io import itertools import json from aws_gate.constants import ( AWS_DEFAULT_PROFILE, AWS_DEFAULT_REGION, DEFAULT_LIST_OUTPUT_FIELDS, DEFAULT_LIST_HUMAN_FIELDS, DEFAULT_LIST_OUTPUT, ) from aws_gate.query import get_multiple_instance_details from aws_gate....
0
0
0
0
0
2,074
0
198
292
c5d1832646589e3f5dff30fb1dbb0792478ae215
3,630
py
Python
network_test/network_test/suites/node.py
kkkkv/tgnms
a3b8fd8a69b647a614f9856933f05e50a4affadf
[ "MIT" ]
12
2021-04-06T06:27:18.000Z
2022-03-18T10:52:29.000Z
network_test/network_test/suites/node.py
kkkkv/tgnms
a3b8fd8a69b647a614f9856933f05e50a4affadf
[ "MIT" ]
6
2022-01-04T13:32:16.000Z
2022-03-28T21:13:59.000Z
network_test/network_test/suites/node.py
kkkkv/tgnms
a3b8fd8a69b647a614f9856933f05e50a4affadf
[ "MIT" ]
7
2021-09-27T13:14:42.000Z
2022-03-28T16:24:15.000Z
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved.
38.617021
87
0.599449
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import logging import random from typing import Any, Dict, List, Set from terragraph_thrift.Controller.ttypes import IperfTransportProtocol from terragraph_thrift.Topology.ttypes import NodeStatusType from tglib.clients import APIServiceCl...
0
0
2,485
650
0
0
0
191
224
31490150ab82b1e45f821526838a643a9c49233f
1,449
py
Python
Medium/228_2.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Medium/228_2.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Medium/228_2.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 228. Summary Ranges # # Description: # # Version: 2.0 # 09/25/18 by Jianfa # ------------------------------ # Used for testing if __name__ == "__main__": test = Solution() # ------------------------------ # Summary: #
28.98
107
0.461698
# ------------------------------ # 228. Summary Ranges # # Description: # # Version: 2.0 # 09/25/18 by Jianfa # ------------------------------ class Solution(object): def summaryRanges(self, nums): """ :type nums: List[int] :rtype: List[str] The idea is use two pointers: ...
0
0
0
1,147
0
0
0
0
23
7f91f182a8ad028e09282b1a10aa2772dc367306
208
py
Python
using_name.py
miaoyinnu/-
039251f08398ebd18847e44bf8fd07e1178b5688
[ "MIT" ]
null
null
null
using_name.py
miaoyinnu/-
039251f08398ebd18847e44bf8fd07e1178b5688
[ "MIT" ]
null
null
null
using_name.py
miaoyinnu/-
039251f08398ebd18847e44bf8fd07e1178b5688
[ "MIT" ]
null
null
null
if __name__ == '__main__': print("This is program is being run by itself") else: print("i am being imported from another module") from mymodule import sayhi, version sayhi() print("Verison",version)
20.8
52
0.721154
if __name__ == '__main__': print("This is program is being run by itself") else: print("i am being imported from another module") from mymodule import sayhi,version sayhi() print("Verison",version)
0
0
0
0
0
0
0
-1
0
56ab80db150e9ad8631da73911e4034c96bd9870
5,890
py
Python
q2t/thermo.py
cgrambow/q2t
ab62d8840e1f7bfa30d0dfaa234ad86db0833809
[ "MIT" ]
null
null
null
q2t/thermo.py
cgrambow/q2t
ab62d8840e1f7bfa30d0dfaa234ad86db0833809
[ "MIT" ]
null
null
null
q2t/thermo.py
cgrambow/q2t
ab62d8840e1f7bfa30d0dfaa234ad86db0833809
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- import rmgpy.constants as constants # Experimental heats of formation of atoms (kcal/mol) h0expt = {'H': 51.63, 'C': 169.98, 'N': 112.53, 'O': 58.99} h298corr = {'H': 1.01, 'C': 0.25, 'N': 1.04, 'O': 1.04} ...
32.541436
117
0.605772
#!/usr/bin/env python # -*- coding:utf-8 -*- import numpy as np import rmgpy.constants as constants from rmgpy.statmech import Conformer, IdealGasTranslation, LinearRotor, NonlinearRotor, HarmonicOscillator from rmgpy.qm.qmdata import QMData from rmgpy.qm.symmetry import PointGroupCalculator from .qchem import QChem...
0
0
0
0
0
3,460
0
182
179
985e48804eec16912f6e851e88c72504c2821d39
118
py
Python
kokki/cookbooks/pip/recipes/default.py
samuel/kokki
da98da55e0bba8db5bda993666a43c6fdc4cacdb
[ "BSD-3-Clause" ]
11
2015-01-14T00:43:26.000Z
2020-12-29T06:12:51.000Z
kokki/cookbooks/pip/recipes/default.py
samuel/kokki
da98da55e0bba8db5bda993666a43c6fdc4cacdb
[ "BSD-3-Clause" ]
null
null
null
kokki/cookbooks/pip/recipes/default.py
samuel/kokki
da98da55e0bba8db5bda993666a43c6fdc4cacdb
[ "BSD-3-Clause" ]
3
2015-01-14T01:05:56.000Z
2019-01-26T05:09:37.000Z
from kokki import Package Package("pip", provider = "kokki.providers.package.easy_install.EasyInstallProvider" )
19.666667
73
0.779661
from kokki import Package Package("pip", provider = "kokki.providers.package.easy_install.EasyInstallProvider" )
0
0
0
0
0
0
0
0
0
b8914ec4eb38cef59aa4da0cb839ebb5c3b4206a
154
py
Python
siteprefs/signals.py
jayvdb/django-siteprefs
9cb3026b94a98299d60ccb61baf567b3d0c64a2f
[ "BSD-3-Clause" ]
null
null
null
siteprefs/signals.py
jayvdb/django-siteprefs
9cb3026b94a98299d60ccb61baf567b3d0c64a2f
[ "BSD-3-Clause" ]
null
null
null
siteprefs/signals.py
jayvdb/django-siteprefs
9cb3026b94a98299d60ccb61baf567b3d0c64a2f
[ "BSD-3-Clause" ]
null
null
null
from django.dispatch import Signal prefs_save = Signal(providing_args=['app', 'updated_prefs']) """Issued when dynamic preferences models are saved."""
25.666667
60
0.766234
from django.dispatch import Signal prefs_save = Signal(providing_args=['app', 'updated_prefs']) """Issued when dynamic preferences models are saved."""
0
0
0
0
0
0
0
0
0
7b427d803546e23638833b9f5efc283b9528d9c6
2,779
py
Python
question/migrations/0001_initial.py
abrehman90/Student-Portal-LMS-in-Django
fe5f338e309deb7aeaa10d9ff5c60fcdc3844ee1
[ "MIT" ]
2
2021-09-17T04:10:57.000Z
2021-12-15T03:47:21.000Z
question/migrations/0001_initial.py
abrehman90/Student-Portal-LMS-in-Django
fe5f338e309deb7aeaa10d9ff5c60fcdc3844ee1
[ "MIT" ]
null
null
null
question/migrations/0001_initial.py
abrehman90/Student-Portal-LMS-in-Django
fe5f338e309deb7aeaa10d9ff5c60fcdc3844ee1
[ "MIT" ]
1
2021-07-12T06:42:13.000Z
2021-07-12T06:42:13.000Z
# Generated by Django 3.2.3 on 2021-06-13 05:29
44.822581
148
0.611011
# Generated by Django 3.2.3 on 2021-06-13 05:29 import ckeditor.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
0
0
0
2,576
0
0
0
42
112
4ca73c7ffad9ba15f8c868f25c0c291b4e13401f
1,322
py
Python
unmaintain/benchmark/benchmark_asyncio_postgres.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
1,176
2019-12-24T01:51:22.000Z
2022-03-29T06:00:25.000Z
unmaintain/benchmark/benchmark_asyncio_postgres.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
33
2020-03-06T03:29:46.000Z
2022-03-11T06:24:26.000Z
unmaintain/benchmark/benchmark_asyncio_postgres.py
zuzhi/rssant
06d985845f6af3be7097e6d718afba7eeb195ec8
[ "BSD-3-Clause" ]
110
2019-12-29T05:49:24.000Z
2022-03-28T06:44:21.000Z
import asyncio import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) dsn = 'dbname=rssant user=rssant password=rssant host=127.0.0.1' loop = asyncio.get_event_loop() loop.run_until_complete(run_aiopg()) loop = asyncio.get_event_loop() loop.run_until_complete(run_asyncpg())
26.44
64
0.596823
import time import asyncio import aiopg import uvloop import asyncpg asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) dsn = 'dbname=rssant user=rssant password=rssant host=127.0.0.1' async def run_aiopg(): pool = await aiopg.create_pool(dsn, minsize=5, maxsize=5) t0 = time.time() for i in range...
0
0
937
0
0
0
0
-26
112
2fcaa636cb43ac39470731a033ff7cb7d8b1c199
60,972
py
Python
deepviz.py
YilongJu/Implicit-Bias-towards-the-Kernel-RegimeCauses-Mode-Collapse-in-GANs
983fcfde19c17b4d61223df8d7433c286db6b3db
[ "MIT" ]
null
null
null
deepviz.py
YilongJu/Implicit-Bias-towards-the-Kernel-RegimeCauses-Mode-Collapse-in-GANs
983fcfde19c17b4d61223df8d7433c286db6b3db
[ "MIT" ]
null
null
null
deepviz.py
YilongJu/Implicit-Bias-towards-the-Kernel-RegimeCauses-Mode-Collapse-in-GANs
983fcfde19c17b4d61223df8d7433c286db6b3db
[ "MIT" ]
null
null
null
# use("Qt5Agg") # use('TkAgg') import mpl_toolkits.axisartist.floating_axes as floating_axes # Not explicitly used, but necessary from matplotlib import pyplot as plt import os import platform os.environ['KMP_DUPLICATE_LIB_OK']='True' plt.rcParams['savefig.facecolor'] = "0.8" if platform.system() == "Darwin": ...
61.34004
384
0.599439
from matplotlib import use # use("Qt5Agg") # use('TkAgg') from mpl_toolkits.mplot3d import Axes3D # Not explicitly used, but necessary from matplotlib.transforms import Affine2D # Not explicitly used, but necessary import mpl_toolkits.axisartist.floating_axes as floating_axe...
0
0
0
57,891
644
811
0
87
586
16846bb53e261f3f34ae5b20388fb957aa7b755f
2,126
py
Python
setup.py
melissaboiko/uniscripts
e2daf1a52f307cda3a22387162d098dc98b0d4ad
[ "CC0-1.0" ]
7
2015-05-11T19:53:12.000Z
2017-11-10T23:45:18.000Z
setup.py
leoboiko/uniscripts
e2daf1a52f307cda3a22387162d098dc98b0d4ad
[ "CC0-1.0" ]
1
2021-12-06T13:01:19.000Z
2021-12-06T13:46:21.000Z
setup.py
leoboiko/uniscripts
e2daf1a52f307cda3a22387162d098dc98b0d4ad
[ "CC0-1.0" ]
1
2021-10-17T08:51:01.000Z
2021-10-17T08:51:01.000Z
"""setuptools module for uniscripts. """ # Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # adapted from https://coderwall.com/p/qawuyq/use-markdown-readme-s-in-python-modules ...
27.973684
105
0.651929
"""setuptools module for uniscripts. """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # adapted from https://coderwall.com/p/qawuyq/use-markdown-readme-s-in-...
0
0
0
0
0
0
0
15
0
4c269b3844a3d702eeb602612791e1b874638e1f
236
py
Python
2020/sparta08/0614/homework/myShop/init.py
loveAlakazam/TIL
e4f887bc1a6cf5639c361656e22abbe8ccfa314b
[ "Apache-2.0" ]
1
2020-06-22T02:51:11.000Z
2020-06-22T02:51:11.000Z
2020/sparta08/0614/homework/myShop/init.py
loveAlakazam/TIL
e4f887bc1a6cf5639c361656e22abbe8ccfa314b
[ "Apache-2.0" ]
1
2020-10-19T12:22:30.000Z
2020-10-19T12:22:30.000Z
2020/sparta08/0614/homework/myShop/init.py
loveAlakazam/TIL
e4f887bc1a6cf5639c361656e22abbe8ccfa314b
[ "Apache-2.0" ]
1
2020-12-19T12:46:26.000Z
2020-12-19T12:46:26.000Z
from pymongo import MongoClient client= MongoClient('localhost', 27017) db=client.db_cek if __name__=='__main__': main()
16.857143
39
0.686441
from pymongo import MongoClient client= MongoClient('localhost', 27017) db=client.db_cek def delete_all(): # 데이터베이스 안에 있는 것들을 모두 지운다. db.orders.delete_many({}) def main(): delete_all() if __name__=='__main__': main()
54
0
0
0
0
46
0
0
46
501ac2a7e8cb9f4c023963af10abb5799f160092
136
py
Python
measurement/array-operations/vmul3.py
quepas/performance-estimation-array-operations
b209ba5efebf5dee60ec5fca0fa711ca2e766e17
[ "MIT" ]
null
null
null
measurement/array-operations/vmul3.py
quepas/performance-estimation-array-operations
b209ba5efebf5dee60ec5fca0fa711ca2e766e17
[ "MIT" ]
null
null
null
measurement/array-operations/vmul3.py
quepas/performance-estimation-array-operations
b209ba5efebf5dee60ec5fca0fa711ca2e766e17
[ "MIT" ]
null
null
null
# Element-wise multiplication of three vectors
19.428571
46
0.698529
import numpy as np # Element-wise multiplication of three vectors def vmul3(V1, V2, V3): R = np.multiply(V1, np.multiply(V2, V3))
0
0
0
0
0
46
0
-3
44