hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
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
125
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
125
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.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
a384ddf1d03570fcc865e080eb23f1ef2ae41121
354
py
Python
website/config/google_config.py
patrykwenz/flask_google_auth_voting
d32818d80dcb4ad9d49ba8a193e63e92df2abc86
[ "MIT" ]
null
null
null
website/config/google_config.py
patrykwenz/flask_google_auth_voting
d32818d80dcb4ad9d49ba8a193e63e92df2abc86
[ "MIT" ]
null
null
null
website/config/google_config.py
patrykwenz/flask_google_auth_voting
d32818d80dcb4ad9d49ba8a193e63e92df2abc86
[ "MIT" ]
null
null
null
import os from oauthlib.oauth2 import WebApplicationClient GOOGLE_CLIENT_ID = os.environ.get('GOOGLE_CLIENT_ID', None) GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET', None) GOOGLE_DISCOVERY_URL = ( "https://accounts.google.com/.well-known/openid-configuration" ) # OAuth 2 client setup client = WebAp...
29.5
67
0.805085
import os from oauthlib.oauth2 import WebApplicationClient GOOGLE_CLIENT_ID = os.environ.get('GOOGLE_CLIENT_ID', None) GOOGLE_CLIENT_SECRET = os.environ.get('GOOGLE_CLIENT_SECRET', None) GOOGLE_DISCOVERY_URL = ( "https://accounts.google.com/.well-known/openid-configuration" ) # OAuth 2 client setup client = WebAp...
0
0
0
f68a4a690222f608f5f600598fada4329abbb161
298
py
Python
ecs/users/migrations/0004_remove_userprofile_start_workflow.py
programmierfabrik/ecs
2389a19453e21b2ea4e40b272552bcbd42b926a9
[ "Apache-2.0" ]
9
2017-02-13T18:17:13.000Z
2020-11-21T20:15:54.000Z
ecs/users/migrations/0004_remove_userprofile_start_workflow.py
programmierfabrik/ecs
2389a19453e21b2ea4e40b272552bcbd42b926a9
[ "Apache-2.0" ]
2
2021-05-20T14:26:47.000Z
2021-05-20T14:26:48.000Z
ecs/users/migrations/0004_remove_userprofile_start_workflow.py
programmierfabrik/ecs
2389a19453e21b2ea4e40b272552bcbd42b926a9
[ "Apache-2.0" ]
4
2017-04-02T18:48:59.000Z
2021-11-23T15:40:35.000Z
from django.db import models, migrations
18.625
45
0.59396
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20151219_1141'), ] operations = [ migrations.RemoveField( model_name='userprofile', name='start_workflow', ), ]
0
233
23
73434629f994347ef9a99c5d8220e24fa317d1c1
8,453
py
Python
src/HectorHardware.py
alesti/Hector9000
004bef61dbbc2e6b097df9b8af780a2823832702
[ "MIT" ]
null
null
null
src/HectorHardware.py
alesti/Hector9000
004bef61dbbc2e6b097df9b8af780a2823832702
[ "MIT" ]
null
null
null
src/HectorHardware.py
alesti/Hector9000
004bef61dbbc2e6b097df9b8af780a2823832702
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf8 ## # HectorHardware.py API class for Hector9000 hardware # # imports from __future__ import division devEnvironment = True import time import sys import Adafruit_PCA9685 from HectorConfig import config # Uncomment to enable debug output. import logging if not devEnvironment: ...
32.140684
93
0.554123
#!/usr/bin/env python3 # coding: utf8 ## # HectorHardware.py API class for Hector9000 hardware # # imports from __future__ import division devEnvironment = True import time import sys import Adafruit_PCA9685 from HectorConfig import config # Uncomment to enable debug output. import logging if not devEnvironment: ...
6,619
0
481
1788d4b6b59f755f8e638906566c4e4d581437cb
1,147
py
Python
tests/test_fields/test_fields.py
Grin941/ormik
90edee77a9ece0b605fc1b09ed554fba65b51888
[ "MIT" ]
null
null
null
tests/test_fields/test_fields.py
Grin941/ormik
90edee77a9ece0b605fc1b09ed554fba65b51888
[ "MIT" ]
null
null
null
tests/test_fields/test_fields.py
Grin941/ormik
90edee77a9ece0b605fc1b09ed554fba65b51888
[ "MIT" ]
null
null
null
import pytest from ormik import fields, FieldError class MockModel(object): """ Mock Model """ _pk = fields.AutoField(name='id') @classmethod
28.675
85
0.704446
import pytest from ormik import fields, FieldError class MockModel(object): """ Mock Model """ _pk = fields.AutoField(name='id') @classmethod def get(*args, **kwargs): return MockModel() def test_field_is_nullable_and_has_no_default_raise_error(): field = fields.CharField(name='field'...
867
0
118
c0f07e7a06b59a37355351ab95eb0851045be177
859
py
Python
tests/unit_tests/test_nn/test_layers/test_base/test_InputLayer.py
samysweb/dnnv
58fb95b7300914d9da28eed86c39eca473b1aaef
[ "MIT" ]
5
2022-01-28T20:30:34.000Z
2022-03-17T09:26:52.000Z
tests/unit_tests/test_nn/test_layers/test_base/test_InputLayer.py
samysweb/dnnv
58fb95b7300914d9da28eed86c39eca473b1aaef
[ "MIT" ]
9
2022-01-27T03:50:28.000Z
2022-02-08T18:42:17.000Z
tests/unit_tests/test_nn/test_layers/test_base/test_InputLayer.py
samysweb/dnnv
58fb95b7300914d9da28eed86c39eca473b1aaef
[ "MIT" ]
2
2022-02-03T17:32:43.000Z
2022-03-24T16:38:49.000Z
import numpy as np from dnnv.nn.graph import OperationGraph from dnnv.nn.layers import InputLayer from dnnv.nn.operations import *
28.633333
65
0.718277
import numpy as np from dnnv.nn.graph import OperationGraph from dnnv.nn.layers import InputLayer from dnnv.nn.operations import * def test_from_operation_graph(): op = Input((-1, 5), np.dtype(np.float32)) op_graph = OperationGraph([op]) layer = InputLayer.from_operation_graph(op_graph) assert isinst...
655
0
69
e82098c0ce14730bb6fac9d002e4f876c01522b0
244
py
Python
luz/conta/admin.py
HenriqueCCdA/contaDeLuz
c41433eac32f8ff0aca26d44f9cf1f6d227089cd
[ "MIT" ]
null
null
null
luz/conta/admin.py
HenriqueCCdA/contaDeLuz
c41433eac32f8ff0aca26d44f9cf1f6d227089cd
[ "MIT" ]
21
2021-12-06T03:04:01.000Z
2022-01-30T20:13:57.000Z
luz/conta/admin.py
HenriqueCCdA/contaDeLuz
c41433eac32f8ff0aca26d44f9cf1f6d227089cd
[ "MIT" ]
null
null
null
from django.contrib import admin from luz.conta.models import Conta @admin.register(Conta)
22.181818
54
0.692623
from django.contrib import admin from luz.conta.models import Conta @admin.register(Conta) class ContasAdmin(admin.ModelAdmin): list_display = ('id', 'date', 'amount_paid', 'mw') list_display_links = ('id',) ordering = ('date',)
0
128
22
0ce74bf5c1bd323b0673610a2ebf89124890049f
243
py
Python
game/test_suite/tests/__init__.py
HagenSR/byte_le_engine
5895d8559627594dd3c222b4c4754caad2817841
[ "MIT" ]
1
2020-04-05T05:06:32.000Z
2020-04-05T05:06:32.000Z
game/test_suite/tests/__init__.py
HagenSR/byte_le_engine
5895d8559627594dd3c222b4c4754caad2817841
[ "MIT" ]
2
2021-01-27T03:54:41.000Z
2021-05-17T05:11:16.000Z
game/test_suite/tests/__init__.py
HagenSR/byte_le_engine
5895d8559627594dd3c222b4c4754caad2817841
[ "MIT" ]
5
2021-01-27T02:43:27.000Z
2022-03-04T04:34:57.000Z
# When you create a new test file, make sure to add it here. # Simply import the class from your file, and then add that class to the '__all__' array. from game.test_suite.tests.test_example import TestExample __all__ = [ 'TestExample' ]
30.375
89
0.748971
# When you create a new test file, make sure to add it here. # Simply import the class from your file, and then add that class to the '__all__' array. from game.test_suite.tests.test_example import TestExample __all__ = [ 'TestExample' ]
0
0
0
12c475127eb58a54b6975bc40bc9067cc783b184
2,216
py
Python
collectors/convert_parcels.py
pengler/TravelTime
674909724a55fb87bae5b37ccda9e20b71fba680
[ "Unlicense" ]
null
null
null
collectors/convert_parcels.py
pengler/TravelTime
674909724a55fb87bae5b37ccda9e20b71fba680
[ "Unlicense" ]
null
null
null
collectors/convert_parcels.py
pengler/TravelTime
674909724a55fb87bae5b37ccda9e20b71fba680
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 import pandas as pd import pickle import sys # Simple script that takes in the Canada Post .add file # and outputs a pickled data frame. # # Input/Output files must be specified on the command line # convert_canada_add.py input_file output_file # # File must conform to specification located at: ...
48.173913
106
0.642148
#!/usr/bin/python3 import pandas as pd import pickle import sys # Simple script that takes in the Canada Post .add file # and outputs a pickled data frame. # # Input/Output files must be specified on the command line # convert_canada_add.py input_file output_file # # File must conform to specification located at: ...
0
0
0
f20a8755005ae36c95f61e4eecefff50f4435dd5
799
py
Python
actstream/settings.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/settings.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/settings.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings SETTINGS = getattr(settings, 'ACTSTREAM_SETTINGS', {}) def get_action_manager(): """ Returns the class of the action manager to use from ACTSTREAM_SETTINGS['MANAGER'] """ mod = SETTINGS.get('MANAGER', 'actstream.managers.ActionManager') mod_path = mod.split('.') ...
28.535714
85
0.634543
from django.conf import settings SETTINGS = getattr(settings, 'ACTSTREAM_SETTINGS', {}) def get_action_manager(): """ Returns the class of the action manager to use from ACTSTREAM_SETTINGS['MANAGER'] """ mod = SETTINGS.get('MANAGER', 'actstream.managers.ActionManager') mod_path = mod.split('.') ...
0
0
0
aced678e87940e191d3179afa615150ddfda1edd
1,263
py
Python
60-69/65_Valid Number.py
yanchdh/LeetCode
ec60364082ad246390cf3292090d23f1c7dd08b4
[ "BSD-2-Clause" ]
2
2018-01-12T08:45:08.000Z
2018-01-15T13:29:56.000Z
60-69/65_Valid Number.py
yanchdh/LeetCode
ec60364082ad246390cf3292090d23f1c7dd08b4
[ "BSD-2-Clause" ]
null
null
null
60-69/65_Valid Number.py
yanchdh/LeetCode
ec60364082ad246390cf3292090d23f1c7dd08b4
[ "BSD-2-Clause" ]
null
null
null
# -*- coding:utf-8 -*- # https://leetcode.com/problems/valid-number/description/
26.3125
64
0.354711
# -*- coding:utf-8 -*- # https://leetcode.com/problems/valid-number/description/ class Solution(object): def isNumber(self, s): """ :type s: str :rtype: bool """ SIGN = '+-' first, last = 0, len(s) - 1 while first <= last and s[first] == ' ': ...
0
1,160
23
f955679c55487858800ffc3eb7a805ba6b98357e
10,529
py
Python
neptune-python-utils/neptune_python_utils/batch_utils.py
vivgoyal-aws/amazon-neptune-tools
8f45ff47d6e320a00024d5892d750b2a2f113aa9
[ "Apache-2.0" ]
null
null
null
neptune-python-utils/neptune_python_utils/batch_utils.py
vivgoyal-aws/amazon-neptune-tools
8f45ff47d6e320a00024d5892d750b2a2f113aa9
[ "Apache-2.0" ]
null
null
null
neptune-python-utils/neptune_python_utils/batch_utils.py
vivgoyal-aws/amazon-neptune-tools
8f45ff47d6e320a00024d5892d750b2a2f113aa9
[ "Apache-2.0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. # 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
37.336879
140
0.608795
# Copyright Amazon.com, Inc. or its affiliates. # 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
8,415
611
188
b20e1c054a226a142956aa9d7c5c96f51f1d3ced
394
py
Python
ConsensusIO/web/migrations/0019_auto_20190824_1418.py
thedeg123/ConsensusIO
f96259ee611a874a79790bbe879ba4d9ed9d96e4
[ "MIT" ]
null
null
null
ConsensusIO/web/migrations/0019_auto_20190824_1418.py
thedeg123/ConsensusIO
f96259ee611a874a79790bbe879ba4d9ed9d96e4
[ "MIT" ]
null
null
null
ConsensusIO/web/migrations/0019_auto_20190824_1418.py
thedeg123/ConsensusIO
f96259ee611a874a79790bbe879ba4d9ed9d96e4
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-24 20:18 from django.db import migrations, models
20.736842
61
0.598985
# Generated by Django 2.2.4 on 2019-08-24 20:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0018_auto_20190730_1910'), ] operations = [ migrations.AlterField( model_name='article', name='review', ...
0
280
23
a6f3ba6cca4681b0ff380416d150c14648badcd3
485
py
Python
footballseason/migrations/0009_auto_20180919_0912.py
mkokotovich/footballpicks
9c158ed165adb040215b770a38d51a6d42a6600f
[ "MIT" ]
null
null
null
footballseason/migrations/0009_auto_20180919_0912.py
mkokotovich/footballpicks
9c158ed165adb040215b770a38d51a6d42a6600f
[ "MIT" ]
28
2015-09-15T21:04:14.000Z
2022-02-18T03:22:38.000Z
footballseason/migrations/0009_auto_20180919_0912.py
mkokotovich/footballpicks
9c158ed165adb040215b770a38d51a6d42a6600f
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-09-19 14:12 from django.db import migrations
22.045455
58
0.682474
# Generated by Django 2.0.5 on 2018-09-19 14:12 from django.db import migrations def fix2015GameSeason(apps, schema_editor): gameRecords = apps.get_model('footballseason', 'Game') for game in gameRecords.objects.filter(season=0): game.season=2015 game.save() class Migration(migrations.Migra...
180
175
46
8972012275a0deee85aff4a017530c31591adab1
10,655
py
Python
bugsy/bug.py
pyoor/Bugsy
468c98eab2c93e9fb3c0c93be61ebd1fda5059f6
[ "Apache-2.0" ]
9
2015-02-21T19:14:45.000Z
2020-10-08T10:38:46.000Z
bugsy/bug.py
pyoor/Bugsy
468c98eab2c93e9fb3c0c93be61ebd1fda5059f6
[ "Apache-2.0" ]
57
2015-01-16T14:14:42.000Z
2020-10-13T17:16:34.000Z
bugsy/bug.py
pyoor/Bugsy
468c98eab2c93e9fb3c0c93be61ebd1fda5059f6
[ "Apache-2.0" ]
14
2015-01-15T15:01:34.000Z
2021-08-05T21:48:09.000Z
import copy import datetime from .attachment import Attachment from .errors import BugException VALID_STATUS = ["ASSIGNED", "NEW", "REOPENED", "RESOLVED", "UNCONFIRMED", "VERIFIED"] VALID_RESOLUTION = ["DUPLICATE", "FIXED", "INACTIVE", "INCOMPLETE", "INVALID", "MOVED", "WONTFIX", "WORKSFORME"] ARR...
32.484756
90
0.538996
import copy import datetime from .attachment import Attachment from .errors import BugException VALID_STATUS = ["ASSIGNED", "NEW", "REOPENED", "RESOLVED", "UNCONFIRMED", "VERIFIED"] VALID_RESOLUTION = ["DUPLICATE", "FIXED", "INACTIVE", "INCOMPLETE", "INVALID", "MOVED", "WONTFIX", "WORKSFORME"] ARR...
2,443
0
154
9c5aeffd606ddde33b19ba0c563235a6d6ea5dcc
637
py
Python
monty-hall-problem/main.py
ehsankorhani/python-playground
80464d570e2ffdcee914202897539807d6c4c0c1
[ "MIT" ]
null
null
null
monty-hall-problem/main.py
ehsankorhani/python-playground
80464d570e2ffdcee914202897539807d6c4c0c1
[ "MIT" ]
null
null
null
monty-hall-problem/main.py
ehsankorhani/python-playground
80464d570e2ffdcee914202897539807d6c4c0c1
[ "MIT" ]
null
null
null
import random execute(100)
24.5
84
0.621664
import random def execute(number_of_try): doors = (1, 2, 3) change_success = 0 unchange_success = 0 count = 0 while (count < number_of_try): count = count + 1 car_door = random.choice(doors) player_choice = random.choice(doors) revealed_door = [d for d in doors if ...
585
0
23
86d8986974aef94ec342be5e21c7cf804fe7a8b4
376
py
Python
katas/kyu_7/batman_quotes.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_7/batman_quotes.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_7/batman_quotes.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
HERO = {'B': 'Batman', 'J': 'Joker', 'R': 'Robin'} OUTPUT = '{}: {}'.format
25.066667
50
0.478723
HERO = {'B': 'Batman', 'J': 'Joker', 'R': 'Robin'} OUTPUT = '{}: {}'.format class BatmanQuotes(object): @staticmethod def get_quote(quotes, hero): for i, a in enumerate(hero): if i == 0: hero = HERO[a] elif a.isdigit(): quotes = quotes[int(a)] ...
226
50
23
babb298d7b6f86b229eb63b2c93f4fd2b0f22ecb
5,808
py
Python
FHEM/bindings/python/tests/mocked/modules/ring/test_basics.py
jfmennedy/fhempy
009732921eb60c6169610ab0ff93843c91dd8fbe
[ "MIT" ]
16
2021-01-01T16:04:18.000Z
2022-03-10T21:46:44.000Z
FHEM/bindings/python/tests/mocked/modules/ring/test_basics.py
jfmennedy/fhempy
009732921eb60c6169610ab0ff93843c91dd8fbe
[ "MIT" ]
60
2020-12-27T19:18:02.000Z
2022-03-06T18:28:58.000Z
FHEM/bindings/python/tests/mocked/modules/ring/test_basics.py
jfmennedy/fhempy
009732921eb60c6169610ab0ff93843c91dd8fbe
[ "MIT" ]
10
2021-01-30T11:56:15.000Z
2022-02-18T13:01:05.000Z
import asyncio import datetime import logging import os import pytest import requests_mock from fhempy.lib.pkg_installer import check_and_install_dependencies from tests.utils import mock_fhem def load_fixture(filename): """Load a fixture.""" path = os.path.join(os.path.dirname(__file__), "fixtures", filenam...
37.230769
102
0.633264
import asyncio import datetime import logging import os import pytest import requests_mock from fhempy.lib.pkg_installer import check_and_install_dependencies from tests.utils import mock_fhem def load_fixture(filename): """Load a fixture.""" path = os.path.join(os.path.dirname(__file__), "fixtures", filenam...
5,332
0
44
c57937a50ad1bf33f8b27ee2c88bfe003be46dcb
2,645
py
Python
behave_manners/pagelems/dom_meta.py
xrg/behave_manners
93cb570e04af870f3401048d26dd7f0e8350759e
[ "BSD-2-Clause" ]
3
2020-02-02T11:11:44.000Z
2021-11-17T22:21:18.000Z
behave_manners/pagelems/dom_meta.py
xrg/behave_manners
93cb570e04af870f3401048d26dd7f0e8350759e
[ "BSD-2-Clause" ]
null
null
null
behave_manners/pagelems/dom_meta.py
xrg/behave_manners
93cb570e04af870f3401048d26dd7f0e8350759e
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- from __future__ import absolute_import from f3utils.service_meta import _ServiceMeta class DOM_Meta(_ServiceMeta): """Metaclass for `DOMScope` ones. Prepares a dictionary of descriptors that the scope can apply to components or pages under it. Operates at clas...
43.360656
96
0.627221
# -*- coding: UTF-8 -*- from __future__ import absolute_import from f3utils.service_meta import _ServiceMeta class DOM_Meta(_ServiceMeta): """Metaclass for `DOMScope` ones. Prepares a dictionary of descriptors that the scope can apply to components or pages under it. Operates at clas...
2,255
0
31
3e6c14e9f69111898dcff607e383b6263353af70
9,165
py
Python
mysite/createprofile/views.py
coetzeevs/chiron
f6d369a4df7986b6cb9b8c5eff42869d1746119c
[ "MIT" ]
null
null
null
mysite/createprofile/views.py
coetzeevs/chiron
f6d369a4df7986b6cb9b8c5eff42869d1746119c
[ "MIT" ]
null
null
null
mysite/createprofile/views.py
coetzeevs/chiron
f6d369a4df7986b6cb9b8c5eff42869d1746119c
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404,redirect, reverse, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.template import loader, RequestContext from django.urls import reverse from django.views import ge...
40.915179
133
0.674414
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404,redirect, reverse, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.template import loader, RequestContext from django.urls import reverse from django.views import ge...
7,909
0
264
d7513b357cbcf4f88145f38e920c9b04930f4297
1,944
py
Python
incasem/gunpowder/deep_copy_arrays.py
kirchhausenlab/incasem
ee9e007c5c04571e547e2fb5af5e800bd2d2b435
[ "BSD-3-Clause" ]
null
null
null
incasem/gunpowder/deep_copy_arrays.py
kirchhausenlab/incasem
ee9e007c5c04571e547e2fb5af5e800bd2d2b435
[ "BSD-3-Clause" ]
null
null
null
incasem/gunpowder/deep_copy_arrays.py
kirchhausenlab/incasem
ee9e007c5c04571e547e2fb5af5e800bd2d2b435
[ "BSD-3-Clause" ]
null
null
null
import copy from typing import List import logging import gunpowder as gp logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class DeepCopyArrays(gp.BatchFilter): """ Deep-copy arrays Args: arrays (List[gp.ArrayKey]): ArrayKeys to be copied output_arrays (List[gp.ArrayKey]):...
27
79
0.601337
import copy from typing import List import logging import gunpowder as gp logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class DeepCopyArrays(gp.BatchFilter): """ Deep-copy arrays Args: arrays (List[gp.ArrayKey]): ArrayKeys to be copied output_arrays (List[gp.ArrayKey]):...
1,475
0
108
db21c4d49cee3463191a723a4f0828b655fb61a3
2,566
py
Python
lunavl/sdk/estimators/face_estimators/mouth_state.py
AlexeyPichugin/lunasdk
e1e3cb053c0969abf6f5419617654372ac89f61b
[ "MIT" ]
8
2019-04-17T06:50:43.000Z
2022-02-09T07:54:28.000Z
lunavl/sdk/estimators/face_estimators/mouth_state.py
AlexeyPichugin/lunasdk
e1e3cb053c0969abf6f5419617654372ac89f61b
[ "MIT" ]
71
2019-04-17T06:50:48.000Z
2022-03-22T22:12:43.000Z
lunavl/sdk/estimators/face_estimators/mouth_state.py
AlexeyPichugin/lunasdk
e1e3cb053c0969abf6f5419617654372ac89f61b
[ "MIT" ]
7
2019-10-14T07:13:29.000Z
2022-03-24T08:00:36.000Z
"""Module contains a mouth state estimator see `mouth state`_ """ from typing import Union, Dict from FaceEngine import MouthEstimation, IMouthEstimatorPtr # pylint: disable=E0611,E0401 from lunavl.sdk.base import BaseEstimation from lunavl.sdk.errors.errors import LunaVLError from lunavl.sdk.errors.exceptions impo...
24.912621
114
0.6212
"""Module contains a mouth state estimator see `mouth state`_ """ from typing import Union, Dict from FaceEngine import MouthEstimation, IMouthEstimatorPtr # pylint: disable=E0611,E0401 from lunavl.sdk.base import BaseEstimation from lunavl.sdk.errors.errors import LunaVLError from lunavl.sdk.errors.exceptions impo...
72
0
26
4e72ade1c461fba295110e7d25e76408e5aa946d
5,521
py
Python
openrcv/test/test_models.py
Bayashka1/open-rcv
62400a9634e58fa358341a8b7e85613bcd69114e
[ "MIT" ]
1
2020-02-06T10:12:20.000Z
2020-02-06T10:12:20.000Z
openrcv/test/test_models.py
geverghe/open-rcv
62400a9634e58fa358341a8b7e85613bcd69114e
[ "MIT" ]
null
null
null
openrcv/test/test_models.py
geverghe/open-rcv
62400a9634e58fa358341a8b7e85613bcd69114e
[ "MIT" ]
1
2020-02-06T10:12:09.000Z
2020-02-06T10:12:09.000Z
# # Copyright (c) 2014 Chris Jerdonek. 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, modi...
35.619355
97
0.626698
# # Copyright (c) 2014 Chris Jerdonek. 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, modi...
2,929
27
289
b4d1dbaaef73250e5836b592814362163f3456ff
828
py
Python
setup.py
fabolhak/pdfoutliner
f5ebcda6aab8af4bb443aa59c279d771207e92db
[ "MIT" ]
null
null
null
setup.py
fabolhak/pdfoutliner
f5ebcda6aab8af4bb443aa59c279d771207e92db
[ "MIT" ]
null
null
null
setup.py
fabolhak/pdfoutliner
f5ebcda6aab8af4bb443aa59c279d771207e92db
[ "MIT" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name="pdfoutliner", version="0.0.3", author="GHPen", description="Command line interface for generating pdftk-style bookmark files in a user-friendly way, and (optionally) outputs a PDF file with t...
34.5
173
0.63285
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name="pdfoutliner", version="0.0.3", author="GHPen", description="Command line interface for generating pdftk-style bookmark files in a user-friendly way, and (optionally) outputs a PDF file with t...
0
0
0
9c125f4ad7f2611b441a3c79b379883634c28026
3,999
py
Python
pochtogramm/messenger/views.py
grand-roman/chat_site
01a2e1954beadf9f5945e69e5ba96e9dc6129812
[ "BSD-2-Clause" ]
null
null
null
pochtogramm/messenger/views.py
grand-roman/chat_site
01a2e1954beadf9f5945e69e5ba96e9dc6129812
[ "BSD-2-Clause" ]
null
null
null
pochtogramm/messenger/views.py
grand-roman/chat_site
01a2e1954beadf9f5945e69e5ba96e9dc6129812
[ "BSD-2-Clause" ]
null
null
null
from django.db.models import Count from django.http import HttpResponse from django.shortcuts import render from functools import wraps from time import sleep # Create your views here. from messenger.models import Message from users.models import CustomUser from django.db import connection, reset_queries i...
26.309211
123
0.603151
from django.db.models import Count from django.http import HttpResponse from django.shortcuts import render from functools import wraps from time import sleep # Create your views here. from messenger.models import Message from users.models import CustomUser from django.db import connection, reset_queries i...
3,127
0
321
cfb9b40c208db290ca0cd193dcccd61aae1a5167
3,790
py
Python
demo_display_compute_steps.py
brice-digilus/Infrared_Analysis
614a14b832f130f9cca9ea3659c08e40fb3d1b1c
[ "Apache-2.0" ]
null
null
null
demo_display_compute_steps.py
brice-digilus/Infrared_Analysis
614a14b832f130f9cca9ea3659c08e40fb3d1b1c
[ "Apache-2.0" ]
null
null
null
demo_display_compute_steps.py
brice-digilus/Infrared_Analysis
614a14b832f130f9cca9ea3659c08e40fb3d1b1c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Display the different computation steps for sensor to cubemap This file will allow to demonstrate the various computation setp associated with a cubemap transfer calculation @author: Brice Dubost Copyright 2020 Brice Dubost Licensed under the Apache License, Version 2.0 (the "Licen...
37.9
158
0.667546
# -*- coding: utf-8 -*- """ Display the different computation steps for sensor to cubemap This file will allow to demonstrate the various computation setp associated with a cubemap transfer calculation @author: Brice Dubost Copyright 2020 Brice Dubost Licensed under the Apache License, Version 2.0 (the "Licen...
0
0
0
9308a4f64bba2c5b253e8bd8fa1479282cc62184
46,265
py
Python
dino/db/__init__.py
thenetcircle/dino
1047c3458e91a1b4189e9f48f1393b3a68a935b3
[ "Apache-2.0" ]
150
2016-10-05T11:09:36.000Z
2022-03-06T16:24:41.000Z
dino/db/__init__.py
thenetcircle/dino
1047c3458e91a1b4189e9f48f1393b3a68a935b3
[ "Apache-2.0" ]
27
2017-03-02T03:37:02.000Z
2022-02-10T04:59:54.000Z
dino/db/__init__.py
thenetcircle/dino
1047c3458e91a1b4189e9f48f1393b3a68a935b3
[ "Apache-2.0" ]
21
2016-11-11T07:51:48.000Z
2020-04-26T21:38:33.000Z
#!/usr/bin/env python # 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 # d...
30.720452
150
0.57376
#!/usr/bin/env python # 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 # d...
0
45,498
23
cd31aa612a4ede394265c29ffc34fa7ca84c5ecb
1,621
py
Python
Heap/11_02_sort_increase_decrease_array.py
misscindy/Interview
eab43da97e61fcc3d0278408f8f4ea709eed14e6
[ "CC0-1.0" ]
null
null
null
Heap/11_02_sort_increase_decrease_array.py
misscindy/Interview
eab43da97e61fcc3d0278408f8f4ea709eed14e6
[ "CC0-1.0" ]
1
2015-04-23T20:05:24.000Z
2015-04-23T20:07:45.000Z
Heap/11_02_sort_increase_decrease_array.py
misscindy/Interview
eab43da97e61fcc3d0278408f8f4ea709eed14e6
[ "CC0-1.0" ]
null
null
null
# Sort a k increasing and decreasing array # [1, 2, 3, 3, 2, 1, 0, 4, 5] # find all the decreasing intervals and reverse them # add the result to a list # merge UP, DOWN = 0, 1 if __name__ == '__main__': test_cases = [ ([1, 2, 3, 4, 3, 1, 2, 4]), ] for test_case in test_cases: print...
22.830986
61
0.505244
# Sort a k increasing and decreasing array # [1, 2, 3, 3, 2, 1, 0, 4, 5] # find all the decreasing intervals and reverse them # add the result to a list # merge def split(arr): if len(arr) < 2: return sorted(arr) lo, high = 0, 1 sorted_subarray = [] while high < len(arr): while high <...
1,177
0
69
ee982a56ffd145a8e98271a627491cd2070845a8
6,009
py
Python
asyncio_rpc/commlayers/redis.py
nens/asyncio-rpc
26b963076fbc1c5ee412a5fbd3d949737fe7c946
[ "BSD-3-Clause" ]
9
2019-03-23T03:29:06.000Z
2022-02-26T01:04:15.000Z
asyncio_rpc/commlayers/redis.py
nens/asyncio-rpc
26b963076fbc1c5ee412a5fbd3d949737fe7c946
[ "BSD-3-Clause" ]
5
2019-04-09T09:05:42.000Z
2022-01-30T14:12:58.000Z
asyncio_rpc/commlayers/redis.py
nens/asyncio-rpc
26b963076fbc1c5ee412a5fbd3d949737fe7c946
[ "BSD-3-Clause" ]
null
null
null
from uuid import uuid4 from .base import AbstractRPCCommLayer from aioredis import create_redis from ..models import RPCStack, RPCResult, RPCBase, SERIALIZABLE_MODELS RESULT_EXPIRE_TIME = 300 # seconds class RPCRedisCommLayer(AbstractRPCCommLayer): """ Redis remote procedure call communication layer """...
32.657609
79
0.598769
from uuid import uuid4 from .base import AbstractRPCCommLayer from aioredis import create_redis from ..models import RPCStack, RPCResult, RPCBase, SERIALIZABLE_MODELS RESULT_EXPIRE_TIME = 300 # seconds class RPCRedisCommLayer(AbstractRPCCommLayer): """ Redis remote procedure call communication layer """...
330
0
27
ac9f3d8364a6e9dc621de636f5fa35ce6d2b74d8
1,423
py
Python
venv/app/Apoload.py
KarateJB/Python.Thsrc
5a61479bdaf2901b8a5a03a8f786a6e65105db0f
[ "MIT" ]
null
null
null
venv/app/Apoload.py
KarateJB/Python.Thsrc
5a61479bdaf2901b8a5a03a8f786a6e65105db0f
[ "MIT" ]
null
null
null
venv/app/Apoload.py
KarateJB/Python.Thsrc
5a61479bdaf2901b8a5a03a8f786a6e65105db0f
[ "MIT" ]
null
null
null
# import requests import os, sys, io import re import logging import datetime from pathlib import Path import csv Output_Path = str(os.path.join(os.getcwd(), 'Outputs')) Storage_Path = str(os.path.join(Output_Path,"APOPND_THSR_Ok.csv")) Latilongi_Keyword = "經緯座標"
27.365385
76
0.54884
# import requests import os, sys, io import re import logging import datetime from pathlib import Path import csv Output_Path = str(os.path.join(os.getcwd(), 'Outputs')) Storage_Path = str(os.path.join(Output_Path,"APOPND_THSR_Ok.csv")) Latilongi_Keyword = "經緯座標" class Apoload(): def __init__(self, target_file_...
1,045
-5
104
2eb0be39c98d9a06b327a0650b40988cc5f5b682
653
py
Python
scripts/devSetup/configuration.py
flauta/codecombat
8b0a0c4e516fb3d01815082f7c7650312b7cd8e5
[ "MIT" ]
1
2021-01-09T23:57:54.000Z
2021-01-09T23:57:54.000Z
scripts/devSetup/configuration.py
flauta/codecombat
8b0a0c4e516fb3d01815082f7c7650312b7cd8e5
[ "MIT" ]
4
2016-04-19T00:06:28.000Z
2016-04-19T02:25:22.000Z
scripts/devSetup/configuration.py
flauta/codecombat
8b0a0c4e516fb3d01815082f7c7650312b7cd8e5
[ "MIT" ]
2
2020-10-28T14:50:54.000Z
2020-11-05T12:39:19.000Z
__author__ = u'schmatz' from systemConfiguration import SystemConfiguration import os import directoryController import errors
32.65
75
0.750383
__author__ = u'schmatz' from systemConfiguration import SystemConfiguration import os import directoryController import errors class Configuration(object): def __init__(self): self.system = SystemConfiguration() assert isinstance(self.system,SystemConfiguration) self.directory = directoryCon...
428
73
22
cbf2971eaa2c406fdf6a42a11302cd12a9ae9139
265
py
Python
extended_choices/__main__.py
joehybird/django-extended-choices
c48c95276d4daaaf07093b00ec07d382ce27fdb2
[ "BSD-3-Clause" ]
60
2015-05-24T10:38:13.000Z
2022-03-13T12:16:16.000Z
extended_choices/__main__.py
joehybird/django-extended-choices
c48c95276d4daaaf07093b00ec07d382ce27fdb2
[ "BSD-3-Clause" ]
28
2015-04-02T22:19:44.000Z
2021-03-03T08:58:33.000Z
extended_choices/__main__.py
joehybird/django-extended-choices
c48c95276d4daaaf07093b00ec07d382ce27fdb2
[ "BSD-3-Clause" ]
12
2015-08-25T06:21:44.000Z
2019-12-10T01:39:48.000Z
"""Run doctests on choices.py and helpers.py""" import doctest import sys from . import choices, helpers failures = 0 failures += doctest.testmod(m=choices, report=True)[0] failures += doctest.testmod(m=helpers, report=True)[0] if failures > 0: sys.exit(1)
18.928571
54
0.716981
"""Run doctests on choices.py and helpers.py""" import doctest import sys from . import choices, helpers failures = 0 failures += doctest.testmod(m=choices, report=True)[0] failures += doctest.testmod(m=helpers, report=True)[0] if failures > 0: sys.exit(1)
0
0
0
fbde576fb227aae9f5a498ff8b07900760efbcae
301
py
Python
torchshapelets/src/torchshapelets/__init__.py
patrick-kidger/generalised_shapelets
04930c89dc4673e2af402895fe67655f8375a808
[ "MIT" ]
32
2020-05-31T17:41:58.000Z
2022-03-28T18:38:11.000Z
torchshapelets/src/torchshapelets/__init__.py
patrick-kidger/generalised_shapelets
04930c89dc4673e2af402895fe67655f8375a808
[ "MIT" ]
1
2022-02-09T22:13:03.000Z
2022-02-09T23:55:28.000Z
torchshapelets/src/torchshapelets/__init__.py
patrick-kidger/generalised_shapelets
04930c89dc4673e2af402895fe67655f8375a808
[ "MIT" ]
9
2020-07-17T16:50:24.000Z
2021-12-13T11:29:12.000Z
import torch # must be imported before anything from torchshapelets from .discrepancies import CppDiscrepancy, L2Discrepancy, LogsignatureDiscrepancy from .regularisation import similarity_regularisation from .shapelet_transform import GeneralisedShapeletTransform __version__ = '0.1.0' del torch
30.1
81
0.853821
import torch # must be imported before anything from torchshapelets from .discrepancies import CppDiscrepancy, L2Discrepancy, LogsignatureDiscrepancy from .regularisation import similarity_regularisation from .shapelet_transform import GeneralisedShapeletTransform __version__ = '0.1.0' del torch
0
0
0
bc495885b2db1f9adbe752afea5974b08b3eebb6
35,896
py
Python
pylivetrader/algorithm.py
yeahugo/pylivetrader
fad5598326a5f1847c5eb2110e07376670242ccb
[ "Apache-2.0" ]
null
null
null
pylivetrader/algorithm.py
yeahugo/pylivetrader
fad5598326a5f1847c5eb2110e07376670242ccb
[ "Apache-2.0" ]
null
null
null
pylivetrader/algorithm.py
yeahugo/pylivetrader
fad5598326a5f1847c5eb2110e07376670242ccb
[ "Apache-2.0" ]
null
null
null
# # Copyright 2015 Quantopian, Inc. # Modifications Copyright 2018 Alpaca # # 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...
33.485075
80
0.59483
# # Copyright 2015 Quantopian, Inc. # Modifications Copyright 2018 Alpaca # # 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...
10,639
0
947
4b7d83cd961663729b429fa2405b2e6ec596adae
16,003
py
Python
app/downloader.py
aCetylAcid/Sound-Euphonium
36680f23683dedc760ea1b7c26587acbccc838fd
[ "MIT" ]
1
2021-12-15T00:20:58.000Z
2021-12-15T00:20:58.000Z
app/downloader.py
aCetylAcid/Sound-Euphonium
36680f23683dedc760ea1b7c26587acbccc838fd
[ "MIT" ]
9
2015-07-18T08:22:44.000Z
2015-12-13T10:06:42.000Z
app/downloader.py
zrn-ns/sound-euphonium
36680f23683dedc760ea1b7c26587acbccc838fd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request, urllib.error import json import os import subprocess import logging import traceback import yaml from datetime import datetime import dateutil.parser from TwitterAPI import TwitterAPI import eyed3 from enum import Enum import shutil import uuid # 通知用...
36.453303
150
0.594888
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request, urllib.error import json import os import subprocess import logging import traceback import yaml from datetime import datetime import dateutil.parser from TwitterAPI import TwitterAPI import eyed3 from enum import Enum import shutil import uuid # 通知用...
13,560
1,379
756
58483188fa52bd9ffd7c0d57750baceebf767197
1,521
py
Python
synaptor/proc/overlap/merge/merge_overlaps.py
ZettaAI/Synaptor
e425b4c744fca093ee5c63f41b82b3cae7898af4
[ "MIT" ]
7
2018-04-01T18:18:23.000Z
2021-09-13T07:02:16.000Z
synaptor/proc/overlap/merge/merge_overlaps.py
ZettaAI/Synaptor
e425b4c744fca093ee5c63f41b82b3cae7898af4
[ "MIT" ]
5
2018-10-24T19:36:03.000Z
2020-10-30T02:13:38.000Z
synaptor/proc/overlap/merge/merge_overlaps.py
ZettaAI/Synaptor
e425b4c744fca093ee5c63f41b82b3cae7898af4
[ "MIT" ]
6
2018-07-12T17:59:54.000Z
2020-10-30T02:29:50.000Z
""" Overlap Matrix Consolidation """ import numpy as np import scipy.sparse as sp from .. import overlap def apply_chunk_id_maps(overlap_arr, chunk_id_maps): """ Applies id maps to each overlap matrix, returns a combined overlap mat """ rs, cs, vs = list(), list(), list() for (overlap, id_map) ...
24.934426
74
0.667324
""" Overlap Matrix Consolidation """ import numpy as np import scipy.sparse as sp from .. import overlap def apply_chunk_id_maps(overlap_arr, chunk_id_maps): """ Applies id maps to each overlap matrix, returns a combined overlap mat """ rs, cs, vs = list(), list(), list() for (overlap, id_map) ...
888
0
69
0c91b948610f0d9ba775fc671dec1e879e4620fa
2,408
py
Python
algorithms/dynamic_programming/maximal_square.py
emirot/algo-loco.blog
0e377a7b0699ded1599a9a5025148236bc2ee22a
[ "Apache-2.0" ]
null
null
null
algorithms/dynamic_programming/maximal_square.py
emirot/algo-loco.blog
0e377a7b0699ded1599a9a5025148236bc2ee22a
[ "Apache-2.0" ]
null
null
null
algorithms/dynamic_programming/maximal_square.py
emirot/algo-loco.blog
0e377a7b0699ded1599a9a5025148236bc2ee22a
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": print("start") # arr = [ # [1, 0, 1, 0, 0], # [1, 0, 1, 1, 1], # [0, 1, 1, 1, 1], # [1, 0, 0, 1, 0] # ] # arr = [ # [1, 1, 1], # [1, 1, 1], # [0, 1, 1] # ] # maximal_square(arr) arr = [ [1,...
25.347368
92
0.407392
def in_square(matrix, row, col): if row > len(matrix) or row < 0: return False if col > len(matrix[0]) or col < 0: return False return True def check_all(matrix, row, col, i): if in_square(matrix, row + i + 1, col + i+1): for i_row in range(row, row + i + 1): fo...
1,502
0
92
e549725eb393ff9f7c1472fd6ddd752e2bb26109
3,115
py
Python
Widen/LC1383_Maximum_Performance_of_a_Team.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
Widen/LC1383_Maximum_Performance_of_a_Team.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
Widen/LC1383_Maximum_Performance_of_a_Team.py
crazywiden/Leetcode_daily_submit
15637e260ab547022ac0c828dd196337bd8d50a3
[ "MIT" ]
null
null
null
""" 1383. Maximum Performance of a Team There are n engineers numbered from 1 to n and two arrays: speed and efficiency, where speed[i] and efficiency[i] represent the speed and efficiency for the i-th engineer respectively. Return the maximum performance of a team composed of at most k engineers, since the answer can ...
42.671233
326
0.619262
""" 1383. Maximum Performance of a Team There are n engineers numbered from 1 to n and two arrays: speed and efficiency, where speed[i] and efficiency[i] represent the speed and efficiency for the i-th engineer respectively. Return the maximum performance of a team composed of at most k engineers, since the answer can ...
1,146
-12
96
25a46ca488311567c2544306c10860989caad4c4
2,324
py
Python
MemberShip/web/admin/app/views/index.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
MemberShip/web/admin/app/views/index.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
MemberShip/web/admin/app/views/index.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from flask import Blueprint from flask import session from flask import request from flask import redirect from flask import render_template from flask import current_app from flask.ext.babel import gettext from flask.ext.login import login_required from flask.ext.login import login_user from ...
25.26087
81
0.672117
# -*- coding:utf-8 -*- from flask import Blueprint from flask import session from flask import request from flask import redirect from flask import render_template from flask import current_app from flask.ext.babel import gettext from flask.ext.login import login_required from flask.ext.login import login_user from ...
1,241
1
223
b4dc8d606c00d9bc89e9a4a07fc264a927ad7e27
6,126
py
Python
sleepy/api_peewee.py
sloria/PythonORMSleepy
ff62766d5b32dd586ab3f1e928f01d01fc9116d0
[ "MIT" ]
122
2015-02-05T13:29:17.000Z
2021-12-25T13:06:30.000Z
sleepy/api_peewee.py
sloria/PythonORMSleepy
ff62766d5b32dd586ab3f1e928f01d01fc9116d0
[ "MIT" ]
1
2018-01-02T23:33:36.000Z
2018-01-04T19:52:39.000Z
sleepy/api_peewee.py
sloria/PythonORMSleepy
ff62766d5b32dd586ab3f1e928f01d01fc9116d0
[ "MIT" ]
28
2015-06-16T16:49:49.000Z
2022-03-30T07:39:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Hello Peewee.''' from datetime import datetime, timedelta from flask import Flask, jsonify, request, render_template, abort from flask.ext.classy import FlaskView from flask_peewee.db import Database from flask_peewee.utils import get_object_or_404 import peewee as pw ...
32.073298
80
0.61443
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Hello Peewee.''' from datetime import datetime, timedelta from flask import Flask, jsonify, request, render_template, abort from flask.ext.classy import FlaskView from flask_peewee.db import Database from flask_peewee.utils import get_object_or_404 import peewee as pw ...
302
4,265
206
7c561caa93619f8eb0a9ca7001ec19307c2ebe9e
1,079
py
Python
ssd/solver/lr_scheduler.py
Sethan/deeplearning-graphics
ce164847a323d3f07cfe241f4bbed6029777c58d
[ "MIT" ]
1
2020-07-27T20:55:56.000Z
2020-07-27T20:55:56.000Z
ssd/solver/lr_scheduler.py
Sethan/deeplearning-graphics
ce164847a323d3f07cfe241f4bbed6029777c58d
[ "MIT" ]
1
2021-02-18T14:37:10.000Z
2021-02-19T21:41:53.000Z
SSD/ssd/solver/lr_scheduler.py
Sandbergo/autonomous-vehicle-detection
4478243e35eb216343bbff2ead1bc22f85488445
[ "MIT" ]
null
null
null
from bisect import bisect_right from torch.optim.lr_scheduler import _LRScheduler
34.806452
80
0.613531
from bisect import bisect_right from torch.optim.lr_scheduler import _LRScheduler class WarmupMultiStepLR(_LRScheduler): def __init__(self, optimizer, milestones, gamma=0.1, warmup_factor=1.0 / 3, warmup_iters=500, last_epoch=-1): if not list(milestones) == sorted(milestones): ...
903
17
76
538d4799c179d92459d568c4fa2676baa367a319
1,844
py
Python
fan_control.py
ChristianStrube-dev/Raspberry-Pi-PWM-Fan-Control
400944fe06da3f31da4abef17cba1f705a6faf96
[ "MIT" ]
1
2021-12-29T10:37:21.000Z
2021-12-29T10:37:21.000Z
fan_control.py
DriftKingTW/Raspberry-Pi-PWM-Fan-Contorl
400944fe06da3f31da4abef17cba1f705a6faf96
[ "MIT" ]
null
null
null
fan_control.py
DriftKingTW/Raspberry-Pi-PWM-Fan-Contorl
400944fe06da3f31da4abef17cba1f705a6faf96
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import RPi.GPIO as GPIO import time import signal import sys # The Noctua PWM control actually wants 25 kHz (kilo!), see page 6 on: # https://noctua.at/pub/media/wysiwyg/Noctua_PWM_specifications_white_paper.pdf # However, the RPi.GPIO library causes high CPU usage when using high # frequencies...
31.793103
79
0.691432
#! /usr/bin/env python3 import RPi.GPIO as GPIO import time import signal import sys # The Noctua PWM control actually wants 25 kHz (kilo!), see page 6 on: # https://noctua.at/pub/media/wysiwyg/Noctua_PWM_specifications_white_paper.pdf # However, the RPi.GPIO library causes high CPU usage when using high # frequencies...
310
0
46
005f4f653f3a9fe0854c626c81d1002c0d6959e2
3,367
py
Python
variance/__init__.py
ExpandingDev/Variance
3afba3638ae0557673f171c571d4acc29ee363b4
[ "Unlicense" ]
null
null
null
variance/__init__.py
ExpandingDev/Variance
3afba3638ae0557673f171c571d4acc29ee363b4
[ "Unlicense" ]
null
null
null
variance/__init__.py
ExpandingDev/Variance
3afba3638ae0557673f171c571d4acc29ee363b4
[ "Unlicense" ]
null
null
null
import pathlib import shutil import logging from flask import Flask, current_app from flask_sqlalchemy import SQLAlchemy from flask_smorest import Api from variance.extensions import db
31.46729
144
0.708643
import pathlib import shutil import logging from flask import Flask, current_app from flask_sqlalchemy import SQLAlchemy from flask_smorest import Api from variance.extensions import db def load_default_settings(app): from variance.api.defaults import DefaultSettingsManager instance_path = pathlib.Path(app.in...
3,042
0
138
15fc52d90121b75e89e2de7091ae8e996e1cade6
2,548
py
Python
N50_Calculator.py
djphan/N50_Calculator
ccf15913d7c16027e137167d3bd4d7860ec4e1bf
[ "MIT" ]
1
2017-06-23T04:00:36.000Z
2017-06-23T04:00:36.000Z
N50_Calculator.py
djphan/N50_Calculator
ccf15913d7c16027e137167d3bd4d7860ec4e1bf
[ "MIT" ]
null
null
null
N50_Calculator.py
djphan/N50_Calculator
ccf15913d7c16027e137167d3bd4d7860ec4e1bf
[ "MIT" ]
2
2017-09-29T04:56:36.000Z
2018-09-12T18:54:17.000Z
#!/usr/bin/env python # Run using python3 N50_Calculator <Input Path> <GenomeSize (Optional)> import sys import os import scipy if __name__ == "__main__": if len(sys.argv) == 2: if os.path.isfile(sys.argv[1]): NGorN50(file_path=sys.argv[1]) else: print ('Improper Input Path ...
31.85
113
0.605573
#!/usr/bin/env python # Run using python3 N50_Calculator <Input Path> <GenomeSize (Optional)> import sys import os import scipy def file_parser(file_path): # Parses a txt file to consolidate all the contig lengths into a list # txt file must contain contigs on seperate lines for this parsing func to work o...
1,565
0
46
dd067a68688d129c235c0af7ce2babac7aed4ae5
7,305
py
Python
corehq/apps/linked_domain/local_accessors.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/linked_domain/local_accessors.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/linked_domain/local_accessors.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from corehq import feature_previews, toggles from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition from corehq.apps.data_dictionary.models import CaseType, CaseProperty from corehq.apps.fixtures.dbaccessors import get_fixture_data_type_by_tag, get_fixture_item...
36.525
109
0.649692
from collections import defaultdict from corehq import feature_previews, toggles from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition from corehq.apps.data_dictionary.models import CaseType, CaseProperty from corehq.apps.fixtures.dbaccessors import get_fixture_data_type_by_tag, get_fixture_item...
6,162
0
276
c749d51261be42235d887de763e701a079c7dc38
7,189
py
Python
supersaop/src/observation_planning.py
arthur-bit-monnot/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
13
2018-11-19T15:51:23.000Z
2022-01-16T11:24:21.000Z
supersaop/src/observation_planning.py
fire-rs-laas/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
14
2017-10-12T16:19:19.000Z
2018-03-12T12:07:56.000Z
supersaop/src/observation_planning.py
fire-rs-laas/fire-rs-saop
321e16fceebf44e8e97b482c24f37fbf6dd7d162
[ "BSD-2-Clause" ]
4
2018-03-12T12:28:55.000Z
2021-07-07T18:32:17.000Z
#!/usr/bin/env python3 # Copyright (c) 2018, CNRS-LAAS # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list...
46.681818
100
0.68271
#!/usr/bin/env python3 # Copyright (c) 2018, CNRS-LAAS # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list...
3,493
1,212
23
46eb9f2f0580988c472ef5fd53d6d6b432dc002d
14,561
py
Python
smilepack/utils/status.py
andreymal/smilepack
be0e49cbf0dd515664667f529a346f4679c44d9e
[ "MIT" ]
null
null
null
smilepack/utils/status.py
andreymal/smilepack
be0e49cbf0dd515664667f529a346f4679c44d9e
[ "MIT" ]
null
null
null
smilepack/utils/status.py
andreymal/smilepack
be0e49cbf0dd515664667f529a346f4679c44d9e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import random from datetime import datetime, timedelta from pony import orm from flask import url_for from flask_babel import format_timedelta from smilepack.database import db from smilepack import models
44.803077
207
0.588146
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import random from datetime import datetime, timedelta from pony import orm from flask import url_for from flask_babel import format_timedelta from smilepack.database import db from smilepack import models class ANSI: RESET = '\x1b[0m' BOL...
13,898
170
207
808c2733b1e7d2bd42ce5c9e117fef521fc12807
16,645
py
Python
src/mcedit2/rendering/chunkupdate.py
elcarrion06/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
673
2015-01-02T02:08:13.000Z
2022-03-24T19:38:14.000Z
src/mcedit2/rendering/chunkupdate.py
ozzhates/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
526
2015-01-01T02:10:53.000Z
2022-02-06T16:24:21.000Z
src/mcedit2/rendering/chunkupdate.py
ozzhates/mcedit2
4bb98da521447b6cf43d923cea9f00acf2f427e9
[ "BSD-3-Clause" ]
231
2015-01-01T16:47:30.000Z
2022-03-31T21:51:55.000Z
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy from mcedit2.rendering.modelmesh import BlockModelMesh from mcedit2.rendering import layers from mcedit2.rendering.chunkmeshes.chunksections import ChunkSectionsRenderer from mcedit2.rend...
33.626263
140
0.618865
""" ${NAME} """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy from mcedit2.rendering.modelmesh import BlockModelMesh from mcedit2.rendering import layers from mcedit2.rendering.chunkmeshes.chunksections import ChunkSectionsRenderer from mcedit2.rend...
5,478
9,937
69
08c85ee5bdb965508f8ee6879378be139ab31014
924
py
Python
pylark/api_service_search_data_source_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
7
2021-08-18T00:42:05.000Z
2022-03-14T09:49:15.000Z
pylark/api_service_search_data_source_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
null
null
null
pylark/api_service_search_data_source_delete.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
1
2022-03-14T09:49:20.000Z
2022-03-14T09:49:20.000Z
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s @attr.s
28
86
0.727273
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s class DeleteSearchDataSourceReq(object): data_source_id: str = attr.ib( default=""...
417
227
67
2ce3c2046a9218e7d6952901a32a26a6574ddac3
52
py
Python
kivymd/uix/filemanager/__init__.py
marvelous-benji/KivyMD
4ab8dd339902597eaa9f8a4f9a80d8a6eb7d6053
[ "MIT" ]
1,111
2015-07-15T02:31:09.000Z
2022-03-29T17:22:02.000Z
kivymd/uix/filemanager/__init__.py
marvelous-benji/KivyMD
4ab8dd339902597eaa9f8a4f9a80d8a6eb7d6053
[ "MIT" ]
706
2015-06-10T22:24:13.000Z
2022-03-31T16:22:39.000Z
kivymd/uix/filemanager/__init__.py
marvelous-benji/KivyMD
4ab8dd339902597eaa9f8a4f9a80d8a6eb7d6053
[ "MIT" ]
561
2015-07-15T04:57:23.000Z
2022-03-31T17:14:31.000Z
from .filemanager import MDFileManager # NOQA F401
26
51
0.807692
from .filemanager import MDFileManager # NOQA F401
0
0
0
d261e495ba7a57bd5f1fd2aeae16cfe64642d9c8
752
py
Python
app/DB.py
wanghao923/saltadmin2.0
aed384460da4977547c4f819e8160ad9f46adffb
[ "MIT" ]
null
null
null
app/DB.py
wanghao923/saltadmin2.0
aed384460da4977547c4f819e8160ad9f46adffb
[ "MIT" ]
null
null
null
app/DB.py
wanghao923/saltadmin2.0
aed384460da4977547c4f819e8160ad9f46adffb
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Wrapper Database from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session
31.333333
99
0.69016
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Wrapper Database from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session class Database: def __init__(self,host='localhost',port=3306,db='mysql',user='root',passwd='',charset='utf-8'): db_uri = 'mysql+m...
475
-6
104
0c2ec07afff33c841dada059208df04504f57fd6
224
py
Python
test/resources/test_async.py
gmarinella9/python-flask-celery-example
fedba4752998ce3591d336f7be617a124e291a2f
[ "MIT" ]
44
2018-03-13T16:20:07.000Z
2022-03-05T04:41:17.000Z
test/resources/test_async.py
gmarinella9/python-flask-celery-example
fedba4752998ce3591d336f7be617a124e291a2f
[ "MIT" ]
1
2019-02-02T11:41:40.000Z
2019-02-02T11:41:40.000Z
test/resources/test_async.py
gmarinella9/python-flask-celery-example
fedba4752998ce3591d336f7be617a124e291a2f
[ "MIT" ]
15
2018-08-14T23:01:13.000Z
2021-06-22T11:34:56.000Z
"""Tests of asynchronous tasks.""" def test_byeworld_async(byeworld): """Test of ByWorld asynchronous task method.""" task = byeworld.asynchronous.delay('test') assert task.get(timeout=10) == {'async': 'test'}
28
52
0.683036
"""Tests of asynchronous tasks.""" def test_byeworld_async(byeworld): """Test of ByWorld asynchronous task method.""" task = byeworld.asynchronous.delay('test') assert task.get(timeout=10) == {'async': 'test'}
0
0
0
01be5fb5170a9f67f5eabf85ba9b20f7e225ae3f
4,428
py
Python
test_add_and_search_word.py
brigitteunger/katas
3f9af88fe5d98753360457084741f573c863dc25
[ "MIT" ]
null
null
null
test_add_and_search_word.py
brigitteunger/katas
3f9af88fe5d98753360457084741f573c863dc25
[ "MIT" ]
null
null
null
test_add_and_search_word.py
brigitteunger/katas
3f9af88fe5d98753360457084741f573c863dc25
[ "MIT" ]
null
null
null
import unittest from typing import Dict, Optional, Any if __name__ == "__main__": unittest.main()
30.965035
125
0.564589
import unittest from typing import Dict, Optional, Any class Trie: def __init__(self) -> None: """ Initialize your data structure here. """ # Note that using a dictionary for children (as in this implementation) # would not by default lexicographically sort the children, wh...
1,246
2,737
338
ae60921a46a72e06a2ef341d63819da2f171183b
2,801
py
Python
lib/candy_editor/qt/controls/GLWidget.py
lihaochen910/Candy
d12cb964768459c22f30c22531d3e1734901e814
[ "MIT" ]
1
2021-11-06T14:38:37.000Z
2021-11-06T14:38:37.000Z
lib/candy_editor/qt/controls/GLWidget.py
lihaochen910/Candy
d12cb964768459c22f30c22531d3e1734901e814
[ "MIT" ]
5
2021-11-06T04:23:06.000Z
2022-03-12T01:03:25.000Z
lib/candy_editor/qt/controls/GLWidget.py
lihaochen910/Candy
d12cb964768459c22f30c22531d3e1734901e814
[ "MIT" ]
1
2021-11-07T05:19:51.000Z
2021-11-07T05:19:51.000Z
from PyQt5 import QtCore, QtOpenGL from PyQt5.QtCore import Qt ##----------------------------------------------------------------##
27.460784
80
0.687612
from PyQt5 import QtCore, QtOpenGL from PyQt5.QtCore import Qt class GLWidget ( QtOpenGL.QGLWidget ): sharedWidget = None @staticmethod def getSharedWidget (): if not GLWidget.sharedWidget: fmt = QtOpenGL.QGLFormat () fmt.setRgba ( True ) fmt.setAlpha ( True ) fmt.setDepth ( True ) fmt.setDoubleB...
2,282
316
68
a0e137194c77df2e234797221a20212fd051f887
2,309
py
Python
model/obsolete/crop_human_method_4.py
AathmanT/ThEmoBe
0e877d5a0e34dc55bedc171d27342a31dbe75efd
[ "Apache-2.0" ]
9
2021-01-13T05:00:52.000Z
2021-02-02T13:33:25.000Z
model/obsolete/crop_human_method_4.py
AathmanT/ThEmoBe
0e877d5a0e34dc55bedc171d27342a31dbe75efd
[ "Apache-2.0" ]
null
null
null
model/obsolete/crop_human_method_4.py
AathmanT/ThEmoBe
0e877d5a0e34dc55bedc171d27342a31dbe75efd
[ "Apache-2.0" ]
5
2020-09-11T17:08:12.000Z
2020-12-29T03:20:43.000Z
import cv2 import matplotlib.pyplot as plt from utils import * from darknet import Darknet import keras import cv2 import os import numpy as np import pandas as pd from os import listdir from os.path import isfile, join, isdir from PIL import Image import numpy as np import shelve import matplotlib.pyplot as plt # ...
27.819277
88
0.692074
import cv2 import matplotlib.pyplot as plt from utils import * from darknet import Darknet import keras import cv2 import os import numpy as np import pandas as pd from os import listdir from os.path import isfile, join, isdir from PIL import Image import numpy as np import shelve import matplotlib.pyplot as plt # ...
1,435
0
23
ecb469676e60d9bb3ab8ed15c5a8253d15a220a9
1,635
py
Python
tests/test_mapdict.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
241
2015-01-02T18:49:09.000Z
2022-03-15T15:08:45.000Z
tests/test_mapdict.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
16
2015-05-04T21:31:08.000Z
2020-06-04T22:49:36.000Z
tests/test_mapdict.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
24
2015-02-15T05:35:11.000Z
2022-03-22T13:29:04.000Z
import pytest from topaz import mapdict
38.928571
96
0.655657
import pytest from topaz import mapdict class FakeObject(object): def __init__(self, map): self.map = map self.object_storage = self.unboxed_storage = None class TestMapDict(object): @pytest.mark.parametrize("i", range(10)) def test_simple_size_estimation(self, space, i): class_...
1,365
155
72
7b2c8a1f9cb76c52ffc16c70451ce51af4c0785c
5,659
py
Python
lyricpsych/extractors/linguistic_features.py
mmc-tudelft/lyricpsych
29f5c1a64c914b09d1400df1732164d10c013312
[ "Apache-2.0" ]
null
null
null
lyricpsych/extractors/linguistic_features.py
mmc-tudelft/lyricpsych
29f5c1a64c914b09d1400df1732164d10c013312
[ "Apache-2.0" ]
null
null
null
lyricpsych/extractors/linguistic_features.py
mmc-tudelft/lyricpsych
29f5c1a64c914b09d1400df1732164d10c013312
[ "Apache-2.0" ]
null
null
null
from itertools import chain import numpy as np import pandas as pd from tqdm import tqdm from ..preprocessing import SW as stop_words from .base import BaseTextFeatureExtractor, TextFeature def _compute_linguistic_features(words_corpus, show_progress=True, extreme_thresh=[2, 0.75]...
31.265193
89
0.611946
from itertools import chain import numpy as np import pandas as pd from tqdm import tqdm from ..preprocessing import SW as stop_words from .base import BaseTextFeatureExtractor, TextFeature class LinguisticFeature(BaseTextFeatureExtractor): def __init__(self, extreme_thresh=[2, .75]): super().__init__(...
380
352
46
95bd26d40ada211fd3627cdee2e689a6ac035d9e
98
py
Python
console/config/settings/production.py
RishiKumarRay/scantron
554ebebde1137eeba2ec38e83a59aca4f2f537ef
[ "Apache-2.0" ]
684
2018-08-21T03:38:03.000Z
2022-03-28T17:35:32.000Z
console/config/settings/production.py
RishiKumarRay/scantron
554ebebde1137eeba2ec38e83a59aca4f2f537ef
[ "Apache-2.0" ]
154
2018-08-22T20:07:09.000Z
2021-11-19T08:51:14.000Z
console/config/settings/production.py
RishiKumarRay/scantron
554ebebde1137eeba2ec38e83a59aca4f2f537ef
[ "Apache-2.0" ]
129
2018-08-21T08:54:50.000Z
2022-03-24T11:05:45.000Z
# Actual file used is kept in scantron/ansible-playbooks/roles/console/templates/production.py.j2
49
97
0.826531
# Actual file used is kept in scantron/ansible-playbooks/roles/console/templates/production.py.j2
0
0
0
06f3a8baf7316f9a502eb5725986dcf31b81947c
2,008
py
Python
src/spline2/tests/gen_trace.py
djstaros/qmcpack
280f67e638bae280448b47fa618f05b848c530d2
[ "NCSA" ]
null
null
null
src/spline2/tests/gen_trace.py
djstaros/qmcpack
280f67e638bae280448b47fa618f05b848c530d2
[ "NCSA" ]
11
2020-05-09T20:57:21.000Z
2020-06-10T00:00:17.000Z
src/spline2/tests/gen_trace.py
djstaros/qmcpack
280f67e638bae280448b47fa618f05b848c530d2
[ "NCSA" ]
1
2019-07-23T17:44:39.000Z
2019-07-23T17:44:39.000Z
from sympy import * # Verify SymTrace in MultiBspline.hpp # The first part of this script verifies the expression for the trace of the product of a # symmetric matrix (H) and a general matrix (G). # The second part creates body of the SymTrace test in test_multi_spline.cpp. G = MatrixSymbol('G', 3, 3) H = MatrixSy...
24.487805
135
0.571215
from sympy import * # Verify SymTrace in MultiBspline.hpp # The first part of this script verifies the expression for the trace of the product of a # symmetric matrix (H) and a general matrix (G). # The second part creates body of the SymTrace test in test_multi_spline.cpp. G = MatrixSymbol('G', 3, 3) H = MatrixSy...
0
0
0
6cf064dd5a494d5c06e6963ed7a8ed187af9934f
254
py
Python
src/BOJ/boj_4673.py
onehowon/-python
c9f5154c2884aee3b33804e14c02d7d0be29b926
[ "Apache-2.0" ]
23
2020-09-01T08:32:06.000Z
2021-11-16T07:26:21.000Z
src/BOJ/boj_4673.py
onehowon/-python
c9f5154c2884aee3b33804e14c02d7d0be29b926
[ "Apache-2.0" ]
null
null
null
src/BOJ/boj_4673.py
onehowon/-python
c9f5154c2884aee3b33804e14c02d7d0be29b926
[ "Apache-2.0" ]
2
2020-12-07T00:47:49.000Z
2021-09-05T13:25:28.000Z
# 4673 셀프넘버 set_number = [d(n) for n in range(1, 10000 + 1)] self_number = [n for n in range(1, 10000 + 1) if n not in set_number] for s in self_number: print(s)
19.538462
69
0.57874
# 4673 셀프넘버 def d(n: int) -> int: for i in list(str(n)): n = n + int(i) return n set_number = [d(n) for n in range(1, 10000 + 1)] self_number = [n for n in range(1, 10000 + 1) if n not in set_number] for s in self_number: print(s)
63
0
22
92e25b292d60655830850d21d1fed9bd9a25ac97
5,108
py
Python
examples/nas/oneshot/spos/network.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
2,305
2018-09-07T12:42:26.000Z
2019-05-06T20:14:24.000Z
examples/nas/oneshot/spos/network.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
379
2018-09-10T10:19:50.000Z
2019-05-06T18:04:46.000Z
examples/nas/oneshot/spos/network.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
314
2018-09-08T05:36:08.000Z
2019-05-06T08:48:51.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import pickle import re import torch import nni.retiarii.nn.pytorch as nn from nni.retiarii.nn.pytorch import LayerChoice from nni.retiarii.serializer import model_wrapper from blocks import ShuffleNetBlock, ShuffleXceptionBlock @mo...
37.014493
114
0.599452
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import pickle import re import torch import nni.retiarii.nn.pytorch as nn from nni.retiarii.nn.pytorch import LayerChoice from nni.retiarii.serializer import model_wrapper from blocks import ShuffleNetBlock, ShuffleXceptionBlock @mo...
4,479
251
45
91011fae712489fb6ddf7475af2d49da433ffa9a
1,435
py
Python
taskcat/_s3_stage.py
GlennChia/taskcat
26bf4a0207e4b161df7ba76048c1a9142bb115d1
[ "Apache-2.0" ]
63
2021-11-05T21:49:03.000Z
2022-03-29T17:14:27.000Z
taskcat/_s3_stage.py
GlennChia/taskcat
26bf4a0207e4b161df7ba76048c1a9142bb115d1
[ "Apache-2.0" ]
21
2021-11-04T15:43:22.000Z
2022-03-11T17:08:03.000Z
taskcat/_s3_stage.py
GlennChia/taskcat
26bf4a0207e4b161df7ba76048c1a9142bb115d1
[ "Apache-2.0" ]
8
2021-11-08T11:24:53.000Z
2022-03-22T11:21:37.000Z
import logging from functools import partial from multiprocessing.dummy import Pool as ThreadPool from taskcat._s3_sync import S3Sync from taskcat.exceptions import TaskCatException LOG = logging.getLogger(__name__)
25.175439
84
0.684321
import logging from functools import partial from multiprocessing.dummy import Pool as ThreadPool from taskcat._s3_sync import S3Sync from taskcat.exceptions import TaskCatException LOG = logging.getLogger(__name__) class S3APIResponse: def __init__(self, _x): self._http_code = _x["ResponseMetadata"]["H...
1,018
103
92
766268adb1d44cd5a6a7e7443835e0631e55d1bc
1,169
py
Python
back/test/api/test_auth_api.py
jamalg/my_shops
ccba408aae3b7270ace57c608599a194fa9fe4c8
[ "MIT" ]
null
null
null
back/test/api/test_auth_api.py
jamalg/my_shops
ccba408aae3b7270ace57c608599a194fa9fe4c8
[ "MIT" ]
null
null
null
back/test/api/test_auth_api.py
jamalg/my_shops
ccba408aae3b7270ace57c608599a194fa9fe4c8
[ "MIT" ]
null
null
null
import json from back.models import helper
28.512195
67
0.656116
import json from back.models import helper def test_valid_login(client, user_data): helper.add_user(user_data) payload = { "email": user_data["email"], "password": user_data["password"] } response = client.post("/api/auth/login", json=payload) assert response.status_code == 200 ...
1,077
0
46
cc61315b51811ff544fa6013a81cad1933535621
1,128
py
Python
dictknife/loading/_yaml.py
podhmo/dictknife
a172220c1adc8411b69f31646ea2154932d71516
[ "MIT" ]
13
2018-11-23T15:55:18.000Z
2021-11-24T02:42:44.000Z
dictknife/loading/_yaml.py
podhmo/dictknife
a172220c1adc8411b69f31646ea2154932d71516
[ "MIT" ]
105
2017-01-09T02:05:48.000Z
2021-07-26T03:39:22.000Z
dictknife/loading/_yaml.py
podhmo/dictknife
a172220c1adc8411b69f31646ea2154932d71516
[ "MIT" ]
4
2017-07-19T12:34:47.000Z
2019-06-20T10:32:13.000Z
import re from collections import defaultdict, ChainMap, OrderedDict from dictknife.langhelpers import make_dict import yaml from yaml.representer import SafeRepresenter load = yaml.load dump = yaml.dump
27.512195
86
0.680851
import re from collections import defaultdict, ChainMap, OrderedDict from dictknife.langhelpers import make_dict import yaml from yaml.representer import SafeRepresenter load = yaml.load dump = yaml.dump class Dumper(yaml.Dumper): def _iterate_dict(self, d): return d.items() def ignore_aliases(self,...
779
19
122
cf9bbbcba9a3ce368e2907dfee09a74b1af8cc80
222
py
Python
mmtbx/command_line/evalurama.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
mmtbx/command_line/evalurama.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
mmtbx/command_line/evalurama.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME phenix.evalurama from mmtbx.programs import evalurama from iotbx.cli_parser import run_program run_program(evalurama.Program)
27.75
64
0.869369
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME phenix.evalurama from mmtbx.programs import evalurama from iotbx.cli_parser import run_program run_program(evalurama.Program)
0
0
0
e47fbcbcdbee8261e5e817dbe5ec571eb13e6952
26,306
py
Python
bullet_envs/turtlebot/turtlEnv.py
astrid-merckling/bullet_envs
a7ec896df353520119ee726402b100caaabc91f3
[ "MIT" ]
null
null
null
bullet_envs/turtlebot/turtlEnv.py
astrid-merckling/bullet_envs
a7ec896df353520119ee726402b100caaabc91f3
[ "MIT" ]
null
null
null
bullet_envs/turtlebot/turtlEnv.py
astrid-merckling/bullet_envs
a7ec896df353520119ee726402b100caaabc91f3
[ "MIT" ]
null
null
null
import pybullet from pybullet_utils import bullet_client import numpy as np import cv2, os import time import gym from datetime import datetime from collections import OrderedDict from pybullet_data import getDataPath from bullet_envs.utils import seeding_np_random, AddNoise robot_diameter = 0.4 initZ = 0.
42.91354
125
0.578993
import pybullet from pybullet_utils import bullet_client import numpy as np import cv2, os import time import gym from datetime import datetime from collections import OrderedDict from pybullet_data import getDataPath from bullet_envs.utils import seeding_np_random, AddNoise robot_diameter = 0.4 initZ = 0. class T...
19,833
6,088
72
486499a9cde5c02bed6132e1a8041cca37ed19fb
3,046
py
Python
valid_parentheses/main.py
olepunchy/leetcode-python-solutions
1c8dcb921f3a66905f605d6b08e455116a426e42
[ "BSD-3-Clause" ]
null
null
null
valid_parentheses/main.py
olepunchy/leetcode-python-solutions
1c8dcb921f3a66905f605d6b08e455116a426e42
[ "BSD-3-Clause" ]
null
null
null
valid_parentheses/main.py
olepunchy/leetcode-python-solutions
1c8dcb921f3a66905f605d6b08e455116a426e42
[ "BSD-3-Clause" ]
null
null
null
""" Description: 20. Valid Parentheses Difficulty: Easy Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. ...
24.368
85
0.504268
""" Description: 20. Valid Parentheses Difficulty: Easy Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. ...
2,324
-10
147
edc55cb0801661f81c893b52cbc9bdfec1a10df5
32,350
py
Python
src/rogerthat/to/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/rogerthat/to/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
src/rogerthat/to/__init__.py
goubertbrent/oca-backend
b9f59cc02568aecb55d4b54aec05245790ea25fd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
54.923599
128
0.677805
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
28,052
1,717
811
6a5f50c4eeb3c61f6e9947ea09ae0b96bc1e66b4
28
py
Python
Section 2/first.py
samlvlen/PacktPublishingz
1c71ffd71a649e876fc507a96ccd4597649218e5
[ "MIT" ]
7
2019-10-15T08:24:58.000Z
2021-04-20T00:42:48.000Z
Section 2/first.py
samlvlen/PacktPublishingz
1c71ffd71a649e876fc507a96ccd4597649218e5
[ "MIT" ]
null
null
null
Section 2/first.py
samlvlen/PacktPublishingz
1c71ffd71a649e876fc507a96ccd4597649218e5
[ "MIT" ]
13
2019-11-17T13:22:58.000Z
2020-12-05T17:10:58.000Z
print("This is a .py file")
14
27
0.642857
print("This is a .py file")
0
0
0
b0ec28dbacdfcb98af956997d225eaeac37b7e46
64
py
Python
lang/py/cookbook/v2/source/cb2_4_11_exm_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_4_11_exm_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_4_11_exm_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
import itertools d = dict(itertools.izip(the_keys, the_values))
21.333333
46
0.796875
import itertools d = dict(itertools.izip(the_keys, the_values))
0
0
0
19ec76fd63e8a13db6918ecb1ac68c58be665f86
3,689
py
Python
quantus/evaluation.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
quantus/evaluation.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
quantus/evaluation.py
sebastian-lapuschkin/Quantus
c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f
[ "MIT" ]
null
null
null
"""This module provides some functionality to evaluate different explanation methods on several evaluation criteria.""" from typing import Union, Callable, Dict import numpy as np from .metrics import * from .helpers.constants import * from .helpers.model_interface import ModelInterface def evaluate( metrics: dic...
28.376923
119
0.526159
"""This module provides some functionality to evaluate different explanation methods on several evaluation criteria.""" from typing import Union, Callable, Dict import numpy as np from .metrics import * from .helpers.constants import * from .helpers.model_interface import ModelInterface def evaluate( metrics: dic...
0
0
0
178f4ebbe63a9ae76636cf233d022d4fb74f6fdf
1,307
py
Python
multitoken/serializers.py
sunscrapers/django-rest-multitoken
87a7f886ece0ee161c035888bd73014dafa9f2cb
[ "MIT" ]
16
2015-06-30T21:34:53.000Z
2020-06-01T21:59:48.000Z
multitoken/serializers.py
sunscrapers/django-rest-multitoken
87a7f886ece0ee161c035888bd73014dafa9f2cb
[ "MIT" ]
7
2015-07-08T22:23:43.000Z
2016-09-09T21:34:18.000Z
multitoken/serializers.py
sunscrapers/django-rest-multitoken
87a7f886ece0ee161c035888bd73014dafa9f2cb
[ "MIT" ]
12
2016-02-09T17:49:00.000Z
2021-11-30T19:46:51.000Z
from django.contrib.auth import get_user_model, authenticate from rest_framework import serializers from . import models, constants User = get_user_model()
32.675
97
0.697016
from django.contrib.auth import get_user_model, authenticate from rest_framework import serializers from . import models, constants User = get_user_model() class TokenSerializer(serializers.ModelSerializer): auth_token = serializers.CharField(source='key') class Meta: model = models.Token fi...
575
527
46
f462511acf9988e32eb0f7df3ba3d5a3e5fcf7c0
1,982
py
Python
MLP.py
AgainstEntropy/NeTF
42df0e13bd427bfab025f091a5e52b3a01c9d6fe
[ "MIT" ]
null
null
null
MLP.py
AgainstEntropy/NeTF
42df0e13bd427bfab025f091a5e52b3a01c9d6fe
[ "MIT" ]
null
null
null
MLP.py
AgainstEntropy/NeTF
42df0e13bd427bfab025f091a5e52b3a01c9d6fe
[ "MIT" ]
null
null
null
import torch import time
37.396226
107
0.55449
import torch import time class Network_S_Relu(torch.nn.Module): def __init__(self, D=8, H=256, input_ch=3, input_ch_views=3, output_ch=4, skips=[4], no_rho=False): super(Network_S_Relu, self).__init__() self.input_ch = input_ch self.input_ch_views = input_ch_views self.skips = skip...
1,863
17
76
cbdb7dc46648bfa1d324a7dabdd0f3200311a9b0
12,306
py
Python
yan2017/regenerate_matches.py
lxxue/colmap
1e2cbf61160205fd53d9fe7a1a8df359b870cae3
[ "BSD-3-Clause" ]
null
null
null
yan2017/regenerate_matches.py
lxxue/colmap
1e2cbf61160205fd53d9fe7a1a8df359b870cae3
[ "BSD-3-Clause" ]
null
null
null
yan2017/regenerate_matches.py
lxxue/colmap
1e2cbf61160205fd53d9fe7a1a8df359b870cae3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import os from utils import IntersectList, image_ids_to_pair_id, pair_id_to_image_ids, blob_to_array from matches_list import MatchesList from database import COLMAPDatabase # def RegenerateMatches(num_images, is_geo_neighbors, matches_list): # # subject to simplications. For now we mimic the o...
48.448819
166
0.638957
import numpy as np import os from utils import IntersectList, image_ids_to_pair_id, pair_id_to_image_ids, blob_to_array from matches_list import MatchesList from database import COLMAPDatabase def ConstructPathNetwork(num_images, matches_list, img_included, unique_tracks, visible_tracks, minimal_views, score_thres): ...
11,013
0
69
bb0fbc7c94fe0f62ad655a2e4a2f007441b7b77c
917
py
Python
modules/src/quote.py
rampreeth/JARVIS-on-Messenger
414d0440f111cffb457707b62f0d022512ced6c4
[ "MIT" ]
1,465
2016-04-19T02:04:51.000Z
2022-03-31T03:40:14.000Z
modules/src/quote.py
rampreeth/JARVIS-on-Messenger
414d0440f111cffb457707b62f0d022512ced6c4
[ "MIT" ]
529
2016-04-20T03:40:43.000Z
2022-02-03T12:37:05.000Z
modules/src/quote.py
rampreeth/JARVIS-on-Messenger
414d0440f111cffb457707b62f0d022512ced6c4
[ "MIT" ]
1,407
2016-04-19T02:16:38.000Z
2022-03-30T14:24:41.000Z
import json from random import choice import config import modules from templates.quick_replies import add_quick_reply from templates.text import TextTemplate
35.269231
100
0.661941
import json from random import choice import config import modules from templates.quick_replies import add_quick_reply from templates.text import TextTemplate def process(input, entities=None): output = {} try: with open(config.QUOTES_SOURCE_FILE) as quotes_file: quotes = json.load(quotes...
733
0
23
a68c876f64597f3895131ea57a90969d8dc783c3
19,431
py
Python
src/lin_my/s3_rl_collect_offline_one.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-01-16T20:24:09.000Z
2022-01-16T20:24:09.000Z
src/lin_my/s3_rl_collect_offline_one.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
null
null
null
src/lin_my/s3_rl_collect_offline_one.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-03-16T03:14:37.000Z
2022-03-16T03:14:37.000Z
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import sys import random # from contact_point_dataset_torch_multi_label import MyDataset from simple_dataset import MyDataset import os import time import argparse from functools import partial from torch.utils.data import DataLoader i...
38.477228
181
0.736864
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import sys import random # from contact_point_dataset_torch_multi_label import MyDataset from simple_dataset import MyDataset import os import time import argparse from functools import partial from torch.utils.data import DataLoader i...
10,236
0
23
6e4abf38bbe0908a7e6b1a7b441bc61feba0cb53
74
py
Python
tests/test_reservations.py
hubbub-tech/blubber-orm
4c445cec18e0f9d2212e15aa7ae91989b8aa9ada
[ "Apache-2.0" ]
1
2021-04-13T22:00:58.000Z
2021-04-13T22:00:58.000Z
tests/test_reservations.py
hubbub-tech/blubber-orm
4c445cec18e0f9d2212e15aa7ae91989b8aa9ada
[ "Apache-2.0" ]
null
null
null
tests/test_reservations.py
hubbub-tech/blubber-orm
4c445cec18e0f9d2212e15aa7ae91989b8aa9ada
[ "Apache-2.0" ]
null
null
null
import random from blubber_orm import Reservations, Items, Users, Orders
18.5
58
0.824324
import random from blubber_orm import Reservations, Items, Users, Orders
0
0
0
9cbc11953dd73fb6f511c74d730fad379ee2138f
91
py
Python
config.py
agithug/fan-controller
046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c
[ "MIT" ]
null
null
null
config.py
agithug/fan-controller
046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c
[ "MIT" ]
null
null
null
config.py
agithug/fan-controller
046ecd9120c3a3fa0c581cbcd3dc89bd50a7373c
[ "MIT" ]
null
null
null
#used as a configuration file def fan: pin = 4 dependencies = [“python3”,”gpiozero”]
13
37
0.67033
#used as a configuration file def fan: pin = 4 dependencies = [“python3”,”gpiozero”]
0
0
0
e86dbe71b0fe9f0144228f27929f8d7e351781d8
831
py
Python
blueqat/backends/__init__.py
mdrft/Blueqat
878d24e2038063e32b4d391a03bc2c2be0600470
[ "Apache-2.0" ]
25
2018-09-16T22:54:48.000Z
2019-02-22T01:21:30.000Z
blueqat/backends/__init__.py
mdrft/Blueqat
878d24e2038063e32b4d391a03bc2c2be0600470
[ "Apache-2.0" ]
22
2018-09-20T02:47:56.000Z
2019-02-08T05:25:30.000Z
blueqat/backends/__init__.py
mdrft/Blueqat
878d24e2038063e32b4d391a03bc2c2be0600470
[ "Apache-2.0" ]
5
2018-10-23T04:56:04.000Z
2019-02-13T14:02:31.000Z
from .numpy_backend import NumPyBackend from .numba_backend import numba_backend_lazy from .qasm_output_backend import QasmOutputBackend from .ibmq_backend import ibmq_backend from .sympy_backend import SympyBackend from .onequbitgate_transpiler import OneQubitGateCompactionTranspiler from .twoqubitgate_transpiler impo...
33.24
70
0.802647
from .numpy_backend import NumPyBackend from .numba_backend import numba_backend_lazy from .qasm_output_backend import QasmOutputBackend from .ibmq_backend import ibmq_backend from .sympy_backend import SympyBackend from .onequbitgate_transpiler import OneQubitGateCompactionTranspiler from .twoqubitgate_transpiler impo...
0
0
0
94aecc90c02852896c41b5533325bd00b1cd1e01
588
py
Python
Django/DjangoT1.11_LTS/37_Model Form Validators/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT1.11_LTS/37_Model Form Validators/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT1.11_LTS/37_Model Form Validators/blog/views.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect # Create your views here. from .forms import PostForm from .models import Post
18.967742
50
0.710884
from django.shortcuts import render, redirect # Create your views here. from .forms import PostForm from .models import Post def index(request): posts = Post.objects.all() context = { 'page_title':'post list', 'posts':posts } return render(request,'blog/index.html',context) def create(request): post_form ...
416
0
46
d4339f678c6fe3eda0f0e0a905a66ece9cdec64c
1,473
py
Python
lib/parser_input_gen.py
changzhisun/transfer-joint-entrel
fd204038f69ee5a6aa84907b49b922433835c716
[ "Apache-2.0" ]
3
2019-02-27T03:43:50.000Z
2020-12-17T03:03:21.000Z
lib/parser_input_gen.py
changzhisun/transfer-joint-entrel
fd204038f69ee5a6aa84907b49b922433835c716
[ "Apache-2.0" ]
null
null
null
lib/parser_input_gen.py
changzhisun/transfer-joint-entrel
fd204038f69ee5a6aa84907b49b922433835c716
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Created on 17/10/27 09:53:55 @author: Changzhi Sun """ import argparse import os import json import utils parser = argparse.ArgumentParser() parser.add_argument( "--config", help="path to json config", required=True ) args = parser.parse_args() config_file...
32.021739
86
0.661236
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Created on 17/10/27 09:53:55 @author: Changzhi Sun """ import argparse import os import json import utils parser = argparse.ArgumentParser() parser.add_argument( "--config", help="path to json config", required=True ) args = parser.parse_args() config_file...
381
0
23
b8ab892c17ab9e820122afd37f28b7f791a577ab
6,756
py
Python
src/evaluate.py
ewilkinson/Humanoids_2015
9a081d2775ecc4740e62eff8e46368823615b127
[ "MIT" ]
null
null
null
src/evaluate.py
ewilkinson/Humanoids_2015
9a081d2775ecc4740e62eff8e46368823615b127
[ "MIT" ]
null
null
null
src/evaluate.py
ewilkinson/Humanoids_2015
9a081d2775ecc4740e62eff8e46368823615b127
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np import time, sys import matplotlib.pyplot as plt import matplotlib from generic_seg import GenericSegmenter import cv2 from sklearn.neighbors import BallTree from scipy.stats import pearsonr, spearmanr import utils k_closest = 5 aspect_thresh = 0.45 type_thresh = -2.8 plt....
32.325359
103
0.701007
#!/usr/bin/env python import numpy as np import time, sys import matplotlib.pyplot as plt import matplotlib from generic_seg import GenericSegmenter import cv2 from sklearn.neighbors import BallTree from scipy.stats import pearsonr, spearmanr import utils k_closest = 5 aspect_thresh = 0.45 type_thresh = -2.8 plt....
0
0
0
6fbaa2fdf4b8b9dd385adbe6a82a430f17a573c8
727
py
Python
examples/github/__init__.py
Z-Brueske/screenpy
1c852a49eb3821727662458fd707b9bcf48bb8cf
[ "MIT" ]
null
null
null
examples/github/__init__.py
Z-Brueske/screenpy
1c852a49eb3821727662458fd707b9bcf48bb8cf
[ "MIT" ]
null
null
null
examples/github/__init__.py
Z-Brueske/screenpy
1c852a49eb3821727662458fd707b9bcf48bb8cf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ____ ____ # / ___| ___ _ __ ___ ___ _ __ | _ \ _ _ # \___ \ / __| '__/ _ \/ _ \ '_ \| |_) | | | | # ___) | (__| | | __/ __/ | | | __/| |_| | # |____/ \___|_| \___|\___|_| |_|_| ...
31.608696
78
0.356259
# -*- coding: utf-8 -*- # ____ ____ # / ___| ___ _ __ ___ ___ _ __ | _ \ _ _ # \___ \ / __| '__/ _ \/ _ \ '_ \| |_) | | | | # ___) | (__| | | __/ __/ | | | __/| |_| | # |____/ \___|_| \___|\___|_| |_|_| ...
0
0
0
ee72dfb726f20f54e806cc0ce08ae4b917e2c767
29,102
py
Python
mlpf/pipeline.py
edcuba/particleflow
1c6189f499ae4807ecca42d459e363fd5b3a12ab
[ "Apache-2.0" ]
null
null
null
mlpf/pipeline.py
edcuba/particleflow
1c6189f499ae4807ecca42d459e363fd5b3a12ab
[ "Apache-2.0" ]
null
null
null
mlpf/pipeline.py
edcuba/particleflow
1c6189f499ae4807ecca42d459e363fd5b3a12ab
[ "Apache-2.0" ]
2
2020-11-23T11:11:27.000Z
2021-12-02T20:14:56.000Z
try: import comet_ml except ModuleNotFoundError as e: print("comet_ml not found, ignoring") import sys import os import yaml import json from datetime import datetime import glob import random import platform import numpy as np from pathlib import Path import click from tqdm import tqdm import shutil from func...
40.931083
241
0.66126
try: import comet_ml except ModuleNotFoundError as e: print("comet_ml not found, ignoring") import sys import os import yaml import json from datetime import datetime import glob import random import platform import numpy as np from pathlib import Path import click from tqdm import tqdm import shutil from func...
17,388
0
178
765096ec0dda77547021cdac5ded16a2d1170a69
782
py
Python
MUNDO 2/ex069.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
1
2020-11-12T14:03:32.000Z
2020-11-12T14:03:32.000Z
MUNDO 2/ex069.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
null
null
null
MUNDO 2/ex069.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
1
2021-01-05T22:18:46.000Z
2021-01-05T22:18:46.000Z
cont18 = homem = mulher20 = 0 while True: idade = int(input('\033[30mDigite a sua idade:\033[m ')) sexo = str(input('\033[30mDigite o seu sexo [M/F]:\033[m ')).upper().strip() run = str(input('\033[30mVocê gostaria de continuar? [S/N]\033[m ')).upper().strip() if idade >= 18: cont18 += 1 ...
37.238095
89
0.57289
cont18 = homem = mulher20 = 0 while True: idade = int(input('\033[30mDigite a sua idade:\033[m ')) sexo = str(input('\033[30mDigite o seu sexo [M/F]:\033[m ')).upper().strip() run = str(input('\033[30mVocê gostaria de continuar? [S/N]\033[m ')).upper().strip() if idade >= 18: cont18 += 1 ...
0
0
0
89f7f8bdd8cfc7776039684908d5dd3d590fbe8b
128
py
Python
Exercises/seconds-to-hours.py
shoriwe-upb/TallerEjercicios
ba37eb6cd673a8d38a1dfac87c5efac3f728da21
[ "MIT" ]
null
null
null
Exercises/seconds-to-hours.py
shoriwe-upb/TallerEjercicios
ba37eb6cd673a8d38a1dfac87c5efac3f728da21
[ "MIT" ]
null
null
null
Exercises/seconds-to-hours.py
shoriwe-upb/TallerEjercicios
ba37eb6cd673a8d38a1dfac87c5efac3f728da21
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
16
39
0.578125
def main(): seconds = float(input("Seconds: ")) print("Hours:", seconds / 3600) if __name__ == '__main__': main()
66
0
22
46b58b1f4509a6948b95dbe02953629bf3e4cca6
252
py
Python
spiral.py
hitanshkadakia/python_turtle_programs
0bafc7b4e89f9245b44bad0e9ed03a86631ef44f
[ "Apache-2.0" ]
6
2020-10-06T09:23:54.000Z
2021-07-16T07:52:19.000Z
spiral.py
hitanshkadakia/python_turtle_programs
0bafc7b4e89f9245b44bad0e9ed03a86631ef44f
[ "Apache-2.0" ]
null
null
null
spiral.py
hitanshkadakia/python_turtle_programs
0bafc7b4e89f9245b44bad0e9ed03a86631ef44f
[ "Apache-2.0" ]
5
2020-12-12T14:40:55.000Z
2021-03-28T08:49:54.000Z
import turtle colors = ['red','purple','blue','green','yellow','orange'] t=turtle.Pen() t.speed(0) turtle.bgcolor("black") for x in range(360): t.pencolor(colors[x % 6]) t.width(x/100 + 1) t.forward(x) t.left(59) turtle.done()
22.909091
59
0.599206
import turtle colors = ['red','purple','blue','green','yellow','orange'] t=turtle.Pen() t.speed(0) turtle.bgcolor("black") for x in range(360): t.pencolor(colors[x % 6]) t.width(x/100 + 1) t.forward(x) t.left(59) turtle.done()
0
0
0
d6f4803ae575d4151ed8df735f78ffc904f0a104
1,274
py
Python
src/python/T0/WMBS/Oracle/RunConfig/InsertStreamCMSSWVersion.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
6
2016-03-09T14:36:19.000Z
2021-07-27T01:28:00.000Z
src/python/T0/WMBS/Oracle/RunConfig/InsertStreamCMSSWVersion.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
193
2015-01-07T21:03:43.000Z
2022-03-31T12:22:18.000Z
src/python/T0/WMBS/Oracle/RunConfig/InsertStreamCMSSWVersion.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
36
2015-01-28T19:01:54.000Z
2021-12-15T17:18:20.000Z
""" _InsertStreamCMSSWVersion_ Oracle implementation of InsertStreamCMSSWVersion """ from WMCore.Database.DBFormatter import DBFormatter
29.627907
79
0.458399
""" _InsertStreamCMSSWVersion_ Oracle implementation of InsertStreamCMSSWVersion """ from WMCore.Database.DBFormatter import DBFormatter class InsertStreamCMSSWVersion(DBFormatter): def execute(self, binds, conn = None, transaction = False): sql = """DECLARE cnt NUMBER(1); ...
1,061
23
50
1d5d976aede6efad04490761615beb1153affdb3
1,913
py
Python
Lib/corpuscrawler/crawl_ha.py
cash/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
95
2019-06-13T23:34:21.000Z
2022-03-12T05:22:49.000Z
Lib/corpuscrawler/crawl_ha.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
31
2019-06-02T18:56:53.000Z
2021-08-10T20:16:02.000Z
Lib/corpuscrawler/crawl_ha.py
sahwar/corpuscrawler
8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d
[ "Apache-2.0" ]
35
2019-06-18T08:26:24.000Z
2022-01-11T13:59:40.000Z
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
39.854167
78
0.641924
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
1,115
0
46
af919f8803a7aa27a2d9fd9bba809192553588d6
440
py
Python
exercicios/ex022.py
danielmsa/Python-Curso-em-Video
ca247a767477f0b93b2ac36ae911f0a12d63f3c9
[ "MIT" ]
null
null
null
exercicios/ex022.py
danielmsa/Python-Curso-em-Video
ca247a767477f0b93b2ac36ae911f0a12d63f3c9
[ "MIT" ]
null
null
null
exercicios/ex022.py
danielmsa/Python-Curso-em-Video
ca247a767477f0b93b2ac36ae911f0a12d63f3c9
[ "MIT" ]
null
null
null
nome = str(input('Digite seu nome Completo: ')).strip() print('Analisando seu nome...') print('Seu nome em maiúsculas é {}.'.format(nome.upper())) print('Seu nome em minuscula é {}.'.format(nome.lower())) print('Seu nome ao todo tem {} letras.'.format(len(nome) - nome.count(' '))) #dividido = nome.split() #print('Seu p...
48.888889
76
0.670455
nome = str(input('Digite seu nome Completo: ')).strip() print('Analisando seu nome...') print('Seu nome em maiúsculas é {}.'.format(nome.upper())) print('Seu nome em minuscula é {}.'.format(nome.lower())) print('Seu nome ao todo tem {} letras.'.format(len(nome) - nome.count(' '))) #dividido = nome.split() #print('Seu p...
0
0
0
a83ddd9473e3a88424cf6ae7afedfbeddc3b1c1d
50,419
py
Python
formlayout.py
celestinjr/formlayout
256aa83d365f1ab4e6673bfcb6df5489605be05c
[ "MIT" ]
null
null
null
formlayout.py
celestinjr/formlayout
256aa83d365f1ab4e6673bfcb6df5489605be05c
[ "MIT" ]
null
null
null
formlayout.py
celestinjr/formlayout
256aa83d365f1ab4e6673bfcb6df5489605be05c
[ "MIT" ]
1
2020-09-14T15:15:21.000Z
2020-09-14T15:15:21.000Z
# -*- coding: utf-8 -*- """ formlayout ========== Module creating Qt form dialogs/layouts to edit various type of parameters formlayout License Agreement (MIT License) ------------------------------------------ Copyright (c) 2009-2015 Pierre Raybaut Permission is hereby granted, free of charge, to any person obtai...
37.909023
127
0.54537
# -*- coding: utf-8 -*- """ formlayout ========== Module creating Qt form dialogs/layouts to edit various type of parameters formlayout License Agreement (MIT License) ------------------------------------------ Copyright (c) 2009-2015 Pierre Raybaut Permission is hereby granted, free of charge, to any person obtai...
35,865
359
1,687
955a303fb7e3ddcfc2d99c3c44aeb9d7f4d6da8c
8,641
py
Python
sppas/sppas/src/ui/wxgui/panels/audioinfo.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/ui/wxgui/panels/audioinfo.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
sppas/sppas/src/ui/wxgui/panels/audioinfo.py
mirfan899/MTTS
3167b65f576abcc27a8767d24c274a04712bd948
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | |...
34.564
90
0.498553
#!/usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | |...
1,177
0
135
67966d5e3e9f4c80b0e70c48155319c349bb74b2
4,687
py
Python
pyelant/pyelant.py
paulomarcos/pyelant
77183119dc922b5b2c9ff8fca7f6fa9afbf72313
[ "MIT" ]
1
2021-03-18T05:20:57.000Z
2021-03-18T05:20:57.000Z
pyelant/pyelant.py
paulomarcos/pyelant
77183119dc922b5b2c9ff8fca7f6fa9afbf72313
[ "MIT" ]
null
null
null
pyelant/pyelant.py
paulomarcos/pyelant
77183119dc922b5b2c9ff8fca7f6fa9afbf72313
[ "MIT" ]
null
null
null
""" Python Easy Language Translator PyElant is a python tool for easily performing translations and storing it on the clipboard. Input can be received via microphone, command line or the clipboard itself. @brief PyElant @author Paulo Marcos @date 2021-03-19 Copyright (c) 2021 paulomarcosdj <@> outlook.com "...
38.418033
120
0.616386
""" Python Easy Language Translator PyElant is a python tool for easily performing translations and storing it on the clipboard. Input can be received via microphone, command line or the clipboard itself. @brief PyElant @author Paulo Marcos @date 2021-03-19 Copyright (c) 2021 paulomarcosdj <@> outlook.com "...
846
0
27
878c75dbbdc4a5a83d592431b11172d8d84746b6
6,545
py
Python
loldib/getratings/models/NA/na_aatrox/na_aatrox_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_aatrox/na_aatrox_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_aatrox/na_aatrox_sup.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings
15.695444
46
0.766692
from getratings.models.ratings import Ratings class NA_Aatrox_Sup_Aatrox(Ratings): pass class NA_Aatrox_Sup_Ahri(Ratings): pass class NA_Aatrox_Sup_Akali(Ratings): pass class NA_Aatrox_Sup_Alistar(Ratings): pass class NA_Aatrox_Sup_Amumu(Ratings): pass class NA_Aatrox_Sup_Anivia(Ratings): ...
0
3,046
3,450
55886ede4962b83e8e923a7125e8e3f81a493743
2,376
py
Python
GANs/AC_GAN/generator.py
sushant097/Deep-Learning-Paper-Scratch-Implementation
e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725
[ "MIT" ]
4
2022-01-07T14:48:13.000Z
2022-02-24T10:10:24.000Z
GANs/AC_GAN/generator.py
sushant097/Deep-Learning-Paper-Scratch-Implementation
e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725
[ "MIT" ]
null
null
null
GANs/AC_GAN/generator.py
sushant097/Deep-Learning-Paper-Scratch-Implementation
e1e5cbd0f1f10dd9ed0673e8a0506f33c94f6725
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from utils import custom_init # self.weight_init() # # def weight_init(self): # for block in self._modules: # try: # for m in self._modules[block]: # custom_init(m) # except: # custom...
31.68
109
0.540404
import torch import torch.nn as nn from utils import custom_init class Block(nn.Module): def __init__(self, in_channels, out_channels, stride, kernel_size): super().__init__() self.conv = nn.Sequential( nn.ConvTranspose2d(in_channels, out_channels, kernel_size=kernel_size, stride=strid...
1,615
8
152
a1a8a753bd80b8f7cf5427944c7e7a9476c59854
3,866
py
Python
scripts/pickplaceboxes.py
BasJ93/UR5_PickPlaceBoxes_Descartes
1901bf0956cc40d4516fbac83c22914630505b5d
[ "MIT" ]
5
2018-07-04T09:17:55.000Z
2019-05-18T01:43:39.000Z
scripts/pickplaceboxes.py
BasJ93/UR5_PickPlaceBoxes_Descartes
1901bf0956cc40d4516fbac83c22914630505b5d
[ "MIT" ]
null
null
null
scripts/pickplaceboxes.py
BasJ93/UR5_PickPlaceBoxes_Descartes
1901bf0956cc40d4516fbac83c22914630505b5d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #Created on Mon Jan 22 13:36:32 2018 #@author: bas #First create the boxes to stack. Move the robot to the first box to pick. Add the box to the robot with attache_box(link, name). Move the arm to the place point. Release the box with remove_attached_object(link, name). Re...
23.430303
227
0.695292
#!/usr/bin/env python # -*- coding: utf-8 -*- #Created on Mon Jan 22 13:36:32 2018 #@author: bas #First create the boxes to stack. Move the robot to the first box to pick. Add the box to the robot with attache_box(link, name). Move the arm to the place point. Release the box with remove_attached_object(link, name). Re...
3,198
0
46
60e58a3b63709589be39c8b12ebc8f3a43b9eeaa
649
py
Python
fastapp/__init__.py
sahlinet/fastapp
fcbf8e404a411a4530093c0fbbb4664aedade162
[ "MIT" ]
null
null
null
fastapp/__init__.py
sahlinet/fastapp
fcbf8e404a411a4530093c0fbbb4664aedade162
[ "MIT" ]
9
2016-01-11T15:13:43.000Z
2016-03-22T14:16:39.000Z
fastapp/__init__.py
sahlinet/fastapp
fcbf8e404a411a4530093c0fbbb4664aedade162
[ "MIT" ]
null
null
null
__version__ = "0.9.2" import os from django.core.exceptions import ImproperlyConfigured # load plugins from django.conf import settings try: plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {}) plugins = plugins_config.keys() plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", []) fo...
27.041667
68
0.633282
__version__ = "0.9.2" import os from django.core.exceptions import ImproperlyConfigured # load plugins from django.conf import settings try: plugins_config = getattr(settings, "FASTAPP_PLUGINS_CONFIG", {}) plugins = plugins_config.keys() plugins = plugins + getattr(settings, "FASTAPP_PLUGINS", []) fo...
189
0
30
ee92382a0b9b8437804b130cfb94092969a3baaa
2,928
py
Python
video_capture/motion_capture.py
FrostyDesigner/Python_Scripts
ec9dcf1a8787e60e40cd72260618739a681087ef
[ "Unlicense" ]
1
2021-07-05T22:30:47.000Z
2021-07-05T22:30:47.000Z
video_capture/motion_capture.py
FrostyDesigner/Python_Scripts
ec9dcf1a8787e60e40cd72260618739a681087ef
[ "Unlicense" ]
8
2020-03-24T15:58:07.000Z
2022-03-11T23:26:05.000Z
video_capture/motion_capture.py
FrostyDesigner/Python_Scripts
ec9dcf1a8787e60e40cd72260618739a681087ef
[ "Unlicense" ]
null
null
null
import cv2, time, pandas from datetime import datetime first_frame=None #fill list with two empty items status_list=[None,None] times=[] df=pandas.DataFrame(columns=["Start", "End"]) video=cv2.VideoCapture(0) while True: check, frame = video.read() status=0 gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) ...
34.447059
139
0.686475
import cv2, time, pandas from datetime import datetime first_frame=None #fill list with two empty items status_list=[None,None] times=[] df=pandas.DataFrame(columns=["Start", "End"]) video=cv2.VideoCapture(0) while True: check, frame = video.read() status=0 gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) ...
0
0
0
8f56d01e8e1f51454dd4a99a9f0e1e7cf61b95ab
4,680
py
Python
augment.py
0chandansharma/Augmentation-withBbox-YOLO
bf022fa08aba4b16a127a86f9831276114522226
[ "MIT" ]
1
2022-01-19T13:11:47.000Z
2022-01-19T13:11:47.000Z
augment.py
0chandansharma/Augmentation-withBbox-YOLO
bf022fa08aba4b16a127a86f9831276114522226
[ "MIT" ]
null
null
null
augment.py
0chandansharma/Augmentation-withBbox-YOLO
bf022fa08aba4b16a127a86f9831276114522226
[ "MIT" ]
null
null
null
import imgaug as ia import imgaug.augmenters as iaa import os import cv2 import numpy as np from util import sequence anno_INPUT_DIR = r'annotation_files/' img_INPUT_DIR = r'image_files/' OUTPUT_DIR = 'output_dir/' AUGMENT_SIZE = 6 if __name__ == '__main__': main()
38.360656
186
0.488675
import imgaug as ia import imgaug.augmenters as iaa import os import cv2 import numpy as np from util import sequence anno_INPUT_DIR = r'annotation_files/' img_INPUT_DIR = r'image_files/' OUTPUT_DIR = 'output_dir/' AUGMENT_SIZE = 6 def main(): for file_name in os.listdir(anno_INPUT_DIR): annotation_path ...
4,358
0
46
c199bfe61e7d633fd87ed5bbcc96cb96a25936d4
3,581
py
Python
kk_manual/ta.py
Krystof-Majer/K-K_pyrolysis
5c99a1d0776dffad952d9b814ecee5ec5250dcfb
[ "MIT" ]
null
null
null
kk_manual/ta.py
Krystof-Majer/K-K_pyrolysis
5c99a1d0776dffad952d9b814ecee5ec5250dcfb
[ "MIT" ]
null
null
null
kk_manual/ta.py
Krystof-Majer/K-K_pyrolysis
5c99a1d0776dffad952d9b814ecee5ec5250dcfb
[ "MIT" ]
null
null
null
from glob import glob from os import chdir from os.path import dirname import pandas as pd import numpy as np from pandas.core.frame import DataFrame import matplotlib.pyplot as plt from numpy.fft import rfft, rfftfreq from scipy import signal from math import pi WINDOW = "sg" # sg for savgol filter WINDOW = "hamming...
24.868056
79
0.627478
from glob import glob from os import chdir from os.path import dirname import pandas as pd import numpy as np from pandas.core.frame import DataFrame import matplotlib.pyplot as plt from numpy.fft import rfft, rfftfreq from scipy import signal from math import pi WINDOW = "sg" # sg for savgol filter WINDOW = "hamming...
2,868
0
207
71356c3d96e921e5de50328e670a5a1bc846a97f
3,765
py
Python
qbay_test/frontend/test_order/test_order.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
qbay_test/frontend/test_order/test_order.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
qbay_test/frontend/test_order/test_order.py
Will-C-Aitken/qBay
b9faf0578cf6778c8940c303db240f8d6a7ec9d5
[ "MIT" ]
null
null
null
# from os import popen from pathlib import Path from qbay.models import * import subprocess # Set the current folder current_folder = Path(__file__).parent # Creating two Users for testing of order functionality register("OrderUser1", "order_user1@qbay.com", "Password99@") register("OrderUser2", ...
31.638655
64
0.656308
# from os import popen from pathlib import Path from qbay.models import * import subprocess # Set the current folder current_folder = Path(__file__).parent # Creating two Users for testing of order functionality register("OrderUser1", "order_user1@qbay.com", "Password99@") register("OrderUser2", ...
0
0
0