hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
5431e40cf94a88341629a34f7423dff257d33bc7
13,705
py
Python
data_steward/cdr_cleaner/cleaning_rules/measurement_table_suppression.py
ratuagga/curation
047b984f20643e21bf3ab1e309903abaf816ecd5
[ "MIT" ]
1
2019-03-18T18:22:41.000Z
2019-03-18T18:22:41.000Z
data_steward/cdr_cleaner/cleaning_rules/measurement_table_suppression.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
null
null
null
data_steward/cdr_cleaner/cleaning_rules/measurement_table_suppression.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
1
2021-09-16T14:25:19.000Z
2021-09-16T14:25:19.000Z
""" Removing irrelevant observation records from the RDR dataset. Original Issue: DC-481, 699 The intent is to clean data in the measurement table. The rule intends to reset invalid fields values to null, drop records that do not provide meaningful data, and drop duplicate records. """ # Python Imports import loggin...
37.651099
173
0.667056
e48acc6cd30ca365c381557de5bb8b05ce37398d
1,903
py
Python
tests/test_coax.py
BetaPollux/EMToolbox
c9e8e06dd45b764fe7f29f0118c78cf3ae31a4a8
[ "MIT" ]
1
2021-02-19T22:36:14.000Z
2021-02-19T22:36:14.000Z
tests/test_coax.py
BetaPollux/EMToolbox
c9e8e06dd45b764fe7f29f0118c78cf3ae31a4a8
[ "MIT" ]
null
null
null
tests/test_coax.py
BetaPollux/EMToolbox
c9e8e06dd45b764fe7f29f0118c78cf3ae31a4a8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 '''Test TLine Coax functions''' import math from pytest import approx import emtoolbox.tline.coax as coax import emtoolbox.utils.conversions as convert import emtoolbox.utils.constants as const FREQ = 100e6 W = 2 * math.pi * FREQ EPSR = 2.3 RADIUS_W = convert.meters_from_mils(16) RADIUS_S = conver...
27.57971
75
0.712559
e53a114bd5dbf81fdf7ba717dd01ea93e5b84065
5,669
py
Python
robocop/checkers/__init__.py
MalikMlitat/robotframework-robocop
615d535f30e72a8638a6084a692f683b97ee1fcb
[ "Apache-2.0" ]
null
null
null
robocop/checkers/__init__.py
MalikMlitat/robotframework-robocop
615d535f30e72a8638a6084a692f683b97ee1fcb
[ "Apache-2.0" ]
2
2021-11-04T20:27:48.000Z
2022-03-24T00:23:54.000Z
robocop/checkers/__init__.py
MalikMlitat/robotframework-robocop
615d535f30e72a8638a6084a692f683b97ee1fcb
[ "Apache-2.0" ]
null
null
null
""" Robocop rules are internally grouped into checkers. Each checker can scan for multiple related issues (like ``LengthChecker`` checks both for minimum and maximum length of a keyword). You can refer to specific rule reported by checkers by its name or id (for example `too-long-keyword` or `0501`). Checkers are cate...
34.779141
113
0.656553
267cd8c622ef7863a820e02d9f56fb5c310108bf
190
py
Python
PE20.py
TIJMacLean/Project-Euler
a7b7297c9fed2026d063e7f209f9ff61f45f0ccb
[ "Apache-2.0" ]
null
null
null
PE20.py
TIJMacLean/Project-Euler
a7b7297c9fed2026d063e7f209f9ff61f45f0ccb
[ "Apache-2.0" ]
null
null
null
PE20.py
TIJMacLean/Project-Euler
a7b7297c9fed2026d063e7f209f9ff61f45f0ccb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri May 15 00:06:30 2020 @author: Tom """ from math import factorial number = str(factorial(100)) print(number) print(sum([int(i) for i in number]))
15.833333
36
0.657895
5078d3c7316d47ce99d16a0359f5067724af6afd
38,012
py
Python
mesonbuild/rewriter.py
regolith-linux/meson
938e7037319852dd75c9da17c402d6903ab22fe3
[ "Apache-2.0" ]
1
2020-01-03T07:15:50.000Z
2020-01-03T07:15:50.000Z
mesonbuild/rewriter.py
regolith-linux/meson
938e7037319852dd75c9da17c402d6903ab22fe3
[ "Apache-2.0" ]
null
null
null
mesonbuild/rewriter.py
regolith-linux/meson
938e7037319852dd75c9da17c402d6903ab22fe3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2016 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by appli...
39.390674
156
0.567242
3ed53783999823af30b91fa38dd3764fa219c256
3,088
py
Python
core/settings/common.py
themightychris/prevention-point
a92f98b25d32dd30bb33e7cb1ac7f10439f5203f
[ "MIT" ]
1
2020-07-18T02:14:51.000Z
2020-07-18T02:14:51.000Z
core/settings/common.py
themightychris/prevention-point
a92f98b25d32dd30bb33e7cb1ac7f10439f5203f
[ "MIT" ]
null
null
null
core/settings/common.py
themightychris/prevention-point
a92f98b25d32dd30bb33e7cb1ac7f10439f5203f
[ "MIT" ]
1
2020-02-22T18:21:04.000Z
2020-02-22T18:21:04.000Z
""" Django settings for preventionpoint project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ impo...
26.169492
91
0.701425
1567a8bc81286172983347092f627c5cf7988cbc
3,629
py
Python
python_experiments/paper_figures/vldbj/draw_index_update_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_experiments/paper_figures/vldbj/draw_index_update_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_experiments/paper_figures/vldbj/draw_index_update_time.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
import matplotlib.pyplot as plt import numpy as np from data_analysis.vldbj_data_parsing.generate_index_markdown import * def get_name_dict(): with open('data_names.json') as ifs: return eval(''.join(ifs.readlines())) # data set abbreviation dictionary data_names = get_name_dict() # figure parameters ...
34.561905
109
0.628823
2642b0f1c4d7d81e2520c391ca6ecca925d68467
7,508
py
Python
src/compas_blender/conversions/mesh.py
Sam-Bouten/compas
011c7779ded9b69bb602568b470bb0443e336f62
[ "MIT" ]
null
null
null
src/compas_blender/conversions/mesh.py
Sam-Bouten/compas
011c7779ded9b69bb602568b470bb0443e336f62
[ "MIT" ]
null
null
null
src/compas_blender/conversions/mesh.py
Sam-Bouten/compas
011c7779ded9b69bb602568b470bb0443e336f62
[ "MIT" ]
null
null
null
import bpy import bmesh from compas.datastructures import Mesh from compas.geometry import Point from ._geometry import BlenderGeometry class BlenderMesh(BlenderGeometry): """Wrapper for Blender meshes. Examples -------- .. code-block:: python pass """ @property def object(sel...
33.07489
93
0.598428
52255ac7b03099ea5f57578d88a1865bc054d6ba
2,255
py
Python
xlsxwriter/test/comparison/test_chart_axis16.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis16.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis16.py
totdiao/XlsxWriter
3d65858d8933bddb8262d500bcc2005f28fde645
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
27.5
79
0.531707
ddf2cbe644bbef8c11949874032bd8bbb57979b7
7,592
py
Python
symphony/bdk/gen/pod_model/stream_list.py
symphony-elias/symphony-bdk-python
0d1cd94a9982e3687ea52c49acdb5f942ecd9bec
[ "Apache-2.0" ]
17
2018-09-06T09:58:18.000Z
2021-07-13T12:54:20.000Z
symphony/bdk/gen/pod_model/stream_list.py
symphony-elias/symphony-bdk-python
0d1cd94a9982e3687ea52c49acdb5f942ecd9bec
[ "Apache-2.0" ]
59
2018-11-21T15:17:57.000Z
2021-08-03T10:00:43.000Z
symphony/bdk/gen/pod_model/stream_list.py
symphony-elias/symphony-bdk-python
0d1cd94a9982e3687ea52c49acdb5f942ecd9bec
[ "Apache-2.0" ]
37
2018-09-01T03:07:48.000Z
2021-07-06T10:21:50.000Z
""" Pod API This document refers to Symphony API calls that do not need encryption or decryption of content. - sessionToken can be obtained by calling the authenticationAPI on the symphony back end and the key manager respectively. Refer to the methods described in authenticatorAPI.yaml. - Actions are defined...
41.26087
637
0.597866
0ded02dbd45a8b53d8326ab6a12b226ec75dd7ee
8,780
py
Python
DynatraceSyntheticConverter/commands/generate.py
Appdynamics/DynatraceSyntheticConverter
6a43357640a140ac6d0625731175cf3f3a557c0f
[ "Apache-2.0" ]
2
2021-09-06T07:08:02.000Z
2022-01-20T20:37:42.000Z
DynatraceSyntheticConverter/commands/generate.py
Appdynamics/DynatraceSyntheticConverter
6a43357640a140ac6d0625731175cf3f3a557c0f
[ "Apache-2.0" ]
null
null
null
DynatraceSyntheticConverter/commands/generate.py
Appdynamics/DynatraceSyntheticConverter
6a43357640a140ac6d0625731175cf3f3a557c0f
[ "Apache-2.0" ]
3
2021-02-09T19:32:43.000Z
2021-04-19T13:42:36.000Z
import os import re from click import command import glob import json from pathlib import Path import logging CONVERSION_SNIPPET_BASE = 'DynatraceSyntheticConverter/resources/conversionSnippets/' @command( name='generate', help=''' Generate python scripts from Dynatrace synthetic monitor JSON. Gene...
40.460829
130
0.586902
7de39c671abe872e0ac1d88cfa9a40523de61ce8
322
py
Python
vec_env/vec_remove_dict_obs.py
leesharkey/train-procgen-pfrl
16d39132d284a3f826633945694be83dd659d471
[ "Apache-2.0" ]
20
2020-10-27T09:24:20.000Z
2021-07-20T12:22:42.000Z
vec_env/vec_remove_dict_obs.py
leesharkey/train-procgen-pfrl
16d39132d284a3f826633945694be83dd659d471
[ "Apache-2.0" ]
1
2021-04-04T23:59:39.000Z
2021-04-08T18:40:30.000Z
vec_env/vec_remove_dict_obs.py
leesharkey/train-procgen-pfrl
16d39132d284a3f826633945694be83dd659d471
[ "Apache-2.0" ]
1
2021-03-07T19:01:04.000Z
2021-03-07T19:01:04.000Z
from .vec_env import VecEnvObservationWrapper class VecExtractDictObs(VecEnvObservationWrapper): def __init__(self, venv, key): self.key = key super().__init__(venv=venv, observation_space=venv.observation_space.spaces[self.key]) def process(self, obs): return obs[self.key...
26.833333
70
0.695652
b1cc72e889686b228106bab5037c7d98a0ca7e2b
775
py
Python
Version0.2/Python/Gencode/runcode.py
glwagner/Exasim
ee4540443435f958fa2ca78d59cbf9cff0fe69de
[ "MIT" ]
37
2020-12-09T20:24:36.000Z
2022-02-18T17:19:23.000Z
Version0.2/Python/Gencode/runcode.py
glwagner/Exasim
ee4540443435f958fa2ca78d59cbf9cff0fe69de
[ "MIT" ]
25
2020-11-25T20:37:33.000Z
2022-02-25T15:53:11.000Z
Version0.2/Python/Gencode/runcode.py
glwagner/Exasim
ee4540443435f958fa2ca78d59cbf9cff0fe69de
[ "MIT" ]
8
2020-11-30T15:34:06.000Z
2022-01-09T21:06:00.000Z
import os def runcode(app): print("run code..."); mpirun = app['mpirun']; if app['platform'] == "cpu": if app['mpiprocs']==1: mystr = "./app/serial" + app['appname'] + " datain/ dataout/out"; else: mystr = mpirun + " -np " + str(app['mpiprocs']) + " ./app/mpi" + app...
32.291667
120
0.507097
b8cc96e05ebc5ce702aa839784ee990fcba30467
587
py
Python
military-overlay/utils-source-and-test-data/pairwise-test-generation/Complete_test_scripts/scripts/change data source.py
Esri/military-features-data
20ad73fc34385f9ac78bc274e7cab5777980df61
[ "Apache-2.0" ]
35
2015-01-01T16:45:43.000Z
2022-03-05T15:10:46.000Z
military-overlay/utils-source-and-test-data/pairwise-test-generation/Complete_test_scripts/scripts/change data source.py
Esri/military-features-data
20ad73fc34385f9ac78bc274e7cab5777980df61
[ "Apache-2.0" ]
285
2015-01-02T18:03:12.000Z
2019-04-11T04:34:57.000Z
military-overlay/utils-source-and-test-data/pairwise-test-generation/Complete_test_scripts/scripts/change data source.py
Esri/military-features-data
20ad73fc34385f9ac78bc274e7cab5777980df61
[ "Apache-2.0" ]
31
2015-01-01T16:45:44.000Z
2021-09-13T12:16:03.000Z
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # change data source.py # Created on: 2016-08-29 10:26:31.00000 # (generated by ArcGIS/ModelBuilder) # Description: # --------------------------------------------------------------------------- # Import arcpy modul...
30.894737
77
0.575809
c41c8909d025db75790ed493d8ba34a5911c39f8
1,983
py
Python
tests/models/test_train.py
nathdip/unit_testing_python
b9c01f4d4c32f5e5c7b40988ccc7837e8cd5e17f
[ "MIT" ]
null
null
null
tests/models/test_train.py
nathdip/unit_testing_python
b9c01f4d4c32f5e5c7b40988ccc7837e8cd5e17f
[ "MIT" ]
null
null
null
tests/models/test_train.py
nathdip/unit_testing_python
b9c01f4d4c32f5e5c7b40988ccc7837e8cd5e17f
[ "MIT" ]
null
null
null
import pytest import numpy as np import sys from models.train import split_into_training_and_testing_sets # Declare the test class class TestSplitIntoTrainingAndTestingSets(object): # Fill in with the correct mandatory argument def test_on_one_row(self): test_argument = np.array([[1382.0, 390167.0]]) ...
43.108696
120
0.640444
a93f057a249a0371ffa4613d50e19691fdd576e0
9,397
py
Python
mrcnn/config.py
CaelynCheung1996/CLS-Mask_R-CNN
e6a640bfbe0797e9a12d3f903025ca8f5ef6090f
[ "MIT" ]
1
2021-08-09T08:06:59.000Z
2021-08-09T08:06:59.000Z
mrcnn/config.py
comp-imaging-sci/CLS-Mask_R-CNN
e6a640bfbe0797e9a12d3f903025ca8f5ef6090f
[ "MIT" ]
null
null
null
mrcnn/config.py
comp-imaging-sci/CLS-Mask_R-CNN
e6a640bfbe0797e9a12d3f903025ca8f5ef6090f
[ "MIT" ]
null
null
null
""" Mask R-CNN Base Configurations class. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import numpy as np # Base Configuration Class # Don't use this class directly. Instead, sub-class it and override # the configurations you need to chan...
39.483193
80
0.689156
eaec92fa3bc58170d4c0437232e0da3bccb8f274
3,251
py
Python
package/awesome_panel/express/fontawesome/share_link.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
179
2019-12-04T14:54:53.000Z
2022-03-30T09:08:38.000Z
package/awesome_panel/express/fontawesome/share_link.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
62
2019-12-14T16:51:28.000Z
2022-03-19T18:47:12.000Z
package/awesome_panel/express/fontawesome/share_link.py
slamer59/awesome-panel
91c30bd6d6859eadf9c65b1e143952f7e64d5290
[ "Apache-2.0" ]
35
2019-12-08T13:19:53.000Z
2022-03-25T10:33:02.000Z
"""This module provides button to share on social media""" import urllib.parse import panel as pn import param DEFAULT_URL = "https://awesome-panel.org" DEFAULT_CLASS = "fas fa-external-link-alt" DEFAULT_TEXT = "Checkout" FACEBOOK_CLASS = "fab fa-facebook-f" LINKEDIN_CLASS = "fab fa-linkedin-in" TWITTER_CL...
23.056738
98
0.574285
78d9d12b23563627abfef8b8596cdb6fbecf9dbe
1,830
py
Python
backend/db/admin.py
ChansongJo/PsychoLingExperiment
0d731b0552a92127a29df7b5929dcbc54e6c81fb
[ "MIT" ]
null
null
null
backend/db/admin.py
ChansongJo/PsychoLingExperiment
0d731b0552a92127a29df7b5929dcbc54e6c81fb
[ "MIT" ]
7
2020-07-23T07:21:19.000Z
2021-05-30T04:48:57.000Z
backend/db/admin.py
ChansongJo/PsychoLingExperiment
0d731b0552a92127a29df7b5929dcbc54e6c81fb
[ "MIT" ]
null
null
null
from django.contrib import admin from import_export.admin import ImportExportModelAdmin from import_export import resources from backend.db.models import Trial, Subject, Stimulus class TrialResource(resources.ModelResource): class Meta: model = Trial def dehydrate_session_id(self, obj): retur...
31.016949
79
0.708743
de998d5ca6bb3018acfc0429fcc03f941d577d2c
3,102
py
Python
project/cms_menus.py
kremazar/Django
64a29d911f92a24cce84ba928860d94703c88c9e
[ "MIT" ]
null
null
null
project/cms_menus.py
kremazar/Django
64a29d911f92a24cce84ba928860d94703c88c9e
[ "MIT" ]
null
null
null
project/cms_menus.py
kremazar/Django
64a29d911f92a24cce84ba928860d94703c88c9e
[ "MIT" ]
null
null
null
from menus.base import NavigationNode from menus.menu_pool import menu_pool from django.utils.translation import ugettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import Modifier from cms.models import Page class TestMenu(CMSAttachMenu): name = _("test menu") def get_nodes(self, re...
37.373494
108
0.60735
be009f6115bef7e90b9bc196adb39a83603a92bb
2,748
py
Python
backend/constants.py
jak2030/recurse-interview
9920f8b1b0cc4c7b1eed75e3b7c086178ad8b817
[ "MIT" ]
1
2019-07-26T18:40:12.000Z
2019-07-26T18:40:12.000Z
backend/constants.py
jak2030/bardi-b
9920f8b1b0cc4c7b1eed75e3b7c086178ad8b817
[ "MIT" ]
7
2020-09-06T15:46:23.000Z
2022-02-18T06:18:29.000Z
backend/constants.py
jak2030/recurse-coding-exercise
9920f8b1b0cc4c7b1eed75e3b7c086178ad8b817
[ "MIT" ]
null
null
null
import os DATA_DIR = os.getenv("BARDI_B_DATA_DIR") # The directory in which to store all models. MODELS_DIR = os.path.join(DATA_DIR, "models/") # The root directory for all data generated by the app... # TODO: Use a database :P SHAKESPEARE_DATA_DIR = os.path.join(DATA_DIR, "shakespeare/") VILLAINS = [ {"play": ...
45.8
72
0.598253
1327a485957358b1e27a970be2d0cf98ec6a170f
1,891
py
Python
popbl_servicesapp/flask_app/auth/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
popbl_servicesapp/flask_app/auth/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
1
2021-06-02T00:57:11.000Z
2021-06-02T00:57:11.000Z
popbl_servicesapp/flask_app/auth/application/models.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
from sqlalchemy import Column, DateTime, Integer, String, TEXT, ForeignKey from sqlalchemy.orm import relationship from sqlalchemy.sql import func from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class BaseModel(Base): __abstract__ = True creation_date = Column(DateTime(timez...
30.015873
89
0.628239
54c6faced63184f3ceb3d8f31a1f157150c8e909
28,086
py
Python
Fuzzy_clustering/ver_tf2/skopt/searchcv.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/ver_tf2/skopt/searchcv.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/ver_tf2/skopt/searchcv.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
try: from collections.abc import Sized except ImportError: from collections import Sized from collections import defaultdict from functools import partial import numpy as np from scipy.stats import rankdata import sklearn from sklearn.base import is_classifier, clone from joblib import Parallel, delayed from ...
40.645441
79
0.596667
a19c627fc940c953e5199b96a6d56234703313f5
1,588
py
Python
image-downloader/instagram-image-download.py
MayankShrivastava17/mini-project
c6fa2c95caba792ec4641eaeafaa5ab18f9e7abd
[ "MIT" ]
1
2021-05-25T13:30:05.000Z
2021-05-25T13:30:05.000Z
image-downloader/instagram-image-download.py
MayankShrivastava17/mini-project
c6fa2c95caba792ec4641eaeafaa5ab18f9e7abd
[ "MIT" ]
null
null
null
image-downloader/instagram-image-download.py
MayankShrivastava17/mini-project
c6fa2c95caba792ec4641eaeafaa5ab18f9e7abd
[ "MIT" ]
null
null
null
from sys import argv import urllib from bs4 import BeautifulSoup import datetime def ShowHelp(): print 'Insta Image Downloader' print '' print 'Usage:' print 'insta.py [OPTION] [URL]' print '' print 'Options:' print '-u [Instagram URL]\tDownload single photo from Instagram URL' ...
33.083333
78
0.593199
a9cd1d4dfae01e8e61648e2c63a50ff0b3b56b77
616
py
Python
admin_privileges.py
julencosme/python-crash-course
6b37d7346e235273c266110932207cd67ce4eb0e
[ "MIT" ]
null
null
null
admin_privileges.py
julencosme/python-crash-course
6b37d7346e235273c266110932207cd67ce4eb0e
[ "MIT" ]
null
null
null
admin_privileges.py
julencosme/python-crash-course
6b37d7346e235273c266110932207cd67ce4eb0e
[ "MIT" ]
null
null
null
# Module for classes: Admin and Privileges. class Privileges(): """Represent admin user's privileges.""" def __init__(self): self.privileges = ["can add a post", "can delete a post", "can ban a user", "can add admin user"] def describe_admin_privileges(self): p...
28
66
0.613636
060d9086996942f4a71b95d24fa49db47dc99bdb
3,602
py
Python
tests/test_spacingd.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
1
2022-02-15T09:32:28.000Z
2022-02-15T09:32:28.000Z
tests/test_spacingd.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
null
null
null
tests/test_spacingd.py
function2-llx/MONAI
4cddaa830b61b88ec78e089bb5f21e05bb1a78f4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
36.02
111
0.54442
30f3884a50ae2a4a205514fdc73d2de677bd9d6b
3,691
py
Python
app/models.py
ephantuskaranja/Pitches
eaa25816199ac7060f5deb5882760071e5b74979
[ "Unlicense" ]
null
null
null
app/models.py
ephantuskaranja/Pitches
eaa25816199ac7060f5deb5882760071e5b74979
[ "Unlicense" ]
null
null
null
app/models.py
ephantuskaranja/Pitches
eaa25816199ac7060f5deb5882760071e5b74979
[ "Unlicense" ]
null
null
null
from . import db from flask_login import UserMixin from . import login_manager from werkzeug.security import generate_password_hash, check_password_hash from sqlalchemy.sql import func class User(UserMixin, db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) username = db.Colum...
31.547009
100
0.684638
615ca80daebf4c7b55a408dbb693c3c298d0d7a7
220
py
Python
tests/date/test_construct.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
5,049
2016-07-04T07:16:34.000Z
2022-03-31T07:41:48.000Z
tests/date/test_construct.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
536
2016-07-05T22:46:29.000Z
2022-03-22T12:41:54.000Z
tests/date/test_construct.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
373
2016-07-05T19:51:51.000Z
2022-03-23T16:57:46.000Z
from pendulum import Date from ..conftest import assert_date def test_construct(): d = Date(2016, 10, 20) assert_date(d, 2016, 10, 20) def test_today(): d = Date.today() assert isinstance(d, Date)
13.75
34
0.659091
57b18f30f170a4f198a6d7504c6e843a81117428
31,352
py
Python
astropy/table/index.py
jayvdb/astropy
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
[ "BSD-3-Clause" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
astropy/table/index.py
jayvdb/astropy
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
[ "BSD-3-Clause" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
astropy/table/index.py
jayvdb/astropy
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
[ "BSD-3-Clause" ]
31
2019-03-10T09:51:27.000Z
2022-02-14T23:11:12.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ The Index class can use several implementations as its engine. Any implementation should implement the following: __init__(data, row_index) : initialize index based on key/row list pairs add(key, row) -> None : add (key, row) to existing data remove(...
32.658333
89
0.577794
5af1c6181ea714a1dccc6bd6184735400939d2d7
8,296
py
Python
__main__.py
qntnt/badman-scraper
f54f1b5f48dfa64d455c39c86c34cad99202c893
[ "MIT" ]
null
null
null
__main__.py
qntnt/badman-scraper
f54f1b5f48dfa64d455c39c86c34cad99202c893
[ "MIT" ]
null
null
null
__main__.py
qntnt/badman-scraper
f54f1b5f48dfa64d455c39c86c34cad99202c893
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pandas as pd import csv from multiprocessing.pool import ThreadPool from get_result import get_result_with_context from alive_progress import alive_bar import argparse import os from loguru import logger import sys from textutils import similarity, clean_address import tkinter as tk from t...
41.273632
167
0.566056
0205d1fa24498ef2142fa494f41a70730ccd75ff
473
py
Python
boil/template/environment.py
soursoup/boil
dbd9711cc082d2fd357f9bb66311ba524102d2e7
[ "MIT" ]
4
2018-04-01T18:02:14.000Z
2022-02-28T16:58:37.000Z
boil/template/environment.py
bzurkowski/boil
dbd9711cc082d2fd357f9bb66311ba524102d2e7
[ "MIT" ]
null
null
null
boil/template/environment.py
bzurkowski/boil
dbd9711cc082d2fd357f9bb66311ba524102d2e7
[ "MIT" ]
null
null
null
import jinja2 from boil.common import filters class Environment(jinja2.Environment): def __init__(self, package_name): loader = jinja2.PackageLoader(package_name) super(Environment, self).__init__( loader=loader, keep_trailing_newline=True, trim_blocks=True, ...
24.894737
60
0.668076
22f434fc3e638032d8123b8ec6e90228a56cd5ae
487
py
Python
sam/layer/python/liftlog/custom_encoder.py
nickznaj/lift-log
022f80c3daaaea268f162f55545e63277fde59d8
[ "MIT" ]
null
null
null
sam/layer/python/liftlog/custom_encoder.py
nickznaj/lift-log
022f80c3daaaea268f162f55545e63277fde59d8
[ "MIT" ]
null
null
null
sam/layer/python/liftlog/custom_encoder.py
nickznaj/lift-log
022f80c3daaaea268f162f55545e63277fde59d8
[ "MIT" ]
null
null
null
from decimal import Decimal import datetime import json class CustomEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, Decimal): if o % 1 != 0: return float(o) else: return int(o) elif isinstance(o, datetime.datetime): ...
28.647059
48
0.562628
46ced261fe7e78ab37a6f98b22eea860cf16a799
3,525
py
Python
-Loan-Defaulters/code.py
nishantmaru01/ga-learner-dsmp-repo
959fa690d32c4d06efa274cc9b69b06c6dd7ea0a
[ "MIT" ]
null
null
null
-Loan-Defaulters/code.py
nishantmaru01/ga-learner-dsmp-repo
959fa690d32c4d06efa274cc9b69b06c6dd7ea0a
[ "MIT" ]
null
null
null
-Loan-Defaulters/code.py
nishantmaru01/ga-learner-dsmp-repo
959fa690d32c4d06efa274cc9b69b06c6dd7ea0a
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd from sklearn.model_selection import train_test_split # Code starts here data=pd.read_csv(path) X=data.drop(['customer.id','paid.back.loan'],axis=1) y=data['paid.back.loan'] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size = 0.3,random_state = ...
22.03125
172
0.719716
2eaeae5b653de99ab8b322973bae0d2745ad4c1c
154
py
Python
src/main.py
SergioSV96/MyOwnBlockchain
ee62ccedfa42b22ded3501557d5ad16d83329de0
[ "MIT" ]
1
2021-11-04T22:20:39.000Z
2021-11-04T22:20:39.000Z
src/main.py
SergioSV96/MyOwnBlockchain
ee62ccedfa42b22ded3501557d5ad16d83329de0
[ "MIT" ]
null
null
null
src/main.py
SergioSV96/MyOwnBlockchain
ee62ccedfa42b22ded3501557d5ad16d83329de0
[ "MIT" ]
null
null
null
from src.blockchain import Blockchain blockchain = Blockchain() blockchain.add_block("Second!") blockchain.add_block("Third!") print(blockchain)
19.25
38
0.75974
5abae6098056742e71eac805d6881655c858b488
2,439
py
Python
2020/util.py
vypxl/aoc
4187837ecd8bf7464efa4953588b8c53d5675cfb
[ "WTFPL" ]
1
2022-01-08T23:39:52.000Z
2022-01-08T23:39:52.000Z
2020/util.py
vypxl/aoc
4187837ecd8bf7464efa4953588b8c53d5675cfb
[ "WTFPL" ]
null
null
null
2020/util.py
vypxl/aoc
4187837ecd8bf7464efa4953588b8c53d5675cfb
[ "WTFPL" ]
2
2020-12-19T16:44:54.000Z
2020-12-19T19:00:55.000Z
from os.path import basename import re import itertools as it # pylint: disable=unused-import import numpy as np # pylint: disable=unused-import import networkx as nx # pylint: disable=unused-import import matplotlib.pyplot as plt # pylint: disable=unused-import from toolz.curried import * # pylint: disable=unused-wild...
29.385542
105
0.645346
7b6d9bea24f3b8938ef97c1125ff2b2eb5992cbf
574
py
Python
neighbor/urls.py
LewisNjagi/neighborhood
cbefac55b930999629dba202a784a096799949a4
[ "MIT" ]
null
null
null
neighbor/urls.py
LewisNjagi/neighborhood
cbefac55b930999629dba202a784a096799949a4
[ "MIT" ]
null
null
null
neighbor/urls.py
LewisNjagi/neighborhood
cbefac55b930999629dba202a784a096799949a4
[ "MIT" ]
2
2021-04-14T05:56:06.000Z
2021-04-15T14:20:02.000Z
from django.urls import path, include from . import views urlpatterns=[ path('',views.index,name = 'index'), path('profile/<str:username>/',views.profile,name = 'profile'), path('hoods/',views.hoods,name = 'hoods'), path('single_hood/<hood_id>',views.single_hood,name = 'single_hood'), path('results...
41
73
0.667247
e8528ac4c8b1b91a44ff3ccd628ea7e9a7dc8c5f
35,020
py
Python
airflow/contrib/hooks/bigquery_hook.py
siyuan-platform/airflow
a6c28f34de52f9aa6b62111aac8fa586694e6807
[ "Apache-2.0" ]
null
null
null
airflow/contrib/hooks/bigquery_hook.py
siyuan-platform/airflow
a6c28f34de52f9aa6b62111aac8fa586694e6807
[ "Apache-2.0" ]
null
null
null
airflow/contrib/hooks/bigquery_hook.py
siyuan-platform/airflow
a6c28f34de52f9aa6b62111aac8fa586694e6807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
39.795455
99
0.604483
6a9d3727fac72c95f23838e45e0ddcbcadeab746
7,923
py
Python
features/steps/knowledge-source-steps.py
YaphetKG/translator-testing-framework
e6125d8c35a90588c8b5701e340e427a8e0991c9
[ "BSD-3-Clause" ]
5
2019-08-06T18:09:02.000Z
2020-07-16T19:58:31.000Z
features/steps/knowledge-source-steps.py
YaphetKG/translator-testing-framework
e6125d8c35a90588c8b5701e340e427a8e0991c9
[ "BSD-3-Clause" ]
1
2019-08-20T21:12:18.000Z
2019-08-20T21:12:18.000Z
features/steps/knowledge-source-steps.py
YaphetKG/translator-testing-framework
e6125d8c35a90588c8b5701e340e427a8e0991c9
[ "BSD-3-Clause" ]
15
2019-07-10T18:10:32.000Z
2020-01-13T16:22:45.000Z
from behave import given, when, then import json import requests import jsonpath_rw import logging from contextlib import closing """ Knowldege-source tests """ @given('a knowledge source at "{url}"') def step_impl(context, url): """ Given a base URL of a knowledge source """ context.base_url = url ...
30.011364
108
0.641929
35186548e4c5ef295c999ff259cf2ca3bb56e5ea
10,048
py
Python
nova_powervm/virt/powervm/event.py
openstack/nova-powervm
376d9493e2a10313068508daf9054d7ecf6d121f
[ "Apache-2.0" ]
24
2015-10-18T02:55:20.000Z
2021-11-17T11:43:51.000Z
nova_powervm/virt/powervm/event.py
openstack/nova-powervm
376d9493e2a10313068508daf9054d7ecf6d121f
[ "Apache-2.0" ]
null
null
null
nova_powervm/virt/powervm/event.py
openstack/nova-powervm
376d9493e2a10313068508daf9054d7ecf6d121f
[ "Apache-2.0" ]
12
2015-10-26T17:38:05.000Z
2021-07-21T12:45:19.000Z
# Copyright 2014, 2017 IBM Corp. # # 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 require...
38.945736
79
0.640625
97cad1e3d62d043708cb4a9ee2802ac046580b1d
559
py
Python
davarocr/davarocr/davar_rcg/models/recognizors/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
387
2021-01-02T07:50:15.000Z
2022-03-31T04:30:03.000Z
davarocr/davarocr/davar_rcg/models/recognizors/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
70
2021-05-04T18:28:18.000Z
2022-03-31T14:14:52.000Z
davarocr/davarocr/davar_rcg/models/recognizors/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
83
2021-01-05T08:28:26.000Z
2022-03-31T07:14:03.000Z
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : __init__.py # Abstract : # Current Version: 1.0.0 # Date : 2021-05-01 ###...
31.055556
98
0.418605
2beb532b8d9deb40b0e8fb339fd926126f15f204
1,739
py
Python
CAPG/Reacher/capg_swimmer.py
Mee321/HAPG_exp
ccd0d92ad2ffcd8438efbd6bc09123a4c3aafabe
[ "MIT" ]
null
null
null
CAPG/Reacher/capg_swimmer.py
Mee321/HAPG_exp
ccd0d92ad2ffcd8438efbd6bc09123a4c3aafabe
[ "MIT" ]
null
null
null
CAPG/Reacher/capg_swimmer.py
Mee321/HAPG_exp
ccd0d92ad2ffcd8438efbd6bc09123a4c3aafabe
[ "MIT" ]
null
null
null
import gym from garage.baselines import LinearFeatureBaseline from garage.theano.baselines import GaussianMLPBaseline from garage.baselines import ZeroBaseline from garage.envs import normalize from garage.envs.box2d import CartpoleEnv from garage.envs.mujoco import SwimmerEnv from garage.theano.algos.capg import CAPG ...
34.78
76
0.734905
909b284aa8efb4729ee3fd36cbe1a608dbafb85a
7,161
py
Python
braindrAnalysis/braindrAnalysis.py
amitasviper/braindr-analysis
e16ef5042d8b369be7ac68b160dd3f886e3ddf6d
[ "MIT" ]
1
2018-08-10T16:33:17.000Z
2018-08-10T16:33:17.000Z
braindrAnalysis/braindrAnalysis.py
amitasviper/braindr-analysis
e16ef5042d8b369be7ac68b160dd3f886e3ddf6d
[ "MIT" ]
null
null
null
braindrAnalysis/braindrAnalysis.py
amitasviper/braindr-analysis
e16ef5042d8b369be7ac68b160dd3f886e3ddf6d
[ "MIT" ]
3
2018-07-10T18:00:24.000Z
2019-08-31T22:53:43.000Z
from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd import simplejson as json import os from .due import due, Doi from xgboost import XGBClassifier from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV from sklearn.model...
40.230337
113
0.641391
30b9b4ecdbc1d610f0347ce3be7152ab0e1299d3
18,639
py
Python
dpnp/dpnp_iface_statistics.py
Rubtsowa/dpnp
ef404c0f284b0c508ed1e556e140f02f76ae5551
[ "BSD-2-Clause" ]
null
null
null
dpnp/dpnp_iface_statistics.py
Rubtsowa/dpnp
ef404c0f284b0c508ed1e556e140f02f76ae5551
[ "BSD-2-Clause" ]
null
null
null
dpnp/dpnp_iface_statistics.py
Rubtsowa/dpnp
ef404c0f284b0c508ed1e556e140f02f76ae5551
[ "BSD-2-Clause" ]
null
null
null
# cython: language_level=3 # distutils: language = c++ # -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (c) 2016-2020, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are pe...
31.32605
107
0.597779
7675177ca8977aa2ed494932468ee28c1b5fc775
19,613
py
Python
hydsensread/file_reader/abstract_file_reader.py
cgq-qgc/HydroSensorReader
956e522102ad8a4be172123049a43de235123ef6
[ "MIT" ]
1
2019-03-11T12:43:51.000Z
2019-03-11T12:43:51.000Z
hydsensread/file_reader/abstract_file_reader.py
cgq-qgc/HydroSensorReader
956e522102ad8a4be172123049a43de235123ef6
[ "MIT" ]
19
2018-11-22T13:51:59.000Z
2022-01-18T15:47:43.000Z
hydsensread/file_reader/abstract_file_reader.py
cgq-qgc/HydroSensorReader
956e522102ad8a4be172123049a43de235123ef6
[ "MIT" ]
4
2018-11-22T14:29:51.000Z
2021-12-03T01:14:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import warnings import os.path as osp from abc import abstractmethod, ABCMeta from collections import defaultdict from typing import Dict, List, Union, Tuple from xml.etree import ElementTree as ET import bs4 import matplotlib.axes as mp_axe import matplotl...
38.684418
115
0.607556
aa2612977acaacbf43c1c1f8e3f1682ddad4bc9c
10,969
py
Python
artworks/views.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
artworks/views.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
artworks/views.py
mnosinov/artworks_project
b6901ff83c1cd370ce1539f09b464ecb995e1ce3
[ "MIT" ]
null
null
null
import os from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.views.generic import View, ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.contrib import messages from django.forms.m...
36.082237
95
0.630595
b21c29454fa8780097d49b65427a698b46e63dc6
1,738
py
Python
pyweather/apmodel.py
ravigoel08/py-open-weather
08e6945f78ab43112a84f6989677e4b4fd389ecf
[ "MIT" ]
5
2021-01-05T09:46:10.000Z
2021-05-26T10:58:18.000Z
pyweather/apmodel.py
ravigoel08/py-open-weather
08e6945f78ab43112a84f6989677e4b4fd389ecf
[ "MIT" ]
1
2021-07-21T12:32:08.000Z
2021-07-21T12:32:08.000Z
pyweather/apmodel.py
ravigoel08/py-open-weather
08e6945f78ab43112a84f6989677e4b4fd389ecf
[ "MIT" ]
3
2021-01-18T13:14:13.000Z
2021-04-26T14:14:54.000Z
from __future__ import annotations from typing import List, Dict from pydantic import BaseModel, Field import orjson def orjson_dumps(v, *, default): # orjson.dumps returns bytes, to match standard json.dumps we need to decode return orjson.dumps(v, default=default).decode() class Main(BaseModel): aq...
29.457627
137
0.661105
16e1bc4da530742dcf7746ad524e2b410fa4a288
2,355
py
Python
update.py
Jimgersnap/DJ-Roomba-legacy
3c4ded6635213c7497bfb432a6c7adafe0532c1b
[ "MIT" ]
2
2019-07-16T04:42:56.000Z
2020-06-02T05:36:57.000Z
update.py
Jimgersnap/DJ-Roomba-legacy
3c4ded6635213c7497bfb432a6c7adafe0532c1b
[ "MIT" ]
null
null
null
update.py
Jimgersnap/DJ-Roomba-legacy
3c4ded6635213c7497bfb432a6c7adafe0532c1b
[ "MIT" ]
null
null
null
import os import subprocess import sys def y_n(q): while True: ri = input('{} (y/n): '.format(q)) if ri.lower() in ['yes', 'y']: return True elif ri.lower() in ['no', 'n']: return False def main(): print('Starting...') # Make sure that we're in a Git repository if not os.path....
35.681818
153
0.64034
adf2c701927ee7ecd456b6eb9b37a41950e0b429
5,223
py
Python
tests/test_evaluator.py
denisra/pypoker
c6443b215786d6d33f032dc74faaf00ebc193f09
[ "MIT" ]
null
null
null
tests/test_evaluator.py
denisra/pypoker
c6443b215786d6d33f032dc74faaf00ebc193f09
[ "MIT" ]
null
null
null
tests/test_evaluator.py
denisra/pypoker
c6443b215786d6d33f032dc74faaf00ebc193f09
[ "MIT" ]
null
null
null
from pypoker.cards import * from pypoker.evaluator import * class TestSetup: def setup(self): self.deck = CardsDeck() self.royal_flush = Hand(self.deck[8:13]) # [TS, JS, QS, KS, AS] self.straight_flush = Hand(self.deck[5:10]) # [7S, 8S, 9S, TS, JS] self.four_of_kind = Hand(self.de...
52.23
112
0.655945
8586cd4102f631e11c0fe1adfe6d647a8b2f263a
219
py
Python
wagtailcommerce/frontend/context_processors.py
theplusagency/wagtail-commerce
6047170f29199ccaf2778534976ab0970c2877e7
[ "BSD-3-Clause" ]
3
2019-04-12T15:38:43.000Z
2019-09-22T10:23:20.000Z
wagtailcommerce/frontend/context_processors.py
wagtailcommerce/wagtailcommerce
308ed8348483806c16062d09a7e69ec44d9a2e73
[ "BSD-3-Clause" ]
null
null
null
wagtailcommerce/frontend/context_processors.py
wagtailcommerce/wagtailcommerce
308ed8348483806c16062d09a7e69ec44d9a2e73
[ "BSD-3-Clause" ]
null
null
null
from wagtailcommerce.stores.utils import get_store def store(request): store = getattr(request, 'store', None) return { 'store': store, 'store_currency': store.currency if store else '' }
19.909091
57
0.648402
21ffccac6fdcad481809e1713c166d90cc55b961
5,845
py
Python
kitsune/search/utils.py
joshua-s/kitsune
b4b79b8aa89d0dc3c50cc6dee8a9ceb8cd758cd5
[ "BSD-3-Clause" ]
1
2020-11-03T23:46:56.000Z
2020-11-03T23:46:56.000Z
kitsune/search/utils.py
983834572/kitsune
d4b3dcdce3294214dbc659c375c8491504473213
[ "BSD-3-Clause" ]
null
null
null
kitsune/search/utils.py
983834572/kitsune
d4b3dcdce3294214dbc659c375c8491504473213
[ "BSD-3-Clause" ]
1
2020-11-03T23:47:55.000Z
2020-11-03T23:47:55.000Z
import subprocess import time from itertools import islice from django.conf import settings import bleach from kitsune.lib.sumo_locales import LOCALES call = lambda x: subprocess.Popen(x, stdout=subprocess.PIPE).communicate() class FakeLogger(object): """Fake logger that we can pretend is a Python Logger ...
28.373786
74
0.538751
64ae0c6fd48d4fa68ab30eceffe74256d7df68d6
9,835
py
Python
scripts/log_stats.py
aw32/sched
b6ef35c5b517875a5954c70e2dc366fab3721a60
[ "BSD-2-Clause" ]
null
null
null
scripts/log_stats.py
aw32/sched
b6ef35c5b517875a5954c70e2dc366fab3721a60
[ "BSD-2-Clause" ]
null
null
null
scripts/log_stats.py
aw32/sched
b6ef35c5b517875a5954c70e2dc366fab3721a60
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2019, Alex Wiens <awiens@mail.upb.de>, Achim Lösch <achim.loesch@upb.de> # SPDX-License-Identifier: BSD-2-Clause import sys import json import io import math import datetime resource_short = {"IntelXeon":"C", "NvidiaTesla":"G", "MaxelerVectis":"F"} class App: def __init__(self): ...
25.153453
98
0.625928
051e18928f181a8d2918ae5c52401ac314d25a0f
4,429
py
Python
run_examples.py
dylanljones/dqmc
d4969b6624c1b596d8b2fd0dcaefb16064958eee
[ "MIT" ]
1
2022-01-18T22:27:47.000Z
2022-01-18T22:27:47.000Z
run_examples.py
dylanljones/dqmc
d4969b6624c1b596d8b2fd0dcaefb16064958eee
[ "MIT" ]
null
null
null
run_examples.py
dylanljones/dqmc
d4969b6624c1b596d8b2fd0dcaefb16064958eee
[ "MIT" ]
null
null
null
# coding: utf-8 # # This code is part of dqmc. # # Copyright (c) 2022, Dylan Jones # # This code is licensed under the MIT License. The copyright notice in the # LICENSE file in the root directory and this permission notice shall # be included in all copies or substantial portions of the Software. import os.path impor...
28.947712
85
0.62452
0d3f8555557252a45274ebac4e4e8cd0cad05610
497
py
Python
plotly/validators/layout/scene/zaxis/_gridcolor.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/layout/scene/zaxis/_gridcolor.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/layout/scene/zaxis/_gridcolor.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='gridcolor', parent_name='layout.scene.zaxis', **kwargs ): super(GridcolorValidator, self).__init__( plotly_name=plotl...
26.157895
70
0.609658
7b2b36ccedc8942471d98a57e09c428b3ad651e3
7,134
py
Python
nas-search/preprocessing.py
jsrimr/single-path-nas
2f07922ec51f71d0eab08d07bab3394ab2f423e9
[ "Apache-2.0" ]
428
2019-04-08T00:57:29.000Z
2022-03-10T02:10:49.000Z
nas-search/preprocessing.py
jsrimr/single-path-nas
2f07922ec51f71d0eab08d07bab3394ab2f423e9
[ "Apache-2.0" ]
15
2019-04-12T16:34:54.000Z
2021-03-21T14:56:48.000Z
nas-search/preprocessing.py
jsrimr/single-path-nas
2f07922ec51f71d0eab08d07bab3394ab2f423e9
[ "Apache-2.0" ]
67
2019-04-08T03:49:49.000Z
2021-10-05T07:43:04.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.350785
80
0.690496
b0adf90c0302054054e805fc6ee46aec9e32bf46
4,300
py
Python
authors/apps/notifications/tests/test_models.py
MuhweziDeo/Ah-backend-xmen
60c830977fa39a7eea9ab978a9ba0c3beb0c4d88
[ "BSD-3-Clause" ]
4
2019-01-07T09:15:17.000Z
2020-11-09T09:58:54.000Z
authors/apps/notifications/tests/test_models.py
MuhweziDeo/Ah-backend-xmen
60c830977fa39a7eea9ab978a9ba0c3beb0c4d88
[ "BSD-3-Clause" ]
34
2019-01-07T15:30:14.000Z
2019-03-06T08:23:34.000Z
authors/apps/notifications/tests/test_models.py
MuhweziDeo/Ah-backend-xmen
60c830977fa39a7eea9ab978a9ba0c3beb0c4d88
[ "BSD-3-Clause" ]
10
2018-12-18T14:43:52.000Z
2020-02-07T08:27:50.000Z
from django.test import TestCase from authors.apps.notifications.models import Notification, NotificationManager from authors.apps.profiles.models import Profile from authors.apps.authentication.models import User class TestModel(TestCase): def _create_notification(self, sender=None, receiver=None, message=None):...
42.156863
79
0.659302
00283d77fce3078d3d2326d537f07d544609e13c
703
py
Python
app/main/views.py
mzazakeith/news-highlight
8ac928bb074ad53e217648a3a76f83969438137a
[ "MIT" ]
null
null
null
app/main/views.py
mzazakeith/news-highlight
8ac928bb074ad53e217648a3a76f83969438137a
[ "MIT" ]
null
null
null
app/main/views.py
mzazakeith/news-highlight
8ac928bb074ad53e217648a3a76f83969438137a
[ "MIT" ]
null
null
null
from flask import render_template,request,redirect,url_for from . import main from ..requests import get_sources,get_article @main.route('/') def index(): """ Function that returns the index page and all its data """ sport_news = get_sources('sports') tech_news = get_sources('technology') tit...
27.038462
94
0.691323
b62a0d47a1afd135b5901fbf3fad61804d21b248
2,699
py
Python
edcnlp/utils/utils.py
edchengg/MyNLP
350c14efebc1440d6e132c6c516f0a02625df320
[ "MIT" ]
1
2021-10-31T21:40:25.000Z
2021-10-31T21:40:25.000Z
edcnlp/utils/utils.py
edchengg/MyNLP
350c14efebc1440d6e132c6c516f0a02625df320
[ "MIT" ]
null
null
null
edcnlp/utils/utils.py
edchengg/MyNLP
350c14efebc1440d6e132c6c516f0a02625df320
[ "MIT" ]
null
null
null
from edcnlp.utils.constant import MODELS_dict import torch from transformers import BertConfig, BertTokenizer def display(option): sorted(option.items(), key=lambda s: s[0]) for k, v in option.items(): print(k, '=', v) def build_pretrained_model_from_huggingface(option, add_tokens=None): # Define ...
38.014085
122
0.690997
c1e6cb405e76572e742225373b25cbee65975e1e
5,857
py
Python
repost_sles/main.py
SaiFi0102/repost_sles
453d671f071135ac62609a4ecdfd15b304d69c49
[ "MIT" ]
1
2021-07-27T19:50:07.000Z
2021-07-27T19:50:07.000Z
repost_sles/main.py
SaiFi0102/repost_sles
453d671f071135ac62609a4ecdfd15b304d69c49
[ "MIT" ]
null
null
null
repost_sles/main.py
SaiFi0102/repost_sles
453d671f071135ac62609a4ecdfd15b304d69c49
[ "MIT" ]
null
null
null
import frappe import datetime import os import json from frappe.utils import flt def repost_all_stock_vouchers(from_date, repost_gle=True, update_source_doc=False): import repost_sles.overrides from manufacturing_dv.events.stock_entry import validate frappe.flags.ignored_closed_or_disabled = 1 frappe.flags.do_no...
30.989418
145
0.708554
671f62ecb41dde76cdf0010ef917b978f1691a8c
1,368
py
Python
tools/refactoring/datagetters.py
ImagiaViz/inviwo
a00bb6b0551bc1cf26dc0366c827c1a557a9603d
[ "BSD-2-Clause" ]
349
2015-01-30T09:21:52.000Z
2022-03-25T03:10:02.000Z
tools/refactoring/datagetters.py
liu3xing3long/inviwo
69cca9b6ecd58037bda0ed9e6f53d02f189f19a7
[ "BSD-2-Clause" ]
641
2015-09-23T08:54:06.000Z
2022-03-23T09:50:55.000Z
tools/refactoring/datagetters.py
liu3xing3long/inviwo
69cca9b6ecd58037bda0ed9e6f53d02f189f19a7
[ "BSD-2-Clause" ]
124
2015-02-27T23:45:02.000Z
2022-02-21T09:37:14.000Z
import sys import os import re import colorama colorama.init() import refactoring # Note: refactoring.py need to be in the current working directory #paths = [ # "/Users/petst/Work/Projects/Inviwo-Developent/Private/Inviwo-dev", # "/Users/petst/Work/Projects/Inviwo-Developent/Private/Inviwo-research" #] paths = [ ...
29.73913
128
0.716374
9f0930252da80a641b99fa16d582df66bcbfdad7
1,829
py
Python
setup.py
emory-libraries/emory-baggins
53c202782c1b52925b0cbd685a7faa617a6251d0
[ "Apache-2.0" ]
2
2016-10-18T21:30:15.000Z
2017-03-14T13:40:23.000Z
setup.py
emory-libraries/emory-baggins
53c202782c1b52925b0cbd685a7faa617a6251d0
[ "Apache-2.0" ]
null
null
null
setup.py
emory-libraries/emory-baggins
53c202782c1b52925b0cbd685a7faa617a6251d0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os from setuptools import setup, find_packages import baggins LONG_DESCRIPTION = None try: # read the description if it's there with open('README.md') as desc_f: LONG_DESCRIPTION = desc_f.read() except: pass CLASSIFIERS = [ 'Development Status :: 3 - Alpha', '...
27.712121
102
0.669218
bd88f4ca60a3611487daa4eb999b8a5770ea6f82
1,242
py
Python
OOP_the_internet_herokuapp/src/page/form_auth_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
OOP_the_internet_herokuapp/src/page/form_auth_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
OOP_the_internet_herokuapp/src/page/form_auth_page.py
AntonioIonica/Automation_testing
6f7c94c55677b0958e6fada24058f1a00d2c0d0e
[ "MIT" ]
null
null
null
""" Login on Form authentication page taking the user and the password from the text (italic words) """ from selenium.webdriver.common.by import By from OOP_the_internet_herokuapp.src.page.base_page import BasePage class FormAuth(BasePage): USR = (By.ID, 'username') PWD = (By.ID, 'password') LOGIN_BTN = ...
37.636364
93
0.663446
4eaf787ad7501957ff06c5f4067d15003f89f8b1
310
py
Python
Hacker Rank/Python/Exception.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Hacker Rank/Python/Exception.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Hacker Rank/Python/Exception.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
t = int(input()) while t>0: t-=1 dividend, divisor = input().split() try: q = int(dividend)//int(divisor) print(q) except ZeroDivisionError: print("Error Code: integer division or modulo by zero") except ValueError: print("Error Code: invalid literal for int() with base 10: {}".format(divisor))
23.846154
81
0.687097
389891c275bd40bbd1a08da7cc62658b9a217ab8
1,932
py
Python
models/beta/vss.py
YorkSu/hat
b646b6689f3d81c985ed13f3d5c23b6c717fd07d
[ "Apache-2.0" ]
1
2019-04-10T04:49:30.000Z
2019-04-10T04:49:30.000Z
models/beta/vss.py
Suger131/HAT-tf2.0
b646b6689f3d81c985ed13f3d5c23b6c717fd07d
[ "Apache-2.0" ]
null
null
null
models/beta/vss.py
Suger131/HAT-tf2.0
b646b6689f3d81c985ed13f3d5c23b6c717fd07d
[ "Apache-2.0" ]
1
2019-06-14T05:53:42.000Z
2019-06-14T05:53:42.000Z
""" VGG-Swish-SE For Cifar10 本模型默认总参数量[参考基准:cifar10]: Total params: 16,402,790 Trainable params: 16,390,246 Non-trainable params: 12,544 """ from hat.models.advance import AdvNet class vss(AdvNet): """ VSS """ def args(self): self.CONV_KI = 'he_normal' self.CONV...
19.714286
84
0.586439
96a789a1572b5b11a0e3a8353f82c7b70e9d7249
2,805
py
Python
calc_stats.py
jianguoz/DNNC-few-shot-intent
ea6f39a225d62f87c05f3628206b06dcaeb56f01
[ "MIT" ]
30
2020-11-13T22:21:51.000Z
2022-03-02T03:46:46.000Z
calc_stats.py
jianguoz/DNNC-few-shot-intent
ea6f39a225d62f87c05f3628206b06dcaeb56f01
[ "MIT" ]
5
2021-04-14T04:48:59.000Z
2021-08-04T11:22:43.000Z
calc_stats.py
jianguoz/DNNC-few-shot-intent
ea6f39a225d62f87c05f3628206b06dcaeb56f01
[ "MIT" ]
7
2020-11-17T08:56:40.000Z
2022-03-30T06:22:48.000Z
# Copyright 2020, Salesforce.com, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
48.362069
462
0.653476
af63580a7c0606ac4c2771534c5efbdf0ef0ef49
1,567
py
Python
aliyun-python-sdk-airec/aliyunsdkairec/request/v20181012/QuerySingleAggregationReportRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-airec/aliyunsdkairec/request/v20181012/QuerySingleAggregationReportRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-airec/aliyunsdkairec/request/v20181012/QuerySingleAggregationReportRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.179487
97
0.774729
73efe75c50a3a004c875914b98e876a15b6825ba
1,895
py
Python
uhd_restpy/testplatform/sessions/ixnetwork/topology/localipv6address_db0b032b0167051f08ee1b875f3bb0d5.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
uhd_restpy/testplatform/sessions/ixnetwork/topology/localipv6address_db0b032b0167051f08ee1b875f3bb0d5.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
uhd_restpy/testplatform/sessions/ixnetwork/topology/localipv6address_db0b032b0167051f08ee1b875f3bb0d5.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
36.442308
157
0.718734
f914e149a54efbf7a03106daa08f2bb56f200639
11,751
py
Python
webdriver_wharf/app.py
mshriver/webdriver-wharf
d02091805dea2830a0fcd1044ba51339cafa453a
[ "MIT" ]
4
2017-12-21T10:30:24.000Z
2021-11-27T13:58:55.000Z
webdriver_wharf/app.py
mshriver/webdriver-wharf
d02091805dea2830a0fcd1044ba51339cafa453a
[ "MIT" ]
13
2017-05-18T14:58:45.000Z
2019-07-02T20:52:59.000Z
webdriver_wharf/app.py
mshriver/webdriver-wharf
d02091805dea2830a0fcd1044ba51339cafa453a
[ "MIT" ]
4
2017-05-18T15:46:21.000Z
2020-03-17T14:21:56.000Z
import logging import os from datetime import datetime from pkg_resources import require from threading import Thread from time import sleep, time from operator import attrgetter from apscheduler.schedulers.background import BackgroundScheduler from docker.errors import APIError from flask import Flask, jsonify, reques...
35.077612
96
0.647434
72ade9097be0b41e1fbcf47b7bb112f4cab7d473
2,399
py
Python
test/functional/p2p_timeouts.py
bitcoinlimitededition/bitcoinlimitededition
befc25e21abf8e02f260474210bd074a4f0b07b2
[ "MIT" ]
null
null
null
test/functional/p2p_timeouts.py
bitcoinlimitededition/bitcoinlimitededition
befc25e21abf8e02f260474210bd074a4f0b07b2
[ "MIT" ]
null
null
null
test/functional/p2p_timeouts.py
bitcoinlimitededition/bitcoinlimitededition
befc25e21abf8e02f260474210bd074a4f0b07b2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoinlimitededition Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various net timeouts. - Create three bitcoinlimitededitiond nodes: no_verack_n...
31.565789
93
0.732805
03cef242ac6c2d4d3d1b6c47b7c2ca2da4b57a0b
105
py
Python
backend-django/src/alpaca/urls.py
ryanpinnock10/Trading-Bot
2f8d3b30f0a47423eed66d67566460fc099f188e
[ "MIT" ]
1
2021-11-08T01:44:14.000Z
2021-11-08T01:44:14.000Z
backend-django/src/alpaca/urls.py
webclinic017/Trading-Bot-9
2f8d3b30f0a47423eed66d67566460fc099f188e
[ "MIT" ]
1
2021-03-30T13:11:11.000Z
2021-03-30T13:11:11.000Z
backend-django/src/alpaca/urls.py
webclinic017/Trading-Bot-9
2f8d3b30f0a47423eed66d67566460fc099f188e
[ "MIT" ]
1
2021-11-08T01:44:11.000Z
2021-11-08T01:44:11.000Z
from django.urls import path, include from . import views urlpatterns = [ path('', views.index), ]
13.125
37
0.67619
1582abd02def58da37b0cc1a41f13aea738a7cbc
1,235
py
Python
flypy/tests/test_calling_conv.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
null
null
null
flypy/tests/test_calling_conv.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
null
null
null
flypy/tests/test_calling_conv.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
1
2020-01-01T00:43:24.000Z
2020-01-01T00:43:24.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest from flypy import jit class TestCallingConventionFromPython(unittest.TestCase): def test_varargs(self): @jit def f(a, b, *args): return [a, b, args[1]] self.assertEqual(f...
22.053571
68
0.526316
e0fb16f468e597808b30f6895f84bf9527341d73
7,275
py
Python
c3lingo/models.py
c3lingo/c3lingo
b9d0c84164ec3b2ab60da87b0f6f36e10b4b27e9
[ "MIT" ]
5
2020-04-22T19:49:41.000Z
2020-12-30T16:17:37.000Z
c3lingo/models.py
c3lingo/c3lingo
b9d0c84164ec3b2ab60da87b0f6f36e10b4b27e9
[ "MIT" ]
7
2020-05-16T13:55:40.000Z
2021-09-22T18:56:41.000Z
c3lingo/models.py
c3lingo/c3lingo
b9d0c84164ec3b2ab60da87b0f6f36e10b4b27e9
[ "MIT" ]
1
2020-04-27T15:19:20.000Z
2020-04-27T15:19:20.000Z
from django.db import models from django.contrib.auth.models import User from django.utils.crypto import get_random_string import hashlib class Language(models.Model): """A language we support, spoken or otherwise.""" # Language code. # For spoken languages, if possible, follow Django's convention of ...
35.144928
97
0.683574
c26de2405b6a7cad7acd36c8766a6714bacb6c33
21,150
py
Python
indicators/ind_ann.py
AwesomeTrading/backtrader-live
8d29b6161055e711618ab47338e0ef055f3bddf5
[ "Apache-2.0" ]
27
2019-09-23T12:21:08.000Z
2022-01-21T07:47:27.000Z
indicators/ind_ann.py
AwesomeTrading/backtrader-live
8d29b6161055e711618ab47338e0ef055f3bddf5
[ "Apache-2.0" ]
null
null
null
indicators/ind_ann.py
AwesomeTrading/backtrader-live
8d29b6161055e711618ab47338e0ef055f3bddf5
[ "Apache-2.0" ]
16
2020-01-10T14:09:37.000Z
2022-02-23T00:41:58.000Z
from __future__ import (absolute_import, division, print_function, unicode_literals) import backtrader as bt from backtrader.functions import Logic import math import ccxt class ANN(bt.Indicator): lines = ('ann', 'prediction' ) plotinfo = dict( subpl...
136.451613
708
0.650496
ee412f12c250f786d2341d88fdeb57aa342bd73f
14,104
py
Python
backend/api/tests/ActividadTestCase.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
1
2022-03-02T02:28:49.000Z
2022-03-02T02:28:49.000Z
backend/api/tests/ActividadTestCase.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
22
2021-09-01T17:44:25.000Z
2021-10-07T19:39:09.000Z
backend/api/tests/ActividadTestCase.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
null
null
null
from django.test import TestCase from django.test.client import Client from backend.api.models import Actividad, Miembro, MiembroSprint, Proyecto, SprintBacklog, Sprint, Usuario class ActividadTestCase(TestCase): """ ActividadTestCase Tests para probar funcionalidad de CRUD de Actividades Args: T...
39.841808
113
0.620391
c111f50abf6f68f4b8047bf46e38cd39b38530b1
931
py
Python
benchmark.py
marangonico/xplane_airports
00259ab889d9c8e1af2f0be54e1ca7bd4b9ffe1f
[ "MIT" ]
null
null
null
benchmark.py
marangonico/xplane_airports
00259ab889d9c8e1af2f0be54e1ca7bd4b9ffe1f
[ "MIT" ]
null
null
null
benchmark.py
marangonico/xplane_airports
00259ab889d9c8e1af2f0be54e1ca7bd4b9ffe1f
[ "MIT" ]
null
null
null
import gc import timeit from xplane_airports.AptDat import AptDat from pathlib import Path xplane_installation = Path('/Users/tyler/design') assert xplane_installation.is_dir(), f"{xplane_installation} does not exist or is not a directory" iterations = 3 print(f"Repeating {iterations} iterations of parsing 35,000+ ai...
42.318182
150
0.771214
9e3eeea2326a13340afe81214bbb5c767deac0f1
9,478
py
Python
bokeh/_testing/plugins/project.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
1
2021-05-03T15:19:05.000Z
2021-05-03T15:19:05.000Z
bokeh/_testing/plugins/project.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
3
2021-09-08T03:16:42.000Z
2022-03-12T00:57:18.000Z
bokeh/_testing/plugins/project.py
samwill/bokeh
228132eba4b696b91b2a77f7e9d07771ba868093
[ "BSD-3-Clause" ]
2
2021-01-12T18:22:24.000Z
2021-10-30T00:32:02.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
32.682759
96
0.5977
197b7b6d2cfe8653de3bd9be040b2452a756bc7b
401
py
Python
questionsApp/wsgi.py
javitocor/PsychologicalTest-React-Django-
459ef21b85e3e9432ac7c2dfd8d0d12115c925bd
[ "MIT" ]
1
2021-09-30T12:12:10.000Z
2021-09-30T12:12:10.000Z
questionsApp/wsgi.py
javitocor/PsychologicalTest-React-Django-
459ef21b85e3e9432ac7c2dfd8d0d12115c925bd
[ "MIT" ]
null
null
null
questionsApp/wsgi.py
javitocor/PsychologicalTest-React-Django-
459ef21b85e3e9432ac7c2dfd8d0d12115c925bd
[ "MIT" ]
1
2021-12-23T00:41:41.000Z
2021-12-23T00:41:41.000Z
""" WSGI config for questionsApp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
2883ede219aab0b942a5717218b15935f5f9e78a
66,811
py
Python
compiler/gdsMill/mpmath/tests/test_functions2.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
null
null
null
compiler/gdsMill/mpmath/tests/test_functions2.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
null
null
null
compiler/gdsMill/mpmath/tests/test_functions2.py
panicmarvin/OpenRAM
abf47bab50adb48337c59b72ccd6023c1999f3fc
[ "BSD-3-Clause" ]
1
2020-01-23T07:12:52.000Z
2020-01-23T07:12:52.000Z
import math from mpmath import * def test_bessel(): mp.dps = 15 assert j0(1).ae(0.765197686557966551) assert j0(pi).ae(-0.304242177644093864) assert j0(1000).ae(0.0247866861524201746) assert j0(-25).ae(0.0962667832759581162) assert j1(1).ae(0.440050585744933516) assert j1(pi).ae(0...
52.483111
256
0.67658
2090a40e7df0d5462e034ccfb57770676a75d8a2
787
py
Python
code/tests/test_tile.py
Nocty-chan/cs224n-squad
0c0b342621e038aba8e20ff411da13dfa173351d
[ "Apache-2.0" ]
2
2018-04-15T06:13:41.000Z
2019-07-25T20:22:34.000Z
code/tests/test_tile.py
Nocty-chan/cs224n-squad
0c0b342621e038aba8e20ff411da13dfa173351d
[ "Apache-2.0" ]
1
2020-11-10T04:51:36.000Z
2020-11-10T04:51:36.000Z
code/tests/test_tile.py
Nocty-chan/cs224n-squad
0c0b342621e038aba8e20ff411da13dfa173351d
[ "Apache-2.0" ]
3
2018-08-08T08:48:04.000Z
2020-02-10T09:52:41.000Z
import numpy as np H = 2 N = 2 M = 3 c = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) # N x 2H q = np.array([[1, 2, 3, 0], [5, 6, 7, 4], [8, 9 , 10, 11]]) # M x 2H q_tile = np.tile(q, (N, 1, 1)) # N x M x 2H q_tile = np.transpose(q_tile, (0, 2, 1)) # N x 2H x M c = np.reshape(c, (N, 2*H, 1)) result = (c * q_tile) # N x 2...
20.179487
68
0.550191
fc27000ef7ef911da644b215ede6e94c738924fc
50,583
py
Python
tests/test_eda/test_slcs.py
logstar/scedar
f8cd7dab9f885a0c58d127a9ee3b143d7e4bae06
[ "MIT" ]
17
2018-07-24T08:07:03.000Z
2020-01-14T11:06:31.000Z
tests/test_eda/test_slcs.py
benstear/scedar
056fc2fd1bdb2473700e4c24ec4dab3996f2b5fc
[ "MIT" ]
2
2021-05-30T15:40:56.000Z
2021-11-08T08:38:42.000Z
tests/test_eda/test_slcs.py
benstear/scedar
056fc2fd1bdb2473700e4c24ec4dab3996f2b5fc
[ "MIT" ]
8
2018-08-23T01:06:59.000Z
2019-11-07T22:19:47.000Z
import scipy.sparse as spsp import numpy as np import seaborn as sns import scedar.eda as eda import matplotlib as mpl mpl.use("agg", warn=False) # noqa import matplotlib.pyplot as plt import pytest class TestSingleLabelClassifiedSamples(object): """docstring for TestSingleLabelClassifiedSamples""" np.random...
43.456186
79
0.567681
afb6dd7a678773d5f7b1fc15bd92bc36579fb00b
3,035
py
Python
scitail/models/entailment/simple_overlap.py
allenai/scitail
2e57f46a4620d50e85323c4a642114426db67393
[ "Apache-2.0" ]
40
2018-02-01T04:20:50.000Z
2022-03-08T02:31:08.000Z
scitail/models/entailment/simple_overlap.py
allenai/scitail
2e57f46a4620d50e85323c4a642114426db67393
[ "Apache-2.0" ]
6
2018-02-06T03:41:00.000Z
2018-10-22T06:13:59.000Z
scitail/models/entailment/simple_overlap.py
allenai/scitail
2e57f46a4620d50e85323c4a642114426db67393
[ "Apache-2.0" ]
8
2018-02-08T09:06:16.000Z
2019-07-17T23:12:17.000Z
from typing import Dict, List, Any import torch from allennlp.common import Params from allennlp.data import Vocabulary from allennlp.models.model import Model from allennlp.modules import FeedForward from allennlp.nn import InitializerApplicator from allennlp.training.metrics import CategoricalAccuracy @Model.regis...
37.469136
95
0.637891
f2ad3c78a1401c26baf86e913c05027330312ee2
3,927
py
Python
spikeextractors/extractors/openephysextractors/openephysextractors.py
TRuikes/spikeextractors
c3cbdaa18629aeb5ecb52f648e69b503a4f091d2
[ "MIT" ]
null
null
null
spikeextractors/extractors/openephysextractors/openephysextractors.py
TRuikes/spikeextractors
c3cbdaa18629aeb5ecb52f648e69b503a4f091d2
[ "MIT" ]
null
null
null
spikeextractors/extractors/openephysextractors/openephysextractors.py
TRuikes/spikeextractors
c3cbdaa18629aeb5ecb52f648e69b503a4f091d2
[ "MIT" ]
null
null
null
from spikeextractors import RecordingExtractor, SortingExtractor from pathlib import Path import numpy as np from spikeextractors.extraction_tools import check_get_traces_args, check_valid_unit_id try: import pyopenephys HAVE_OE = True except ImportError: HAVE_OE = False class OpenEphysRecordingExtracto...
47.313253
147
0.708429
be4cfef0edb04b8e98a10691a1d87292eec1ec54
14,967
py
Python
crowdsourcing/viewsets/task.py
ramcn/sept20
e6f6e238d0561ebf3353158161f1b20052e8b08b
[ "MIT" ]
null
null
null
crowdsourcing/viewsets/task.py
ramcn/sept20
e6f6e238d0561ebf3353158161f1b20052e8b08b
[ "MIT" ]
null
null
null
crowdsourcing/viewsets/task.py
ramcn/sept20
e6f6e238d0561ebf3353158161f1b20052e8b08b
[ "MIT" ]
null
null
null
from crowdsourcing.serializers.task import * from rest_framework import status, viewsets from rest_framework.response import Response from rest_framework.decorators import detail_route, list_route from django.shortcuts import get_object_or_404 from crowdsourcing.permissions.project import IsProjectOwnerOrCollaborator f...
51.43299
123
0.615955
493c7ff03d38e6694699c027de894081f8cfa4d3
687
py
Python
Arase/Tools/__init__.py
mattkjames7/Arase
996167be35a13bbb1fdddfbe75e3a06d124b1d25
[ "MIT" ]
null
null
null
Arase/Tools/__init__.py
mattkjames7/Arase
996167be35a13bbb1fdddfbe75e3a06d124b1d25
[ "MIT" ]
1
2021-06-10T22:51:09.000Z
2021-06-10T22:51:09.000Z
Arase/Tools/__init__.py
mattkjames7/Arase
996167be35a13bbb1fdddfbe75e3a06d124b1d25
[ "MIT" ]
null
null
null
from .ReadCDF import ReadCDF from .CountstoFlux import CountstoFlux from .CountstoPSD import CountstoPSD from .FluxtoCounts import FluxtoCounts from .FluxtoPSD import FluxtoPSD from .PSDtoCounts import PSDtoCounts from .PSDtoFlux import PSDtoFlux from .MaxwellBoltzmannDist import MaxwellBoltzmannDist,MaxwellBoltzmannDi...
40.411765
100
0.874818
5531f3e7ae6541c69293005755bf4fa33c3c7639
38,457
py
Python
dannce/engine/processing.py
jessedmarshall/dannce
6518415fc723de51b766664bd8f2ec3793dc9af8
[ "MIT" ]
1
2021-12-07T20:46:58.000Z
2021-12-07T20:46:58.000Z
dannce/engine/processing.py
jessedmarshall/dannce
6518415fc723de51b766664bd8f2ec3793dc9af8
[ "MIT" ]
null
null
null
dannce/engine/processing.py
jessedmarshall/dannce
6518415fc723de51b766664bd8f2ec3793dc9af8
[ "MIT" ]
null
null
null
"""Processing functions for dannce.""" import numpy as np from skimage.color import rgb2gray from skimage.transform import downscale_local_mean as dsm import imageio import os import dannce.engine.serve_data_DANNCE as serve_data_DANNCE import PIL from six.moves import cPickle import scipy.io as sio from dannce.engine ...
33.469974
154
0.579478
0cb725d0ce1c6541bcb13849b3c1ca07f7fae4a4
1,796
py
Python
BlenderRenderController/BlenderRenderController/Scripts/get_project_info.py
Isti115/BlenderRenderController
9f3434326ea9b0f223934d354762ccb417253340
[ "MIT" ]
36
2016-05-23T12:44:03.000Z
2022-01-09T00:15:37.000Z
BlenderRenderController/BlenderRenderController/Scripts/get_project_info.py
Isti115/BlenderRenderController
9f3434326ea9b0f223934d354762ccb417253340
[ "MIT" ]
16
2016-06-01T06:36:13.000Z
2021-03-09T00:13:42.000Z
BlenderRenderController/BlenderRenderController/Scripts/get_project_info.py
Isti115/BlenderRenderController
9f3434326ea9b0f223934d354762ccb417253340
[ "MIT" ]
11
2016-07-02T16:53:00.000Z
2021-08-15T05:47:36.000Z
import os import json import bpy import re from bpy import context from bpy import ops from bpy import data blendPath = bpy.context.blend_data.filepath; projName = bpy.path.display_name_from_filepath( blendPath ); # get number of Scenes and active scene name n_data = bpy.data.scenes a_data = bpy.context.scene # get...
24.944444
114
0.698775
a1ef18504dc85cdc9f1ce1e8c7bcb0a0f4013181
1,301
py
Python
PreferencePanes/_metadata.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
4
2019-03-11T18:05:49.000Z
2021-05-22T21:09:09.000Z
PreferencePanes/_metadata.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
PreferencePanes/_metadata.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2019-03-18T18:53:36.000Z
2019-03-18T18:53:36.000Z
# This file is generated by objective.metadata # # Last update: Mon Jul 18 12:18:57 2016 import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a if sys.byteorder == 'little': def littleOrBig(a, b): return a else: def littleOrBig(a, b): return b mis...
40.65625
315
0.753267
281a54250f12daf2f62c8b4b1de93778cc97be51
21,938
py
Python
tf_agents/utils/eager_utils_test.py
ayansengupta17/agents
c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a
[ "Apache-2.0" ]
2
2021-10-30T16:57:37.000Z
2021-11-17T10:21:17.000Z
tf_agents/utils/eager_utils_test.py
ayansengupta17/agents
c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a
[ "Apache-2.0" ]
null
null
null
tf_agents/utils/eager_utils_test.py
ayansengupta17/agents
c5a2f1f57d4fd0070eb75204aa0b1663de3e2c0a
[ "Apache-2.0" ]
2
2020-06-05T18:38:16.000Z
2020-07-08T14:41:42.000Z
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
34.988836
79
0.689944
5968249a492308032463e35301e09e109ec5fca3
616
py
Python
PythonMPI/MandelbrotSeq.py
terasakisatoshi/MPI
d4064d8bee356c35a63702c5687726945286213c
[ "MIT" ]
1
2022-02-07T10:51:53.000Z
2022-02-07T10:51:53.000Z
PythonMPI/MandelbrotSeq.py
terasakisatoshi/MPI
d4064d8bee356c35a63702c5687726945286213c
[ "MIT" ]
null
null
null
PythonMPI/MandelbrotSeq.py
terasakisatoshi/MPI
d4064d8bee356c35a63702c5687726945286213c
[ "MIT" ]
1
2022-02-07T10:51:33.000Z
2022-02-07T10:51:33.000Z
import numpy as np import matplotlib.pyplot as plt import time def mandelbrot(x,y,maxit): c=x+y*1j#complex exporession z=0+0j#complex expression it=0 while abs(z)<2 and it<maxit: z=z**2+c it+=1 return it #main x1,x2=-2.0,1.0 y1,y2=-1.0,1.0 w,h=150,100 maxit=1025 C=np.zeros([h,w...
18.117647
36
0.623377
6773f7a2442e21a0af672b9805ba9d407085df63
4,999
py
Python
python_analyzer/commands/get_api/_model.py
lars-reimann/python-analyzer
6e0f12acee1c533ca9ef19bbfdc7cc8337e25696
[ "MIT" ]
null
null
null
python_analyzer/commands/get_api/_model.py
lars-reimann/python-analyzer
6e0f12acee1c533ca9ef19bbfdc7cc8337e25696
[ "MIT" ]
5
2021-10-12T10:39:35.000Z
2022-01-01T13:11:19.000Z
python_analyzer/commands/get_api/_model.py
lars-reimann/python-analyzer
6e0f12acee1c533ca9ef19bbfdc7cc8337e25696
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Any, Optional from python_analyzer.utils import declaration_name, parent_qname class API: @staticmethod def from_json(json: Any) -> API: result = API( json["distribution"], json["package"], json["version"] ...
29.579882
92
0.597119
d12fa580a922544789cbc871aa190ae167dc357f
4,990
py
Python
jenkins_jobs/sphinx/yaml.py
pratikmallya/jenkins-job-builder
83114faba6b85bb0dae066ca3ec4f23871683fb5
[ "Apache-2.0" ]
3
2018-02-20T19:11:48.000Z
2020-04-03T08:44:12.000Z
jenkins_jobs/sphinx/yaml.py
pratikmallya/jenkins-job-builder
83114faba6b85bb0dae066ca3ec4f23871683fb5
[ "Apache-2.0" ]
12
2015-11-30T17:13:11.000Z
2022-03-18T10:58:07.000Z
jenkins_jobs/sphinx/yaml.py
pratikmallya/jenkins-job-builder
83114faba6b85bb0dae066ca3ec4f23871683fb5
[ "Apache-2.0" ]
11
2016-10-25T12:03:32.000Z
2021-04-27T12:16:51.000Z
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
34.413793
79
0.649299
160e6071e1da7d7ab2a81e843be45cab88c92203
685
py
Python
app/core/migrations/0003_ingredient.py
Badhansen/recipe-app-api
69b7136ac0616314f354fa27eb6f8b137197d3f8
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
Badhansen/recipe-app-api
69b7136ac0616314f354fa27eb6f8b137197d3f8
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
Badhansen/recipe-app-api
69b7136ac0616314f354fa27eb6f8b137197d3f8
[ "MIT" ]
1
2020-12-07T07:57:22.000Z
2020-12-07T07:57:22.000Z
# Generated by Django 3.1.2 on 2020-11-03 12:00 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( n...
28.541667
118
0.617518
9de0ed824ebaabb289cf475e4ffcff88b32489fd
1,574
py
Python
tests/old_suite/interactive/test_pyqt4.py
soleil0-0/pyinstaller
4249a7347f6b81aba9825ded8addb92ee0f85ea9
[ "Apache-2.0" ]
2
2020-09-13T09:15:02.000Z
2021-07-04T04:26:50.000Z
tests/old_suite/interactive/test_pyqt4.py
jeremysanders/pyinstaller
321b24f9a9a5978337735816b36ca6b4a90a2fb4
[ "Apache-2.0" ]
3
2021-06-08T22:52:09.000Z
2021-09-08T02:48:20.000Z
tests/old_suite/interactive/test_pyqt4.py
jeremysanders/pyinstaller
321b24f9a9a5978337735816b36ca6b4a90a2fb4
[ "Apache-2.0" ]
1
2021-09-15T08:52:26.000Z
2021-09-15T08:52:26.000Z
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013-2020, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is...
29.148148
79
0.595934
38164f531acebbfc578e76147691281232892080
11,345
py
Python
sdk/python/pulumi_aws/ec2/peering_connection_options.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/peering_connection_options.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/ec2/peering_connection_options.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Peerin...
63.735955
162
0.710621
9a239af58fbe2b0c80bc86a607e9aae74b4768b3
610
py
Python
project/scanner/helpers.py
Mozilla-GitHub-Standards/2c72a3dddbe69ad175e72f759ff33bc6dc22bec05d0e7c304b2fff865cac5390
59bbfbc9ce8fea695ac0cca038dc05033fb081ff
[ "BSD-3-Clause" ]
null
null
null
project/scanner/helpers.py
Mozilla-GitHub-Standards/2c72a3dddbe69ad175e72f759ff33bc6dc22bec05d0e7c304b2fff865cac5390
59bbfbc9ce8fea695ac0cca038dc05033fb081ff
[ "BSD-3-Clause" ]
null
null
null
project/scanner/helpers.py
Mozilla-GitHub-Standards/2c72a3dddbe69ad175e72f759ff33bc6dc22bec05d0e7c304b2fff865cac5390
59bbfbc9ce8fea695ac0cca038dc05033fb081ff
[ "BSD-3-Clause" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.utils.html import escapejs from jingo import register # # This is the place to register Django template fil...
33.888889
70
0.757377
8da071939c45ba8026f73d06055c1d73504c698f
7,569
py
Python
tests/core/tests/api.py
mjschultz/django-tastefulpy
c81c7b32da16f9b181589a0311d9819718fdc960
[ "BSD-3-Clause" ]
null
null
null
tests/core/tests/api.py
mjschultz/django-tastefulpy
c81c7b32da16f9b181589a0311d9819718fdc960
[ "BSD-3-Clause" ]
null
null
null
tests/core/tests/api.py
mjschultz/django-tastefulpy
c81c7b32da16f9b181589a0311d9819718fdc960
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import User from django.http import HttpRequest from django.test import TestCase from tastefulpy.api import Api from tastefulpy.exceptions import NotRegistered, BadRequest from tastefulpy.resources import Resource, ModelResource from tastefulpy.serializers import Serializer from core.mod...
40.913514
336
0.648302
57417c0e0ac1ae7175df666ec7745c5b4c0f940a
5,511
py
Python
SNAKE.py
burleyinnersbm07/pythonSnakeGame
9b669dc3d919a99af053d644fd8151181e5e00d0
[ "MIT" ]
null
null
null
SNAKE.py
burleyinnersbm07/pythonSnakeGame
9b669dc3d919a99af053d644fd8151181e5e00d0
[ "MIT" ]
null
null
null
SNAKE.py
burleyinnersbm07/pythonSnakeGame
9b669dc3d919a99af053d644fd8151181e5e00d0
[ "MIT" ]
null
null
null
import pygame import time import random pygame.init() # Define colors, because the PyGame library # does not do this by default white = (255, 255, 255) darkGray = (50, 50, 50) lightGray = (150, 150, 150) black = (0, 0, 0) red = (245, 0, 0) green = (0, 255, 0) blue = (0, 0, 255) display_width = 800 display_height = 6...
34.44375
166
0.596625
3504dbf3bead03fe773dea13f1559b56efa25b6b
13,972
py
Python
tests/components/flux_led/test_init.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/flux_led/test_init.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/flux_led/test_init.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the flux_led component.""" from __future__ import annotations from datetime import timedelta from unittest.mock import AsyncMock, patch import pytest from homeassistant import config_entries from homeassistant.components import flux_led from homeassistant.components.flux_led.const import ( CONF_REMO...
36.671916
110
0.707272
12e3d0365cfd2ddb811d5f89a5c9a7ca0eec8f28
6,613
py
Python
custom_components/lovelace_gen/__init__.py
genestealer/Home-Assistant-Configuration
36995da36beddb5cdac46130ad1e3fcce350332b
[ "MIT" ]
8
2019-01-04T08:10:29.000Z
2021-11-05T17:44:35.000Z
custom_components/lovelace_gen/__init__.py
genestealer/Home-Assistant-Configuration
36995da36beddb5cdac46130ad1e3fcce350332b
[ "MIT" ]
1
2022-02-03T03:05:31.000Z
2022-02-05T19:01:34.000Z
custom_components/lovelace_gen/__init__.py
genestealer/Home-Assistant-Configuration
36995da36beddb5cdac46130ad1e3fcce350332b
[ "MIT" ]
4
2020-05-24T18:04:21.000Z
2022-03-09T23:54:05.000Z
import os import logging import json import io import time from collections import OrderedDict import jinja2 from homeassistant.util.yaml import loader from homeassistant.exceptions import HomeAssistantError _LOGGER = logging.getLogger(__name__) def fromjson(value): return json.loads(value) jinja = jinja2.Envi...
33.39899
133
0.668683
8d46fc9c1136ab9aa0b90c8f8915fb4e900a44dd
166,351
py
Python
python/paddle/fluid/framework.py
sunhongwei123/Paddle
cadc6a97040965901adceb102c4946026abf2282
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/framework.py
sunhongwei123/Paddle
cadc6a97040965901adceb102c4946026abf2282
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/framework.py
sunhongwei123/Paddle
cadc6a97040965901adceb102c4946026abf2282
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.124789
272
0.562407
fe06211fe6dd8f63a49201f071fd5065fe0a89e2
5,422
py
Python
tests/test_call_wasm_contract/test.py
uuosio/python-contract-demos
7d56ba371f2115b0ab895fca3e71092c2523f25d
[ "MIT" ]
2
2020-12-08T13:15:06.000Z
2020-12-29T10:06:44.000Z
tests/test_call_wasm_contract/test.py
uuosio/python-contract-demos
7d56ba371f2115b0ab895fca3e71092c2523f25d
[ "MIT" ]
null
null
null
tests/test_call_wasm_contract/test.py
uuosio/python-contract-demos
7d56ba371f2115b0ab895fca3e71092c2523f25d
[ "MIT" ]
null
null
null
''' Example for call wasm contract. ''' from uuoskit import chainapi, config, wallet from uuoskit import test_helper wasm_abi = { "version": "eosio::abi/1.0", "types": [], "structs": [], "actions": [], "tables": [], "ricardian_clauses": [], "error_messages": [], "abi_extensions": [] } ...
74.273973
3,373
0.68554
6b871a800f1f4f7c0ee8a262f88f897afd71191c
17,532
py
Python
code/mohdashboardapi3.py
yuval-harpaz/covid-19-israel-matlab
cc8619a830bcc10053fc84f96befb869f5523f7b
[ "CC0-1.0" ]
5
2021-04-16T15:12:45.000Z
2021-12-31T22:20:42.000Z
code/mohdashboardapi3.py
yuval-harpaz/covid-19-israel-matlab
cc8619a830bcc10053fc84f96befb869f5523f7b
[ "CC0-1.0" ]
null
null
null
code/mohdashboardapi3.py
yuval-harpaz/covid-19-israel-matlab
cc8619a830bcc10053fc84f96befb869f5523f7b
[ "CC0-1.0" ]
2
2020-07-08T20:44:28.000Z
2020-08-28T17:41:37.000Z
import os import requests import pandas as pd GIT_DIR = '/home/innereye/Repos/israel_moh_covid_dashboard_data' if os.path.isdir(r'C:\Users\User\Documents\Corona'): GIT_DIR = r'C:\Users\User\Documents\Corona' api_query = {'requests': [ {'id': '0', 'queryName': 'lastUpdate', 'single': True, 'parameters': {}}, ...
44.953846
104
0.597878