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
f0462c83458067422ca6c7d9255e191202c7b8a6
627
py
Python
gui.py
clash402/snake-game
f069725313b19e5bf77166b5a540d61e0593213b
[ "MIT" ]
null
null
null
gui.py
clash402/snake-game
f069725313b19e5bf77166b5a540d61e0593213b
[ "MIT" ]
null
null
null
gui.py
clash402/snake-game
f069725313b19e5bf77166b5a540d61e0593213b
[ "MIT" ]
null
null
null
from turtle import Screen # Cannot inherit from Screen class in Turtle, so each Screen method must be recreated here # PUBLIC METHODS (recreated Screen methods)
24.115385
94
0.634769
from turtle import Screen class GUI: # Cannot inherit from Screen class in Turtle, so each Screen method must be recreated here def __init__(self): self.screen = Screen() self.screen.setup(width=600, height=600) self.screen.bgcolor("black") self.screen.title("Snake Game!") ...
311
-11
156
e6d8ca093ecb5d54bb7143209223467e14e9c539
28
py
Python
2020-04-16 - Python Medellin - Creating a chat service with WebSockets/Examples/Chat/app/models/__init__.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
2
2020-04-24T23:03:41.000Z
2020-11-10T15:08:38.000Z
2020-04-16 - Python Medellin - Creating a chat service with WebSockets/Examples/Chat/app/models/__init__.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
5
2021-03-10T11:42:15.000Z
2022-02-10T21:38:54.000Z
2020-04-16 - Python Medellin - Creating a chat service with WebSockets/Examples/Chat/app/models/__init__.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
4
2020-10-01T04:32:27.000Z
2022-02-14T15:08:16.000Z
from .user import Base, User
28
28
0.785714
from .user import Base, User
0
0
0
8a3df74e4b5fbe81ecc184e48fc757183d8b98da
2,639
py
Python
python_data/fintech/funnel_monitor_multiday_v3.py
younhapan/ystdoc
a3fee3c48fc4e35b26b70ab7d9f123be059a4a7a
[ "Apache-2.0" ]
null
null
null
python_data/fintech/funnel_monitor_multiday_v3.py
younhapan/ystdoc
a3fee3c48fc4e35b26b70ab7d9f123be059a4a7a
[ "Apache-2.0" ]
null
null
null
python_data/fintech/funnel_monitor_multiday_v3.py
younhapan/ystdoc
a3fee3c48fc4e35b26b70ab7d9f123be059a4a7a
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 from __future__ import division import sys import os import time import datetime import pandas as pd import numpy as np import math CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) ADD_PATH = "%s/../"%(CURRENT_DIR) sys.path.append(ADD_PATH) from tools.mail import MyEmail from tools.html impor...
35.186667
164
0.613869
# encoding: utf-8 from __future__ import division import sys import os import time import datetime import pandas as pd import numpy as np import math CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) ADD_PATH = "%s/../"%(CURRENT_DIR) sys.path.append(ADD_PATH) from tools.mail import MyEmail from tools.html impor...
1,883
0
22
4826a6c5e8a399c116c685321697eb6d8aca5611
11,037
py
Python
neutron/tests/functional/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
1
2017-09-10T09:57:35.000Z
2017-09-10T09:57:35.000Z
neutron/tests/functional/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
null
null
null
neutron/tests/functional/services/trunk/drivers/openvswitch/agent/test_trunk_manager.py
brandonlogan/neutron
57364544aa8b0e7cd9d73550f287bcad574ba08c
[ "Apache-2.0" ]
1
2015-05-05T14:41:11.000Z
2015-05-05T14:41:11.000Z
# 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 agreed to i...
43.972112
79
0.655251
# 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 agreed to i...
6,012
3,373
437
1960d34bb0ffc10045ff04d14a1b3e8ca3d3eb73
115
py
Python
examples/aiohttp/starwars/starwars/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
examples/aiohttp/starwars/starwars/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
examples/aiohttp/starwars/starwars/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
from starwars.resolvers import resolvers from starwars.sdl import STARWARSTIFLETTE __all__ = ["STARWARSTIFLETTE"]
23
41
0.834783
from starwars.resolvers import resolvers from starwars.sdl import STARWARSTIFLETTE __all__ = ["STARWARSTIFLETTE"]
0
0
0
180b06646cf19c497c29cdd0098e87bc487b8b89
2,585
py
Python
src/examples/tcp.py
ettoreleandrotognoli/python-shared
fbee6d9932e8ed52005d3e96a9f6ee79393e13ff
[ "BSD-3-Clause" ]
null
null
null
src/examples/tcp.py
ettoreleandrotognoli/python-shared
fbee6d9932e8ed52005d3e96a9f6ee79393e13ff
[ "BSD-3-Clause" ]
1
2017-11-28T09:21:01.000Z
2017-11-28T09:21:01.000Z
src/examples/tcp.py
ettoreleandrotognoli/python-shared
fbee6d9932e8ed52005d3e96a9f6ee79393e13ff
[ "BSD-3-Clause" ]
null
null
null
import json import multiprocessing import time from rx.testing import marbles m = marbles from pyshared.core.ref import LocalSharedResourcesManager from pyshared.core.ref import ResourcesManagerListenerAdapter from pyshared.core.ref import default_command_mapper from pyshared.core.rx import ReactiveSharedResourcesSer...
27.5
61
0.630174
import json import multiprocessing import time from rx.testing import marbles m = marbles from pyshared.core.ref import LocalSharedResourcesManager from pyshared.core.ref import ResourcesManagerListenerAdapter from pyshared.core.ref import default_command_mapper from pyshared.core.rx import ReactiveSharedResourcesSer...
1,551
0
69
590f98ecefded6017c5e8e01e91e80e62d78afc1
34,666
py
Python
models/polytope_constraints.py
mbroso/constraintnet_facial_detect
3f53a4694f3c6b229679ef9014ac98573f45fd43
[ "BSD-3-Clause" ]
null
null
null
models/polytope_constraints.py
mbroso/constraintnet_facial_detect
3f53a4694f3c6b229679ef9014ac98573f45fd43
[ "BSD-3-Clause" ]
null
null
null
models/polytope_constraints.py
mbroso/constraintnet_facial_detect
3f53a4694f3c6b229679ef9014ac98573f45fd43
[ "BSD-3-Clause" ]
null
null
null
"""This file summarizes functionality for the construction of ConstraintNet with output-constraints in form of convex polytopes. It is possible to constrain output-parts to different convex polytopes independently. The functionality for modelling the output-constraints consists namely of: - Functors to create a ...
41.122183
96
0.60855
"""This file summarizes functionality for the construction of ConstraintNet with output-constraints in form of convex polytopes. It is possible to constrain output-parts to different convex polytopes independently. The functionality for modelling the output-constraints consists namely of: - Functors to create a ...
22
0
53
8ba910386837b07f76ab57cbfda10782cf3dacef
2,785
py
Python
src/CookieJarRun.py
KaelenCarling/CookieJar
b4c7026b3b50af6c60338208aab1813efb466944
[ "Apache-2.0" ]
2
2021-05-05T20:08:57.000Z
2021-05-05T20:09:00.000Z
src/CookieJarRun.py
KaelenCarling/CookieJar
b4c7026b3b50af6c60338208aab1813efb466944
[ "Apache-2.0" ]
null
null
null
src/CookieJarRun.py
KaelenCarling/CookieJar
b4c7026b3b50af6c60338208aab1813efb466944
[ "Apache-2.0" ]
1
2021-05-05T18:19:11.000Z
2021-05-05T18:19:11.000Z
import tkinter from FireFoxCookieMonster import * from tkinter import * from tkinter.ttk import * # simple function to retrieve the cookies into a dictionary if __name__ == "__main__": root = Tk() # MainApplication(root).pack(side='top', fill='both', expand=True) MainApplication(root) root.mai...
31.647727
156
0.667864
import tkinter from FireFoxCookieMonster import * from tkinter import * from tkinter.ttk import * def getCookies(): databaseLocations = findFirefoxCookieDatabase() for databaseLocation in databaseLocations: print("Copying from " + databaseLocation) firefoxCookieMonster = FireFoxCookieMonster(...
2,346
16
95
c6f65ae054762a1b75b567b02da9b21b6b1c50bd
1,123
py
Python
examples/wf/pymtbl_wf_analyze.py
BuloZB/pymtbl
914b041a48da9594d1bdac997bae378bdd6b6f58
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/wf/pymtbl_wf_analyze.py
BuloZB/pymtbl
914b041a48da9594d1bdac997bae378bdd6b6f58
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
examples/wf/pymtbl_wf_analyze.py
BuloZB/pymtbl
914b041a48da9594d1bdac997bae378bdd6b6f58
[ "ECL-2.0", "Apache-2.0" ]
1
2018-03-04T03:12:33.000Z
2018-03-04T03:12:33.000Z
#!/usr/bin/env python import string import sys import mtbl if __name__ == '__main__': if not len(sys.argv) == 3: sys.stderr.write('Usage: %s <TXT FILE> <MTBL FILE>\n' % sys.argv[0]) sys.exit(1) main(sys.argv[1], sys.argv[2])
27.390244
76
0.619768
#!/usr/bin/env python import string import sys import mtbl def merge_func(key, val0, val1): i0 = mtbl.varint_decode(val0) i1 = mtbl.varint_decode(val1) return mtbl.varint_encode(i0 + i1) def main(txt_fname, mtbl_fname): txt = open(txt_fname) sorter = mtbl.sorter(merge_func) writer = mtbl.wri...
825
0
46
c7e04c588484b142da08ea0353c9b7a85eb9bad5
353
py
Python
ejemplo_4/epy_block_0_0.py
GabrielaGalvis/Lab_Com_2
4b9714ed62a8a428f292ff8ace3cf50fe69fcb33
[ "Apache-2.0" ]
null
null
null
ejemplo_4/epy_block_0_0.py
GabrielaGalvis/Lab_Com_2
4b9714ed62a8a428f292ff8ace3cf50fe69fcb33
[ "Apache-2.0" ]
null
null
null
ejemplo_4/epy_block_0_0.py
GabrielaGalvis/Lab_Com_2
4b9714ed62a8a428f292ff8ace3cf50fe69fcb33
[ "Apache-2.0" ]
null
null
null
import numpy as np from gnuradio import gr
13.074074
43
0.628895
import numpy as np from gnuradio import gr class blk(gr.sync_block): def __init__(self,): """Bloque sqrt""" gr.sync_block.__init__( self, name='Sqrt', in_sig=[np.float32], out_sig=[np.float32] ) def work(self, input_items, output_items): x=input_items[0] y=output_items[0] y[:]=np.sq...
100
178
23
e7f0bc0c3d48e5be1311eacb7034093e6b554f25
1,689
py
Python
responsibleai/tests/tools/shared/test_versions.py
ms-kashyap/responsible-ai-widgets
56906fb30d9b81a5edc5443d24312bc2d32e5165
[ "MIT" ]
119
2021-12-02T21:00:47.000Z
2022-03-31T06:44:31.000Z
responsibleai/tests/tools/shared/test_versions.py
ms-kashyap/responsible-ai-widgets
56906fb30d9b81a5edc5443d24312bc2d32e5165
[ "MIT" ]
293
2021-11-30T16:45:49.000Z
2022-03-31T23:57:13.000Z
responsibleai/tests/tools/shared/test_versions.py
ms-kashyap/responsible-ai-widgets
56906fb30d9b81a5edc5443d24312bc2d32e5165
[ "MIT" ]
28
2021-12-07T17:28:04.000Z
2022-03-31T07:47:11.000Z
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. import re import pytest import semver from responsibleai._tools.shared.versions import CausalVersions
27.241935
72
0.598579
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. import re import pytest import semver from responsibleai._tools.shared.versions import CausalVersions class TestVersions: @pytest.mark.parametrize( 'versions_class', [ CausalVersions, ] ) def te...
1,079
409
23
7364ec5a8ae036994247c24918d6f8d961e42d13
1,341
py
Python
PerfTest/NCEP_TimeSeries.py
HDFGroup/hdflab_examples
1570881ea0aff7bdf8846942308a3e0554d13842
[ "MIT" ]
3
2018-07-29T09:01:00.000Z
2019-10-23T03:06:39.000Z
PerfTest/NCEP_TimeSeries.py
HDFGroup/hdflab_examples
1570881ea0aff7bdf8846942308a3e0554d13842
[ "MIT" ]
null
null
null
PerfTest/NCEP_TimeSeries.py
HDFGroup/hdflab_examples
1570881ea0aff7bdf8846942308a3e0554d13842
[ "MIT" ]
1
2018-09-20T13:44:04.000Z
2018-09-20T13:44:04.000Z
import sys import random import h5pyd import numpy as np # # Extracts a time series for the NCEP dataset # # choose random x,y coordinate for the time series shape = (7850, 720, 1440) x_index = random.randint(0, shape[2]-1) y_index = random.randint(0, shape[1]-1) end_index = shape[0] if len(sys.argv) > 1: if sy...
27.9375
87
0.648024
import sys import random import h5pyd import numpy as np # # Extracts a time series for the NCEP dataset # # choose random x,y coordinate for the time series shape = (7850, 720, 1440) x_index = random.randint(0, shape[2]-1) y_index = random.randint(0, shape[1]-1) end_index = shape[0] if len(sys.argv) > 1: if sy...
0
0
0
72faed421ef0180af36c32fcb294bf5bb3f9e84e
1,159
py
Python
ravepay/settings.py
gbozee/django-ravepay
cc9fba3440457ee2941bee2db464520eb00ad98e
[ "MIT" ]
7
2017-11-22T23:53:49.000Z
2021-05-03T22:20:44.000Z
ravepay/settings.py
iAmKabiru/django-ravepay
2d13347300b1d9ab62a23c957e29a33cfddde796
[ "MIT" ]
5
2020-02-11T21:49:35.000Z
2021-06-17T10:20:43.000Z
ravepay/settings.py
iAmKabiru/django-ravepay
2d13347300b1d9ab62a23c957e29a33cfddde796
[ "MIT" ]
7
2017-12-27T12:28:48.000Z
2021-05-03T19:54:47.000Z
from django.conf import settings import os RAVEPAY_SECRET_KEY = getattr( settings, "RAVEPAY_SECRET_KEY", os.getenv("RAVEPAY_SECRET_KEY", "") ) RAVEPAY_PUBLIC_KEY = getattr( settings, "RAVEPAY_PUBLIC_KEY", os.getenv("RAVEPAY_PUBLIC_KEY", "") ) ALLOWED_HOSTS = getattr(settings, "ALLOWED_HOSTS", []) RAVEPAY_WEBHO...
42.925926
86
0.791199
from django.conf import settings import os RAVEPAY_SECRET_KEY = getattr( settings, "RAVEPAY_SECRET_KEY", os.getenv("RAVEPAY_SECRET_KEY", "") ) RAVEPAY_PUBLIC_KEY = getattr( settings, "RAVEPAY_PUBLIC_KEY", os.getenv("RAVEPAY_PUBLIC_KEY", "") ) ALLOWED_HOSTS = getattr(settings, "ALLOWED_HOSTS", []) RAVEPAY_WEBHO...
0
0
0
3f0cd4a144e337c91c0b0851099666f5b5dbd8bd
1,794
py
Python
test/aqua/test_eoh.py
chunfuchen/aqua
fde435203a2799433a4e50897554fa226c8ff1dc
[ "Apache-2.0" ]
null
null
null
test/aqua/test_eoh.py
chunfuchen/aqua
fde435203a2799433a4e50897554fa226c8ff1dc
[ "Apache-2.0" ]
null
null
null
test/aqua/test_eoh.py
chunfuchen/aqua
fde435203a2799433a4e50897554fa226c8ff1dc
[ "Apache-2.0" ]
2
2020-02-13T02:17:58.000Z
2020-08-09T07:56:25.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
29.409836
97
0.688963
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
0
0
0
a18e8308da8486a770e2891eeb29e9bbed3cb732
610
py
Python
server/migrations/versions/26e723d032b1_dataset_add_created_at.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
server/migrations/versions/26e723d032b1_dataset_add_created_at.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
14
2022-01-25T17:56:52.000Z
2022-01-28T17:47:59.000Z
server/migrations/versions/26e723d032b1_dataset_add_created_at.py
multi-coop/catalogage-donnees
1d70401ff6c7b01ec051460a253cb105adf65911
[ "MIT" ]
null
null
null
"""dataset_add_created_at Revision ID: 26e723d032b1 Revises: 30474ebed7a2 Create Date: 2022-03-16 15:50:00.805743 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "26e723d032b1" down_revision = "30474ebed7a2" branch_labels = None depends_on = None
19.0625
56
0.654098
"""dataset_add_created_at Revision ID: 26e723d032b1 Revises: 30474ebed7a2 Create Date: 2022-03-16 15:50:00.805743 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "26e723d032b1" down_revision = "30474ebed7a2" branch_labels = None depends_on = None def upgrade()...
257
0
46
e29ffcd80dc6bc6b37e8b9541005b9d9d749edeb
448
py
Python
lotube/users/serializers.py
zurfyx/lotube
d00a456d4aff5a6f4c63dab5d90ba6a3a72e3a3f
[ "MIT" ]
null
null
null
lotube/users/serializers.py
zurfyx/lotube
d00a456d4aff5a6f4c63dab5d90ba6a3a72e3a3f
[ "MIT" ]
null
null
null
lotube/users/serializers.py
zurfyx/lotube
d00a456d4aff5a6f4c63dab5d90ba6a3a72e3a3f
[ "MIT" ]
null
null
null
from rest_framework import serializers from rest_framework.serializers import HyperlinkedIdentityField from users.models import User
32
85
0.723214
from rest_framework import serializers from rest_framework.serializers import HyperlinkedIdentityField from users.models import User class UserSerializer(serializers.HyperlinkedModelSerializer): href = HyperlinkedIdentityField(view_name='api_v2:users-detail') class Meta: model = User fields ...
0
290
23
301336fa9e8bd0f9cddaa1051bfb04ece382cdc8
1,336
py
Python
contours new.py
guyfromthesky/OCR-Project
c126c9844ddecbeefd1de6ae49074d3b56062df3
[ "MIT" ]
null
null
null
contours new.py
guyfromthesky/OCR-Project
c126c9844ddecbeefd1de6ae49074d3b56062df3
[ "MIT" ]
null
null
null
contours new.py
guyfromthesky/OCR-Project
c126c9844ddecbeefd1de6ae49074d3b56062df3
[ "MIT" ]
null
null
null
import cv2 import numpy as np img_path = r'C:\Users\evan\Documents\GitHub\OCR-Project\BAKR\Crop_IMG__1651113545.png' import cv2; import numpy as np; # Read image image = cv2.imread(img_path) cv2.waitKey(0) # Grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Find Canny edges edged = cv2.Canny(gray, 20, 2...
24.290909
86
0.747754
import cv2 import numpy as np img_path = r'C:\Users\evan\Documents\GitHub\OCR-Project\BAKR\Crop_IMG__1651113545.png' import cv2; import numpy as np; # Read image image = cv2.imread(img_path) cv2.waitKey(0) # Grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Find Canny edges edged = cv2.Canny(gray, 20, 2...
0
0
0
de173234238504b084701c6804c76ce2b05393e2
8,206
py
Python
bundle/YouCompleteMe/third_party/ycmd/ycmd/request_wrap.py
xiaoyin199/myvim
910dac2ae265eb4896468d4dd447df4b188ddaf1
[ "Vim" ]
null
null
null
bundle/YouCompleteMe/third_party/ycmd/ycmd/request_wrap.py
xiaoyin199/myvim
910dac2ae265eb4896468d4dd447df4b188ddaf1
[ "Vim" ]
null
null
null
bundle/YouCompleteMe/third_party/ycmd/ycmd/request_wrap.py
xiaoyin199/myvim
910dac2ae265eb4896468d4dd447df4b188ddaf1
[ "Vim" ]
null
null
null
# encoding: utf8 # # Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
36.471111
80
0.677309
# encoding: utf8 # # Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
4,846
7
346
9b6a1f4320c04cfa1520b5d5adfbae8953ddf82b
521
py
Python
cevast/certdb/__init__.py
crocs-muni/cert-validataion-stats
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
[ "MIT" ]
3
2020-06-26T09:31:35.000Z
2020-06-26T09:32:17.000Z
cevast/certdb/__init__.py
crocs-muni/cert-validataion-stats
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
[ "MIT" ]
null
null
null
cevast/certdb/__init__.py
crocs-muni/cert-validataion-stats
bd61968c0487e634c160f6e25b7bb0eb1bab64fc
[ "MIT" ]
null
null
null
"""CertDB is a database managing X.509 certificates.""" __all__ = ( 'CertDB', 'CertDBReadOnly', 'CertFileDB', 'CertFileDBReadOnly', 'CertNotAvailableError', 'CertInvalidError', 'CompositeCertDB', 'CompositeCertDBReadOnly', ) __version__ = '1.1' __author__ = 'Radim Podola' from .cert_db...
27.421053
84
0.756238
"""CertDB is a database managing X.509 certificates.""" __all__ = ( 'CertDB', 'CertDBReadOnly', 'CertFileDB', 'CertFileDBReadOnly', 'CertNotAvailableError', 'CertInvalidError', 'CompositeCertDB', 'CompositeCertDBReadOnly', ) __version__ = '1.1' __author__ = 'Radim Podola' from .cert_db...
0
0
0
66b94a4f4da0f38a8ab044038a48b3375a219494
34,715
py
Python
mpcpy/units.py
YangyangFu/MPCPy
c9980cbfe7b5ea21b003c2c0bab800099dccf3f1
[ "BSD-3-Clause-LBNL" ]
96
2017-03-31T09:59:44.000Z
2022-03-23T18:39:37.000Z
mpcpy/units.py
kuzha/MPCPy
9f78aa68236f87d39a50de54978c5064f9cc13c6
[ "BSD-3-Clause-LBNL" ]
150
2017-03-03T17:28:34.000Z
2021-02-24T20:03:24.000Z
mpcpy/units.py
kuzha/MPCPy
9f78aa68236f87d39a50de54978c5064f9cc13c6
[ "BSD-3-Clause-LBNL" ]
32
2017-04-24T18:22:40.000Z
2022-03-29T17:51:20.000Z
# -*- coding: utf-8 -*- """ ``units`` classes manage the conversion of units for MPCPy variables. See documentation on ``variables`` for more information. """ from abc import ABCMeta, abstractmethod import numpy as np #%% Display unit abstract interface #%% Display unit quantity implementation #%% Boolean displa...
32.535145
75
0.658102
# -*- coding: utf-8 -*- """ ``units`` classes manage the conversion of units for MPCPy variables. See documentation on ``variables`` for more information. """ from abc import ABCMeta, abstractmethod import numpy as np #%% Display unit abstract interface class _DisplayUnit(object): __metaclass__ = ABCMeta; ...
21,301
798
10,791
b8ed9add650effe4bdc5d102b5715c4b685306e4
1,335
py
Python
test/test_tindex.py
exepulveda/pymgt
c49a1de3d45b82ce8dd659693e3c41fc4c967b24
[ "MIT" ]
1
2021-07-10T00:58:30.000Z
2021-07-10T00:58:30.000Z
test/test_tindex.py
exepulveda/pymgt
c49a1de3d45b82ce8dd659693e3c41fc4c967b24
[ "MIT" ]
null
null
null
test/test_tindex.py
exepulveda/pymgt
c49a1de3d45b82ce8dd659693e3c41fc4c967b24
[ "MIT" ]
null
null
null
import numpy as np from pymgt.tindex import generate_directions from pymgt.tindex import projection_index from pymgt.tindex import Projectable from pymgt.tindex import jarque_bera_index from pymgt.tindex import shapiro_index from pymgt.tindex import anderson_index from pymgt.tindex import ks_index
25.188679
79
0.633708
import numpy as np from pymgt.tindex import generate_directions from pymgt.tindex import projection_index from pymgt.tindex import Projectable from pymgt.tindex import jarque_bera_index from pymgt.tindex import shapiro_index from pymgt.tindex import anderson_index from pymgt.tindex import ks_index def test_generate_d...
943
0
92
c5d8549560107cb450a57ac7bf626615ee97a86a
1,340
py
Python
hone/tests/csv_utils_test.py
awsrossw/hone
d69dec08ad4dbeb59b6c042443635a2d4937d7c6
[ "MIT" ]
null
null
null
hone/tests/csv_utils_test.py
awsrossw/hone
d69dec08ad4dbeb59b6c042443635a2d4937d7c6
[ "MIT" ]
null
null
null
hone/tests/csv_utils_test.py
awsrossw/hone
d69dec08ad4dbeb59b6c042443635a2d4937d7c6
[ "MIT" ]
null
null
null
import os import unittest from hone.utils import csv_utils dirname = os.path.dirname(__file__) csv_A_path = os.path.join(dirname, "data", "small_cats_dataset.csv") csv_B_path = os.path.join(dirname, "data", "comma_test.csv") small_csv = csv_utils.CSVUtils(csv_A_path) comma_csv = csv_utils.CSVUtils(csv_B_path) if __...
41.875
109
0.536567
import os import unittest from hone.utils import csv_utils dirname = os.path.dirname(__file__) csv_A_path = os.path.join(dirname, "data", "small_cats_dataset.csv") csv_B_path = os.path.join(dirname, "data", "comma_test.csv") small_csv = csv_utils.CSVUtils(csv_A_path) comma_csv = csv_utils.CSVUtils(csv_B_path) class ...
885
17
76
816f2f8179bff8e2c67506f066639890aa090d22
2,209
py
Python
testing.py
agakshat/dagger-pg
89f937e8a9e4876c7e8f73658d3618d590971565
[ "MIT" ]
4
2020-05-14T07:00:38.000Z
2021-11-19T23:41:15.000Z
testing.py
agakshat/dagger-pg
89f937e8a9e4876c7e8f73658d3618d590971565
[ "MIT" ]
null
null
null
testing.py
agakshat/dagger-pg
89f937e8a9e4876c7e8f73658d3618d590971565
[ "MIT" ]
2
2019-07-05T22:46:10.000Z
2020-10-25T08:54:13.000Z
import gym import torch import numpy as np from networks import ActorNetwork import argparse from torch.autograd import Variable if __name__=='__main__': main()
36.213115
87
0.594839
import gym import torch import numpy as np from networks import ActorNetwork import argparse from torch.autograd import Variable def parse_arguments(): # Command-line flags are defined here. parser = argparse.ArgumentParser() parser.add_argument('--env-name', default='LunarLander-v2', ...
1,977
0
69
362f4d262e981bbc2cb9514ea3ad58afe232c6f0
168
py
Python
wolverine/db/__init__.py
drankinn/wolverine
22c3e59db70c96edb3f4c2ebaf8482eda10a3e2a
[ "MIT" ]
4
2015-10-19T23:09:42.000Z
2016-01-07T09:52:13.000Z
wolverine/db/__init__.py
drankinn/wolverine
22c3e59db70c96edb3f4c2ebaf8482eda10a3e2a
[ "MIT" ]
2
2015-10-21T20:46:12.000Z
2021-03-22T17:15:17.000Z
wolverine/db/__init__.py
drankinn/wolverine
22c3e59db70c96edb3f4c2ebaf8482eda10a3e2a
[ "MIT" ]
3
2015-11-13T12:33:40.000Z
2021-10-04T17:42:14.000Z
from wolverine.module import MicroModule
15.272727
40
0.672619
from wolverine.module import MicroModule class MicroDB(MicroModule): def __init__(self): super(MicroDB, self).__init__() self.name = 'microdb'
68
6
50
bf5d944a7b36974f0c9c2523aa6b947781152c8f
1,042
py
Python
operations/fleet_management/migrations/0030_auto_20180320_1535.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/fleet_management/migrations/0030_auto_20180320_1535.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/fleet_management/migrations/0030_auto_20180320_1535.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-03-20 13:35 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models
32.5625
161
0.644914
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-03-20 13:35 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fleet_management', '0029_vehicledriver_reason'), ] op...
0
833
23
8f1ef3bb41841eef6301aa9a3f84e7f3cade3a1b
32,503
py
Python
qualcoder/merge_projects.py
FantasqueX/QualCoder
11a9c593fab0bbcf9f55b14501deee878d264e8d
[ "MIT" ]
null
null
null
qualcoder/merge_projects.py
FantasqueX/QualCoder
11a9c593fab0bbcf9f55b14501deee878d264e8d
[ "MIT" ]
null
null
null
qualcoder/merge_projects.py
FantasqueX/QualCoder
11a9c593fab0bbcf9f55b14501deee878d264e8d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (c) 2022 Colin Curtain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
50.945141
139
0.575362
# -*- coding: utf-8 -*- """ Copyright (c) 2022 Colin Curtain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
1,309
0
27
49d1dad5f4c48818f0f83f49696bf966ba1ac099
82
py
Python
os.py
vishnuhd/k8s-cronjob-python
b7e53f8f9984ff3cbc256b5275345b256ccb0035
[ "Apache-2.0" ]
null
null
null
os.py
vishnuhd/k8s-cronjob-python
b7e53f8f9984ff3cbc256b5275345b256ccb0035
[ "Apache-2.0" ]
null
null
null
os.py
vishnuhd/k8s-cronjob-python
b7e53f8f9984ff3cbc256b5275345b256ccb0035
[ "Apache-2.0" ]
null
null
null
import os print("Hello",os.getenv('NAME')) print("Your age is",os.getenv('AGE'))
16.4
37
0.670732
import os print("Hello",os.getenv('NAME')) print("Your age is",os.getenv('AGE'))
0
0
0
5b7753a7f311460d7b616741278ffa7413e3712c
2,224
py
Python
miura/data.py
toumorokoshi/miura
f23e270a9507e5946798b1e897220c9fb1b8d5fa
[ "MIT" ]
1
2017-05-18T11:34:35.000Z
2017-05-18T11:34:35.000Z
miura/data.py
toumorokoshi/miura
f23e270a9507e5946798b1e897220c9fb1b8d5fa
[ "MIT" ]
null
null
null
miura/data.py
toumorokoshi/miura
f23e270a9507e5946798b1e897220c9fb1b8d5fa
[ "MIT" ]
null
null
null
import os import re import yaml from .exceptions import MiuraException import logging logger = logging.getLogger(__name__) def load_file_or_directory(path): """ given a path, determine if the path is a file or directory, and yield a list of absolute file paths """ assert os.path.exists(path), "{...
31.771429
82
0.599371
import os import re import yaml from .exceptions import MiuraException import logging logger = logging.getLogger(__name__) def load_data_from_path(path): file_paths = load_file_or_directory(path) return retrieve_data(file_paths) def load_file_or_directory(path): """ given a path, determine if the p...
92
0
23
1c984379a042e9fd6a8818d0f9d29c518209740c
6,982
py
Python
exp_script.py
meelgroup/mgt
ccd51c9094e63eee8234ed7cde128746a481f897
[ "MIT" ]
1
2020-02-27T19:14:37.000Z
2020-02-27T19:14:37.000Z
exp_script.py
meelgroup/mgt
ccd51c9094e63eee8234ed7cde128746a481f897
[ "MIT" ]
null
null
null
exp_script.py
meelgroup/mgt
ccd51c9094e63eee8234ed7cde128746a481f897
[ "MIT" ]
null
null
null
import ast import matplotlib.pyplot as plt from matplotlib import cm import matplotlib as mpl from matplotlib.ticker import LinearLocator, FormatStrFormatter import numpy as np import os.path import pandas as pd import seaborn as sns import operator as op from functools import reduce from setup import DIR # DIR to g...
30.225108
87
0.552564
import ast import matplotlib.pyplot as plt from matplotlib import cm import matplotlib as mpl from matplotlib.ticker import LinearLocator, FormatStrFormatter import numpy as np import os.path import pandas as pd import seaborn as sns import operator as op from functools import reduce from setup import DIR # DIR to g...
6,155
0
160
26869308a0719ae448eb006c4769d94b322635a8
894
py
Python
backend/config/components/auth.py
hnthh/foodgram-project-react
3383c6a116fded11b4a764b95e6ca4ead03444f3
[ "MIT" ]
1
2022-02-09T10:42:45.000Z
2022-02-09T10:42:45.000Z
backend/config/components/auth.py
hnthh/foodgram
3383c6a116fded11b4a764b95e6ca4ead03444f3
[ "MIT" ]
null
null
null
backend/config/components/auth.py
hnthh/foodgram
3383c6a116fded11b4a764b95e6ca4ead03444f3
[ "MIT" ]
null
null
null
AUTH_USER_MODEL = 'users.User' AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validat...
28.83871
91
0.655481
AUTH_USER_MODEL = 'users.User' AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validat...
0
0
0
d4aaa9f499269a7b55947f66eaedbee0e3285e9f
3,832
py
Python
stats.py
vlddev/news_downloader
826ab06ae532fdc829862215c0901399a67e6624
[ "Apache-2.0" ]
null
null
null
stats.py
vlddev/news_downloader
826ab06ae532fdc829862215c0901399a67e6624
[ "Apache-2.0" ]
null
null
null
stats.py
vlddev/news_downloader
826ab06ae532fdc829862215c0901399a67e6624
[ "Apache-2.0" ]
null
null
null
import re import sys import logging from collections import Counter # TODO use https://bitbucket.org/spirit/guess_language # for language detection
31.154472
112
0.59238
import re import sys import logging from collections import Counter # TODO use https://bitbucket.org/spirit/guess_language # for language detection class TextStats(object): def __init__(self, text): self.text = text self.text_lower = text.lower() self.words = re.findall(r'\w+', text.lower()) se...
3,497
3
247
d10a3d88aef5a6ce7c6db2138dda46ee0331ecd1
10,992
py
Python
VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py
IngridAtMicrosoft/media-services-v3-python
2eb43f502cd8637961869faf8d0c365ffa1680d2
[ "MIT" ]
null
null
null
VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py
IngridAtMicrosoft/media-services-v3-python
2eb43f502cd8637961869faf8d0c365ffa1680d2
[ "MIT" ]
null
null
null
VideoEncoding/Encoding_H264_OverlayImage/encoding-h264-overlayimage.py
IngridAtMicrosoft/media-services-v3-python
2eb43f502cd8637961869faf8d0c365ffa1680d2
[ "MIT" ]
null
null
null
from datetime import timedelta from dotenv import load_dotenv from azure.identity import DefaultAzureCredential from azure.mgmt.media import AzureMediaServices from azure.storage.blob import BlobServiceClient from azure.mgmt.media.models import ( Asset, Transform, TransformOutput, StandardEncoderPreset, AacAu...
40.411765
170
0.744269
from datetime import timedelta from dotenv import load_dotenv from azure.identity import DefaultAzureCredential from azure.mgmt.media import AzureMediaServices from azure.storage.blob import BlobServiceClient from azure.mgmt.media.models import ( Asset, Transform, TransformOutput, StandardEncoderPreset, AacAu...
623
0
22
214372d27e8b106f0a19708dede95d2bbe9fdb00
71
py
Python
reinforcement/__init__.py
SwamyDev/reinforcement
997f36a193f57b2a4ba34cf7bcee977b10dd1742
[ "MIT" ]
7
2018-05-15T09:53:18.000Z
2020-06-28T21:24:49.000Z
reinforcement/__init__.py
SwamyDev/reinforcement
997f36a193f57b2a4ba34cf7bcee977b10dd1742
[ "MIT" ]
7
2019-09-08T17:02:56.000Z
2021-08-25T14:41:20.000Z
reinforcement/__init__.py
SwamyDev/reinforcement
997f36a193f57b2a4ba34cf7bcee977b10dd1742
[ "MIT" ]
1
2019-05-07T11:25:29.000Z
2019-05-07T11:25:29.000Z
from reinforcement._version import __version__ name = "reinforcement"
17.75
46
0.830986
from reinforcement._version import __version__ name = "reinforcement"
0
0
0
11de92107fff8f5a01ef8e14f3138244980c3f80
29,308
py
Python
kerfed_api/helpers/shopdoc.py
kerfed/kerfed-api-python
2824f960fe06c6dd1d060eb3a7a57ceee9082b4f
[ "MIT" ]
null
null
null
kerfed_api/helpers/shopdoc.py
kerfed/kerfed-api-python
2824f960fe06c6dd1d060eb3a7a57ceee9082b4f
[ "MIT" ]
null
null
null
kerfed_api/helpers/shopdoc.py
kerfed/kerfed-api-python
2824f960fe06c6dd1d060eb3a7a57ceee9082b4f
[ "MIT" ]
null
null
null
import os import json import collections import numpy as np import pandas as pd # in the standard lib # like regexes but with less annoying wildcards import re from fnmatch import fnmatch try: import webcolors except BaseException: webcolors = None def expand_wildcard(df, key, values): """ Expand f...
30.689005
77
0.52385
import os import json import collections import numpy as np import pandas as pd # in the standard lib # like regexes but with less annoying wildcards import re from fnmatch import fnmatch try: import webcolors except BaseException: webcolors = None class OptionsGenerator(object): def __init__(self, ...
4,193
8,252
72
f39a5008d6e1c8e8868931e246ce18a5152cc852
1,505
py
Python
modules/ConfigEngine.py
Reachip/COVID19-France
e7fde76e0a75b51aed1e67a8d21aa80b0b68050a
[ "MIT" ]
15
2020-04-13T21:58:26.000Z
2020-06-18T07:31:55.000Z
modules/ConfigEngine.py
Reachip/COVID19-France
e7fde76e0a75b51aed1e67a8d21aa80b0b68050a
[ "MIT" ]
3
2020-04-18T16:36:24.000Z
2020-09-11T13:07:41.000Z
modules/ConfigEngine.py
Reachip/COVID19-France
e7fde76e0a75b51aed1e67a8d21aa80b0b68050a
[ "MIT" ]
6
2020-04-13T22:38:14.000Z
2020-09-02T19:07:38.000Z
#!/usr/bin/env python # coding: utf-8 # Twitter: @xrths # www.xrths.fr # Importation des librairies. import os from configparser import ConfigParser
24.274194
67
0.671761
#!/usr/bin/env python # coding: utf-8 # Twitter: @xrths # www.xrths.fr # Importation des librairies. import os from configparser import ConfigParser class BaseConfigEngine: def __init__(self): self._config_file = os.path.join( os.path.dirname(__file__), '../config.ini') self.parser ...
850
376
126
1713b6c48a37bc34c443e86aa8c3581c0e08d6f2
977
py
Python
vindauga/types/records/directory_search_record.py
gabbpuy/vindauga
d4a51a618d60e83d82fd5fee585d08ff288484f3
[ "BSD-2-Clause" ]
5
2019-07-03T16:01:46.000Z
2021-12-22T10:01:04.000Z
vindauga/types/records/directory_search_record.py
gabbpuy/vindauga
d4a51a618d60e83d82fd5fee585d08ff288484f3
[ "BSD-2-Clause" ]
null
null
null
vindauga/types/records/directory_search_record.py
gabbpuy/vindauga
d4a51a618d60e83d82fd5fee585d08ff288484f3
[ "BSD-2-Clause" ]
1
2020-09-22T14:25:13.000Z
2020-09-22T14:25:13.000Z
# -*- coding: utf-8 -*- import datetime from functools import total_ordering import os import stat from .search_record import SearchRecord, FA_DIREC, FA_ARCH @total_ordering # Sort, directories first, then files
27.914286
82
0.650972
# -*- coding: utf-8 -*- import datetime from functools import total_ordering import os import stat from .search_record import SearchRecord, FA_DIREC, FA_ARCH @total_ordering class DirectorySearchRecord(SearchRecord): def setStatInfo(self, filename: str, s: os.stat_result): self.attr = FA_ARCH i...
606
21
129
e1f35d874d627872d0fd19befdafc861ef9953ce
2,468
py
Python
bin/global_place/RePlAce/rdf_RePlAce.py
DanielTRYTRYLOOK/RDF-2020
a6a6c0835a02c8a98ae8e899dec02ed960afb69c
[ "MIT" ]
3
2020-11-08T17:04:04.000Z
2021-03-28T17:44:12.000Z
bin/global_place/RePlAce/rdf_RePlAce.py
DanielTRYTRYLOOK/RDF-2020
a6a6c0835a02c8a98ae8e899dec02ed960afb69c
[ "MIT" ]
1
2021-11-30T09:12:06.000Z
2021-11-30T09:12:06.000Z
bin/global_place/RePlAce/rdf_RePlAce.py
DanielTRYTRYLOOK/RDF-2020
a6a6c0835a02c8a98ae8e899dec02ed960afb69c
[ "MIT" ]
4
2021-09-01T17:04:22.000Z
2022-02-11T15:20:45.000Z
''' File name : rdf_RePlAce.py Author : Jinwook Jung Created on : Tue 30 Jul 2019 10:31:18 PM EDT Last modified : 2020-01-06 15:22:58 Description : ''' import subprocess, os, sys, random, yaml, time from subprocess import Popen, PIPE, CalledProcessError # FIXME sys.path.inser...
30.469136
79
0.597245
''' File name : rdf_RePlAce.py Author : Jinwook Jung Created on : Tue 30 Jul 2019 10:31:18 PM EDT Last modified : 2020-01-06 15:22:58 Description : ''' import subprocess, os, sys, random, yaml, time from subprocess import Popen, PIPE, CalledProcessError # FIXME sys.path.inser...
1,936
6
153
56927f4042b90cd934bea19ec2c3eee7f5b8c6d6
95
py
Python
backend/ultrabooks/apps.py
smehlhoff/notepark-backend
9719afe335cf2a51bf080e9d157b9e06539c7c8e
[ "Apache-2.0" ]
null
null
null
backend/ultrabooks/apps.py
smehlhoff/notepark-backend
9719afe335cf2a51bf080e9d157b9e06539c7c8e
[ "Apache-2.0" ]
null
null
null
backend/ultrabooks/apps.py
smehlhoff/notepark-backend
9719afe335cf2a51bf080e9d157b9e06539c7c8e
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig
15.833333
34
0.768421
from django.apps import AppConfig class UltrabooksConfig(AppConfig): name = 'ultrabooks'
0
37
23
78fff8947e055f7dafb116d7ee57d17cb30b7833
630
py
Python
Curso/ModuloTkinter/Aula029TabelaMySQL3.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
Curso/ModuloTkinter/Aula029TabelaMySQL3.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
Curso/ModuloTkinter/Aula029TabelaMySQL3.py
DavidBitner/Aprendizado-Python
e1dcf18f9473c697fc2302f34a2d3e025ca6c969
[ "MIT" ]
null
null
null
from tkinter import * import mysql.connector root = Tk() root.title("Doidera") root.geometry("400x400+200+200") my_db = mysql.connector.connect( host="localhost", user="root", passwd="YourPassword", database="doidera" ) # Criar um cursor e inicializa-lo my_cursor = my_db.cursor() # Criar tabela coma...
22.5
55
0.626984
from tkinter import * import mysql.connector root = Tk() root.title("Doidera") root.geometry("400x400+200+200") my_db = mysql.connector.connect( host="localhost", user="root", passwd="YourPassword", database="doidera" ) # Criar um cursor e inicializa-lo my_cursor = my_db.cursor() # Criar tabela coma...
0
0
0
76ea2159e2f0cceb466e1db9b1d5f9c27090f4c3
497
py
Python
homeassistant/components/gree/config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2017-08-02T19:26:39.000Z
2020-03-14T22:47:41.000Z
homeassistant/components/gree/config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
60
2020-08-03T07:32:56.000Z
2022-03-31T06:02:07.000Z
homeassistant/components/gree/config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Config flow for Gree.""" from homeassistant import config_entries from homeassistant.helpers import config_entry_flow from .bridge import DeviceHelper from .const import DOMAIN async def _async_has_devices(hass) -> bool: """Return if there are devices that can be discovered.""" devices = await DeviceHelpe...
27.611111
84
0.782696
"""Config flow for Gree.""" from homeassistant import config_entries from homeassistant.helpers import config_entry_flow from .bridge import DeviceHelper from .const import DOMAIN async def _async_has_devices(hass) -> bool: """Return if there are devices that can be discovered.""" devices = await DeviceHelpe...
0
0
0
3ec228f8c259854c27539bf995921a7f2873fca4
724
py
Python
tests/test_main.py
Asday/django-persistent-app-conf
6b8c45c10c78f1ac4066f323f5b0b3ed574e6e93
[ "MIT" ]
null
null
null
tests/test_main.py
Asday/django-persistent-app-conf
6b8c45c10c78f1ac4066f323f5b0b3ed574e6e93
[ "MIT" ]
null
null
null
tests/test_main.py
Asday/django-persistent-app-conf
6b8c45c10c78f1ac4066f323f5b0b3ed574e6e93
[ "MIT" ]
null
null
null
import os import sys import django import pytest import pac # noqa from .helpers import sanity @sanity @sanity
21.294118
74
0.696133
import os import sys import django import pytest import pac # noqa from .helpers import sanity @sanity def test_environment_matches_expectations(): current_env = os.getenv('CURRENTENV', None) assert current_env is not None, '"CURRENTENV" not set by test runner.' expected_django_version = current_en...
560
0
44
9e328819b51d43963aa70159e6f94602d4f6590f
127
py
Python
PIARS/run.py
qingyang-xi/piars
193e33f3b01b1c0bfcea58faefb4605ef84539ce
[ "MIT" ]
null
null
null
PIARS/run.py
qingyang-xi/piars
193e33f3b01b1c0bfcea58faefb4605ef84539ce
[ "MIT" ]
null
null
null
PIARS/run.py
qingyang-xi/piars
193e33f3b01b1c0bfcea58faefb4605ef84539ce
[ "MIT" ]
null
null
null
import math import matplotlib.pyplot as plt print("Hello World!") x = math.sqrt(30) print(x) plt.plot([1,2,3,4,5]) plt.show()
14.111111
31
0.692913
import math import matplotlib.pyplot as plt print("Hello World!") x = math.sqrt(30) print(x) plt.plot([1,2,3,4,5]) plt.show()
0
0
0
6a1c48cbadafe36a82365fc76d25d0196ec2ece7
1,601
py
Python
applications/migrations/0006_add_berth_switch.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
3
2020-10-13T07:58:48.000Z
2020-12-22T09:41:50.000Z
applications/migrations/0006_add_berth_switch.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
422
2018-10-25T10:57:05.000Z
2022-03-30T05:47:14.000Z
applications/migrations/0006_add_berth_switch.py
City-of-Helsinki/berth-reservations
a3b1a8c2176f132505527acdf6da3a62199401db
[ "MIT" ]
1
2020-04-03T07:38:03.000Z
2020-04-03T07:38:03.000Z
# Generated by Django 2.1.2 on 2019-04-08 11:55 from django.db import migrations, models import django.db.models.deletion
29.109091
85
0.425984
# Generated by Django 2.1.2 on 2019-04-08 11:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("applications", "0005_add_custom_permissions"), ] operations = [ migrations.CreateModel( name="B...
0
1,454
23
8c54298f976882469a2f9fc037cf3b36c35bb161
1,566
py
Python
trainer_for_failure_classes.py
birlrobotics/rcbht_training_and_online_classification
4ba605420fd9ab65e9e8173673a6e16f7dcb15df
[ "BSD-3-Clause" ]
null
null
null
trainer_for_failure_classes.py
birlrobotics/rcbht_training_and_online_classification
4ba605420fd9ab65e9e8173673a6e16f7dcb15df
[ "BSD-3-Clause" ]
null
null
null
trainer_for_failure_classes.py
birlrobotics/rcbht_training_and_online_classification
4ba605420fd9ab65e9e8173673a6e16f7dcb15df
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as plt from scipy.interpolate import spline import os from config import failure_class_name_to_id data_type = "SIM" filepath = "/Users/sklaw_mba/Desktop/ex/dr_juan_proj/workshop/data_cooker_code/parse_rcbht_data/my_training_data/"+d...
27
158
0.673691
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as plt from scipy.interpolate import spline import os from config import failure_class_name_to_id data_type = "SIM" filepath = "/Users/sklaw_mba/Desktop/ex/dr_juan_proj/workshop/data_cooker_code/parse_rcbht_data/my_training_data/"+d...
0
0
0
b1d071a81d9c5e740d93c53b301f287d816f0bf2
3,808
py
Python
common/preprocess.py
estephe-arnaud/ademfa
679587b09eb86d2956c73aec100d764ef7fc005c
[ "BSD-3-Clause" ]
2
2021-01-15T22:08:41.000Z
2022-01-18T14:19:43.000Z
common/preprocess.py
estephe-arnaud/ademfa
679587b09eb86d2956c73aec100d764ef7fc005c
[ "BSD-3-Clause" ]
null
null
null
common/preprocess.py
estephe-arnaud/ademfa
679587b09eb86d2956c73aec100d764ef7fc005c
[ "BSD-3-Clause" ]
1
2020-12-30T08:22:19.000Z
2020-12-30T08:22:19.000Z
"""Preprocess.""" import numpy as np import menpo from menpofit.fitter import align_shape_with_bounding_box from menpodetect.opencv import detect import common.utils import face_alignment.utils __DETECTOR__ = detect.load_opencv_frontal_face_detector() class Preprocess(object): """Preprocess."""
24.101266
77
0.621324
"""Preprocess.""" import numpy as np import menpo from menpofit.fitter import align_shape_with_bounding_box from menpodetect.opencv import detect import common.utils import face_alignment.utils __DETECTOR__ = detect.load_opencv_frontal_face_detector() class Preprocess(object): """Preprocess.""" def __init_...
3,260
0
233
3eae3efcfc3ddd24c3fb342dbde213ab0a08eaf8
12,978
py
Python
pyimagesource/bank.py
Fhrozen/pyimagesource
0bd3c8de484694877ea1d152448b7bc0b31b279a
[ "Apache-2.0" ]
6
2020-06-27T09:55:46.000Z
2022-03-28T01:01:37.000Z
pyimagesource/bank.py
Fhrozen/ism_rir
0bd3c8de484694877ea1d152448b7bc0b31b279a
[ "Apache-2.0" ]
null
null
null
pyimagesource/bank.py
Fhrozen/ism_rir
0bd3c8de484694877ea1d152448b7bc0b31b279a
[ "Apache-2.0" ]
1
2019-12-05T08:22:31.000Z
2019-12-05T08:22:31.000Z
# Copyright 2018 Waseda University (Nelson Yalta) # 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 agree...
52.330645
108
0.642164
# Copyright 2018 Waseda University (Nelson Yalta) # 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 agree...
1,344
0
50
5706a511320dad5fa027e14356e1f5a28e743c19
2,895
py
Python
nnn/nodes/info_node/functions.py
JacobFV/pgi
b4c9af3c4ae94fcb335f20c2a1e7a4ff46ca54e6
[ "MIT" ]
null
null
null
nnn/nodes/info_node/functions.py
JacobFV/pgi
b4c9af3c4ae94fcb335f20c2a1e7a4ff46ca54e6
[ "MIT" ]
null
null
null
nnn/nodes/info_node/functions.py
JacobFV/pgi
b4c9af3c4ae94fcb335f20c2a1e7a4ff46ca54e6
[ "MIT" ]
null
null
null
from typing import Optional, Text, List, Mapping, Callable, Tuple, Union, Counter import tensorflow as tf import tensorflow_probability.python.distributions as tfd from ...utils import types as ts from ...utils import keys def f_child_sample_factory(beta: ts.Float = 0): """ Args: beta: softmax ...
40.774648
108
0.727807
from typing import Optional, Text, List, Mapping, Callable, Tuple, Union, Counter import tensorflow as tf import tensorflow_probability.python.distributions as tfd from ...utils import types as ts from ...utils import keys def f_parent_no_parents(states: ts.NestedTensor, parent_names: List[Text]): return def ...
2,267
0
187
b7ef8b7db02557bd5008a14e944bd388c750285b
5,371
py
Python
crossdock/problems/experiment/crossdock_30_50_15_10_10.py
krerkkiat/icpr-2019-public
f3023c009f3335ce58204a45c270cfeb6ef19367
[ "BSD-3-Clause" ]
null
null
null
crossdock/problems/experiment/crossdock_30_50_15_10_10.py
krerkkiat/icpr-2019-public
f3023c009f3335ce58204a45c270cfeb6ef19367
[ "BSD-3-Clause" ]
null
null
null
crossdock/problems/experiment/crossdock_30_50_15_10_10.py
krerkkiat/icpr-2019-public
f3023c009f3335ce58204a45c270cfeb6ef19367
[ "BSD-3-Clause" ]
null
null
null
""" Cross-docking truck data. This data is generated by a generate_dataset.py script. Created: Feb 18, 2019 at 07:30:02 PM Copyright (c) 2022, Krerkkiat Chusap This souce code is licensed under BSD 3-Clause "New" or "Revised" License (see LICENSE for details). """ from pathlib import Path # Problem data. name = Pat...
47.114035
100
0.432694
""" Cross-docking truck data. This data is generated by a generate_dataset.py script. Created: Feb 18, 2019 at 07:30:02 PM Copyright (c) 2022, Krerkkiat Chusap This souce code is licensed under BSD 3-Clause "New" or "Revised" License (see LICENSE for details). """ from pathlib import Path # Problem data. name = Pat...
0
0
0
1bdf22fe89aeb7adc738880690082b4462bbb261
2,226
py
Python
debug.py
jlandgre/debug
24ae298b665a708fb13de7c17cd02cf23d747076
[ "MIT" ]
null
null
null
debug.py
jlandgre/debug
24ae298b665a708fb13de7c17cd02cf23d747076
[ "MIT" ]
null
null
null
debug.py
jlandgre/debug
24ae298b665a708fb13de7c17cd02cf23d747076
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import datetime as dt #Debug library functions #Add a new row to dfDebug
43.647059
104
0.615454
import pandas as pd import numpy as np import datetime as dt #Debug library functions def init(): data = {'Desc':[], 'colname':[], 'size':[], 'dtype_string':[], 'dtype_int':[], 'dtype_float':[], 'isnull':[], 'notnull':[], 'Desc2':[], 'Val2':[], 'time':[]} dfDebug = pd.DataFrame(data=data) #Tri...
1,957
0
155
624e4a1d0a67a168cebfa0bf99b24fcb3639eca0
1,032
py
Python
tests/unit/test_debuggers.py
danni-m/RLTest
85c09592e96e26edab94a22077a582fa425b62fa
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_debuggers.py
danni-m/RLTest
85c09592e96e26edab94a22077a582fa425b62fa
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_debuggers.py
danni-m/RLTest
85c09592e96e26edab94a22077a582fa425b62fa
[ "BSD-3-Clause" ]
null
null
null
from unittest import TestCase from RLTest.debuggers import Valgrind
43
106
0.664729
from unittest import TestCase from RLTest.debuggers import Valgrind class TestValgrind(TestCase): def test_generate_command_default(self): default_valgrind = Valgrind(options="") cmd_args = default_valgrind.generate_command() assert ['valgrind', '--error-exitcode=1', '--leak-check=full', ...
851
8
103
c78d66ffc5ac1217de63c18a78706287ebbcb685
392
py
Python
py/experiments/np_test.py
acjensen/control
273803cace506acb956f11da8d501863a5349892
[ "MIT" ]
null
null
null
py/experiments/np_test.py
acjensen/control
273803cace506acb956f11da8d501863a5349892
[ "MIT" ]
null
null
null
py/experiments/np_test.py
acjensen/control
273803cace506acb956f11da8d501863a5349892
[ "MIT" ]
null
null
null
import numpy as np a = range(100) A = np.array(a).reshape(len(a)//2, 2) A = A.ravel().view([('col1', 'i8'), ('col2', 'i8'), ] ).astype([('col1', 'i4'), ('col2', 'i8'), ]) print(A[:5]) # array([(0, 1), (2, 3), (4, 5), (6, 7), (8, 9)], # dtype=[('col1', '<i4'), ('col2', '<i8')]) print(A.dtype) ...
26.133333
63
0.431122
import numpy as np a = range(100) A = np.array(a).reshape(len(a)//2, 2) A = A.ravel().view([('col1', 'i8'), ('col2', 'i8'), ] ).astype([('col1', 'i4'), ('col2', 'i8'), ]) print(A[:5]) # array([(0, 1), (2, 3), (4, 5), (6, 7), (8, 9)], # dtype=[('col1', '<i4'), ('col2', '<i8')]) print(A.dtype) ...
0
0
0
bd8f8422450a7a9e0f5f2c3dfa55bf94e771b16d
1,148
py
Python
Office365_REST_Python_Client-2.1.0-py3.6.egg/examples/file_operations.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
Office365_REST_Python_Client-2.1.0-py3.6.egg/examples/file_operations.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
Office365_REST_Python_Client-2.1.0-py3.6.egg/examples/file_operations.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2018-03-23T14:49:04.000Z
2018-03-23T14:49:04.000Z
from examples.settings import settings from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.client_context import ClientContext def read_folder_and_files(): """Read a folder example""" list_obj = ctx.web.lists.get_by_title(listTitle) folder = list_obj.r...
31.027027
101
0.706446
from examples.settings import settings from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.client_context import ClientContext def read_folder_and_files(): """Read a folder example""" list_obj = ctx.web.lists.get_by_title(listTitle) folder = list_obj.r...
0
0
0
0602385d6a419c8343b8073083c49f7f56815ae0
4,874
py
Python
src/whoosh/lang/snowball/bases.py
matchup-ir/whooshy
3e8730f4cbb559fd59971c5a2e6d01924d3968c0
[ "BSD-2-Clause-FreeBSD" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
src/whoosh/lang/snowball/bases.py
matchup-ir/whooshy
3e8730f4cbb559fd59971c5a2e6d01924d3968c0
[ "BSD-2-Clause-FreeBSD" ]
85
2018-12-11T06:53:06.000Z
2021-07-30T20:39:12.000Z
src/whoosh/lang/snowball/bases.py
matchup-ir/whooshy
3e8730f4cbb559fd59971c5a2e6d01924d3968c0
[ "BSD-2-Clause-FreeBSD" ]
62
2015-07-03T12:34:32.000Z
2022-02-08T08:21:12.000Z
# Base classes class _ScandinavianStemmer(object): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scan...
36.373134
77
0.566065
# Base classes class _ScandinavianStemmer(object): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scan...
0
0
0
c36ef14937ce48bf1fede8f6a6f4555a4c9a20b7
671
py
Python
myopenpantry/models/ingredients.py
MyOpenPantry/flask-backend
e94702bfa04f36c1a6015ae3e9c37dfb7b923279
[ "MIT" ]
null
null
null
myopenpantry/models/ingredients.py
MyOpenPantry/flask-backend
e94702bfa04f36c1a6015ae3e9c37dfb7b923279
[ "MIT" ]
4
2021-03-28T19:47:04.000Z
2021-05-04T00:59:46.000Z
myopenpantry/models/ingredients.py
MyOpenPantry/flask-backend
e94702bfa04f36c1a6015ae3e9c37dfb7b923279
[ "MIT" ]
null
null
null
import sqlalchemy as sa from sqlalchemy.orm import relationship from myopenpantry.extensions.database import db # ingredients are a base part of recipes. ex "chicken breast" # association tables will be used to join these with inventory items, as well as the amount needed in recipes
37.277778
109
0.754098
import sqlalchemy as sa from sqlalchemy.orm import relationship from myopenpantry.extensions.database import db # ingredients are a base part of recipes. ex "chicken breast" # association tables will be used to join these with inventory items, as well as the amount needed in recipes class Ingredient(db.Model): __...
0
363
22
e9f1fa502170a2e93f549a491cb035c8fcee31ea
2,017
py
Python
csrv/model/cards/corp/card01065_test.py
mrroach/CentralServer
e377c65d8f3adf5a2d3273acd4f459be697aea56
[ "Apache-2.0" ]
null
null
null
csrv/model/cards/corp/card01065_test.py
mrroach/CentralServer
e377c65d8f3adf5a2d3273acd4f459be697aea56
[ "Apache-2.0" ]
null
null
null
csrv/model/cards/corp/card01065_test.py
mrroach/CentralServer
e377c65d8f3adf5a2d3273acd4f459be697aea56
[ "Apache-2.0" ]
1
2020-09-20T11:26:20.000Z
2020-09-20T11:26:20.000Z
import unittest from csrv.model import errors from csrv.model import events from csrv.model import test_base from csrv.model import timing_phases from csrv.model.cards.corp import card01065 if __name__ == '__main__': unittest.main()
32.532258
64
0.705007
import unittest from csrv.model import errors from csrv.model import events from csrv.model import test_base from csrv.model import timing_phases from csrv.model.cards.corp import card01065 class Card01065Test(test_base.TestBase): def setUp(self): test_base.TestBase.setUp(self) self.card = card01065.Card01...
1,687
19
73
8b1e2c0c2faf01a9f0cd58b853271bbbceaaf19e
2,374
py
Python
tests/test_observer_abilities.py
IanDCarroll/xox
38feac84e81e8c00a397f7f976efee15756cd3ac
[ "MIT" ]
null
null
null
tests/test_observer_abilities.py
IanDCarroll/xox
38feac84e81e8c00a397f7f976efee15756cd3ac
[ "MIT" ]
30
2016-11-25T05:34:34.000Z
2017-02-11T00:10:17.000Z
tests/test_observer_abilities.py
IanDCarroll/tik-tak-toe
38feac84e81e8c00a397f7f976efee15756cd3ac
[ "MIT" ]
1
2016-11-26T01:41:37.000Z
2016-11-26T01:41:37.000Z
import unittest from Training.observer_abilities import * if __name__ == '__main__': unittest.main()
38.290323
66
0.657961
import unittest from Training.observer_abilities import * class ObserverTestCase(unittest.TestCase): def setUp(self): self.observer = Observer() self.mock_4x4_board = [ 1, 0, 0,10, 0, 1,10, 0, 0,10, 1, 0, ...
1,954
21
293
d2f90e2105f715bfa385ede947f0041c8746e8c3
6,133
py
Python
in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py
fedelopezar/nrpytutorial
753acd954be4a2f99639c9f9fd5e623689fc7493
[ "BSD-2-Clause" ]
1
2021-12-13T05:51:18.000Z
2021-12-13T05:51:18.000Z
in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py
fedelopezar/nrpytutorial
753acd954be4a2f99639c9f9fd5e623689fc7493
[ "BSD-2-Clause" ]
null
null
null
in_progress/GiRaFFEfood_NRPy/GiRaFFEfood_NRPy_Aligned_Rotator.py
fedelopezar/nrpytutorial
753acd954be4a2f99639c9f9fd5e623689fc7493
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # <a id='top'></a> # # # # $\texttt{GiRaFFEfood}$: Initial data for $\texttt{GiRaFFE}$ # # ## Aligned Rotator # # $$\label{top}$$ # # This module provides another initial data option for $\texttt{GiRaFFE}$. This is a flat-spacetime test with initial data $$A_{\phi} = \frac{\mu \va...
43.807143
334
0.633458
#!/usr/bin/env python # coding: utf-8 # <a id='top'></a> # # # # $\texttt{GiRaFFEfood}$: Initial data for $\texttt{GiRaFFE}$ # # ## Aligned Rotator # # $$\label{top}$$ # # This module provides another initial data option for $\texttt{GiRaFFE}$. This is a flat-spacetime test with initial data $$A_{\phi} = \frac{\mu \va...
3,285
0
23
c1f5aebe5569e8c058f6ab1653350eefa2178d40
6,434
py
Python
nlp/tutorials/word2vec/word2vec.py
bhrgv-bolla/AI
e0a0a5750c5c389bb5f512cec979da10041c8dff
[ "Apache-2.0" ]
null
null
null
nlp/tutorials/word2vec/word2vec.py
bhrgv-bolla/AI
e0a0a5750c5c389bb5f512cec979da10041c8dff
[ "Apache-2.0" ]
null
null
null
nlp/tutorials/word2vec/word2vec.py
bhrgv-bolla/AI
e0a0a5750c5c389bb5f512cec979da10041c8dff
[ "Apache-2.0" ]
null
null
null
""" Implementing word2vec using the skipgram model using a logistic regression as probability function. """ import tensorflow as tf import numpy as np import zipfile import math from . import directory_util, download import os import collections dataset_name = 'text8.zip' def read_data(filename): """ Step 1 Rea...
43.181208
127
0.633976
""" Implementing word2vec using the skipgram model using a logistic regression as probability function. """ import tensorflow as tf import numpy as np import zipfile import math from . import directory_util, download import os import collections dataset_name = 'text8.zip' def read_data(filename): """ Step 1 Rea...
0
0
0
58b12136edc0e2b57e2f2ffb93b8c5cbc6d2086c
585
py
Python
09_Dividir_A_Conta.py
Bruna-Fernandes/Python
2af20ec86f202bebfd4e0647589ec3f8449534a7
[ "MIT" ]
null
null
null
09_Dividir_A_Conta.py
Bruna-Fernandes/Python
2af20ec86f202bebfd4e0647589ec3f8449534a7
[ "MIT" ]
null
null
null
09_Dividir_A_Conta.py
Bruna-Fernandes/Python
2af20ec86f202bebfd4e0647589ec3f8449534a7
[ "MIT" ]
null
null
null
# 09_Três amigos, Carlos, André e Felipe. decidiram rachar igualmente a conta de um bar. # Faça um algoritmo para ler o valor total da conta e imprimir quanto cada um deve # pagar, mas faça com que Carlos e André não paguem centavos. Ex: uma conta de # R$101,53 resulta em R$33,00 para Carlos, R$33,00 para André e R$35,...
45
88
0.697436
# 09_Três amigos, Carlos, André e Felipe. decidiram rachar igualmente a conta de um bar. # Faça um algoritmo para ler o valor total da conta e imprimir quanto cada um deve # pagar, mas faça com que Carlos e André não paguem centavos. Ex: uma conta de # R$101,53 resulta em R$33,00 para Carlos, R$33,00 para André e R$35,...
0
0
0
6881fedc7e7bedf8fde423a271c428047546c2be
1,067
py
Python
data_structure_and_algorithm/queue.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
7
2018-02-24T13:41:21.000Z
2022-02-06T04:59:13.000Z
data_structure_and_algorithm/queue.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
6
2018-02-25T11:50:42.000Z
2021-12-13T19:55:13.000Z
data_structure_and_algorithm/queue.py
KiwiShow/PythonWeb
a489bc2ab16f06f7cc4524bab6b45b2653bfb1bd
[ "MIT" ]
1
2018-03-01T02:43:15.000Z
2018-03-01T02:43:15.000Z
############################################## # head-1-2-3-4(tail) <---enqueue # dequeue---^ ############################################## # 测试函数 if __name__ == '__main__': # 运行测试函数 test() # 1 # 2 # 3 # 4 # None
17.209677
48
0.490159
class Node(): def __init__(self, element=None, next=None): self.element = element self.next = next def __repr__(self): return str(self.element) class Queue(): def __init__(self): self.head = Node() self.tail = self.head def is_empty(self): return self....
626
-15
227
74fcc6382098f1d903f9a27769f4f2262b143190
48
py
Python
icevision/models/ultralytics/__init__.py
ai-fast-track/mantisshrimp
cc6d6a4a048f6ddda2782b6593dcd6b083a673e4
[ "Apache-2.0" ]
580
2020-09-10T06:29:57.000Z
2022-03-29T19:34:54.000Z
icevision/models/ultralytics/__init__.py
ai-fast-track/mantisshrimp
cc6d6a4a048f6ddda2782b6593dcd6b083a673e4
[ "Apache-2.0" ]
691
2020-09-05T03:08:34.000Z
2022-03-31T23:47:06.000Z
icevision/models/ultralytics/__init__.py
lgvaz/mantisshrimp2
743cb7df0dae7eb1331fc2bb66fc9ca09db496cd
[ "Apache-2.0" ]
105
2020-09-09T10:41:35.000Z
2022-03-25T17:16:49.000Z
from icevision.models.ultralytics import yolov5
24
47
0.875
from icevision.models.ultralytics import yolov5
0
0
0
52507f4aa2006d3e6c49c2504f3da3710bd987a9
315
py
Python
app/backend/users/forms.py
bounswe/bounswe2018group3
1214dd1531ddc72cb8c8bd1f21bd065ba0e158b0
[ "MIT" ]
8
2018-02-06T21:04:49.000Z
2019-02-23T21:14:00.000Z
app/backend/users/forms.py
bounswe/bounswe2018group3
1214dd1531ddc72cb8c8bd1f21bd065ba0e158b0
[ "MIT" ]
216
2018-02-10T12:35:01.000Z
2021-01-29T16:52:58.000Z
app/backend/users/forms.py
bounswe/bounswe2018group3
1214dd1531ddc72cb8c8bd1f21bd065ba0e158b0
[ "MIT" ]
3
2018-04-13T19:30:05.000Z
2019-02-23T21:14:34.000Z
from django import forms from .models import CustomUser
22.5
46
0.67619
from django import forms from .models import CustomUser class CustomUserCreationForm(forms.ModelForm): class Meta: model = CustomUser fields = ('username', 'email') class CustomUserChangeForm(forms.ModelForm): class Meta: model = CustomUser fields = ('username', 'email')
0
214
46
3dca2dd05ffdf70e7f723e722e091626f3adeb67
1,215
py
Python
uecp/commands/__init__.py
chrko/uecp
8f82ac3311c82939688b095c5c546e6337f7075a
[ "MIT" ]
3
2021-11-26T10:32:17.000Z
2022-01-12T19:25:40.000Z
uecp/commands/__init__.py
chrko/python-uecp
8f82ac3311c82939688b095c5c546e6337f7075a
[ "MIT" ]
null
null
null
uecp/commands/__init__.py
chrko/python-uecp
8f82ac3311c82939688b095c5c546e6337f7075a
[ "MIT" ]
null
null
null
from uecp.commands.base import UECPCommand from uecp.commands.bidirectional import ( MessageAcknowledgementCommand, RequestCommand, ResponseCode, ) from uecp.commands.clock_control import ( RealTimeClockCorrectionSetCommand, RealTimeClockEnabledSetCommand, RealTimeClockSetCommand, ) from uecp.co...
28.928571
84
0.80823
from uecp.commands.base import UECPCommand from uecp.commands.bidirectional import ( MessageAcknowledgementCommand, RequestCommand, ResponseCode, ) from uecp.commands.clock_control import ( RealTimeClockCorrectionSetCommand, RealTimeClockEnabledSetCommand, RealTimeClockSetCommand, ) from uecp.co...
0
0
0
cf90a240367dd9fba022ba9cb79936025231d22d
4,963
py
Python
site_specific/animecon2016/management/commands/setup_animecon2016.py
japsu/tracontent
169fe84c49c1a30133e927f1be50abba171ebe68
[ "PostgreSQL", "Unlicense", "MIT" ]
null
null
null
site_specific/animecon2016/management/commands/setup_animecon2016.py
japsu/tracontent
169fe84c49c1a30133e927f1be50abba171ebe68
[ "PostgreSQL", "Unlicense", "MIT" ]
7
2020-11-26T18:41:07.000Z
2022-01-18T09:27:00.000Z
site_specific/animecon2016/management/commands/setup_animecon2016.py
tracon/tracontent
65bd8c15b7909a90ebe5ed28cbbf66683a4e3c2c
[ "MIT", "PostgreSQL", "Unlicense" ]
null
null
null
import os from datetime import datetime, timedelta, date from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.files import File from django.core.management import call_command from django.core.management.ba...
33.761905
124
0.545235
import os from datetime import datetime, timedelta, date from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.files import File from django.core.management import call_command from django.core.management.ba...
4,181
111
153
04c0e3b1a68066e78e3f5914a72a288687fde62e
4,255
py
Python
tests/fixtures.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
tests/fixtures.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
tests/fixtures.py
soupault/solt
50b064b398306ff0b21f8c39968e9201b697ddc1
[ "MIT" ]
null
null
null
import numpy as np __all__ = [ "img_2x2", "mask_2x2", "img_3x3_rgb", "img_3x3", "img_3x4", "mask_3x3", "mask_3x4", "img_5x5", "mask_5x5", "img_6x6", "img_6x6_lc", "img_6x6_rgb", "mask_6x6", "img_7x7", "cube_3x3x3", ] def img_2x2(): """ Generates a ...
17.878151
104
0.490482
import numpy as np __all__ = [ "img_2x2", "mask_2x2", "img_3x3_rgb", "img_3x3", "img_3x4", "mask_3x3", "mask_3x4", "img_5x5", "mask_5x5", "img_6x6", "img_6x6_lc", "img_6x6_rgb", "mask_6x6", "img_7x7", "cube_3x3x3", ] def img_2x2(): """ Generates a ...
46
0
23
fbfde656fba4fbe3f8de6a09fc45e35b6e589258
1,524
py
Python
root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py
ChyiYaqing/chyidlTutorial
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
[ "MIT" ]
5
2018-10-17T05:57:39.000Z
2021-07-05T15:38:24.000Z
root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py
ChyiYaqing/chyidlTutorial
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
[ "MIT" ]
2
2021-04-14T00:48:43.000Z
2021-04-14T02:20:50.000Z
root/ilikeit/RabbitMQCrashCourse/tutorials/publishsubscribe/emit_log.py
ChyiYaqing/chyidlTutorial
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
[ "MIT" ]
3
2019-03-02T14:36:19.000Z
2022-03-18T10:12:09.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ emit_log.py published log messages are going to be broadcast to all the receives """ # Pika is a pure-Python implementation of the AMQP 0-9-1 protocol import pika import sys # guest user can only connect via localhost #credentials = pika.PlainCredentials('guest', 'gue...
40.105263
126
0.62664
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ emit_log.py published log messages are going to be broadcast to all the receives """ # Pika is a pure-Python implementation of the AMQP 0-9-1 protocol import pika import sys # guest user can only connect via localhost #credentials = pika.PlainCredentials('guest', 'gue...
0
0
0
a32f0742cb04350a5e987b2f89ac96d7488514a9
686
py
Python
resources/solicit_token.py
jnbellinger/lta
b7cb3c65e0f167e56abb67f8283083aafd700e42
[ "MIT" ]
1
2019-07-30T16:03:26.000Z
2019-07-30T16:03:26.000Z
resources/solicit_token.py
jnbellinger/lta
b7cb3c65e0f167e56abb67f8283083aafd700e42
[ "MIT" ]
80
2019-01-10T21:46:43.000Z
2022-03-24T22:40:54.000Z
resources/solicit_token.py
jnbellinger/lta
b7cb3c65e0f167e56abb67f8283083aafd700e42
[ "MIT" ]
1
2018-12-10T21:13:11.000Z
2018-12-10T21:13:11.000Z
""" Ask the (testing) token service for a token. Run with `python -m lta.solicit_token`. """ import asyncio from rest_tools.client import RestClient # type: ignore from rest_tools.server import from_environment # type: ignore EXPECTED_CONFIG = { 'LTA_AUTH_ROLE': None, 'TOKEN_SERVICE_URL': None, } async d...
26.384615
84
0.708455
""" Ask the (testing) token service for a token. Run with `python -m lta.solicit_token`. """ import asyncio from rest_tools.client import RestClient # type: ignore from rest_tools.server import from_environment # type: ignore EXPECTED_CONFIG = { 'LTA_AUTH_ROLE': None, 'TOKEN_SERVICE_URL': None, } async d...
0
0
0
ce6b8693fb7f178920298e9524c0d231053f67ed
2,322
py
Python
examples/sentence_classifier/config_kim.py
GingerBear/texar
46e006f9349893a3015cd937bee9914c516e26af
[ "Apache-2.0" ]
2,325
2018-08-29T19:34:09.000Z
2022-03-26T18:11:58.000Z
examples/sentence_classifier/config_kim.py
GingerBear/texar
46e006f9349893a3015cd937bee9914c516e26af
[ "Apache-2.0" ]
183
2018-08-30T02:17:45.000Z
2022-02-23T13:53:58.000Z
examples/sentence_classifier/config_kim.py
GingerBear/texar
46e006f9349893a3015cd937bee9914c516e26af
[ "Apache-2.0" ]
421
2018-08-29T20:00:16.000Z
2022-03-08T13:32:03.000Z
# Copyright 2018 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
29.769231
74
0.644703
# Copyright 2018 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
0
0
3ca946b6325d9ecbaa1ac46ed1599756f09a9151
2,457
py
Python
LeetCode/Python3/Math/279. Perfect Squares.py
WatsonWangZh/CodingPractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
11
2019-09-01T22:36:00.000Z
2021-11-08T08:57:20.000Z
LeetCode/Python3/Math/279. Perfect Squares.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
null
null
null
LeetCode/Python3/Math/279. Perfect Squares.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
2
2020-05-27T14:58:52.000Z
2020-05-27T15:04:17.000Z
# Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. # Example 1: # Input: n = 12 # Output: 3 # Explanation: 12 = 4 + 4 + 4. # Example 2: # Input: n = 13 # Output: 2 # Explanation: 13 = 4 + 9. # 二刷 200627 # M1. 蛮力算法 TLE # M2. DP # M3. BFS
25.59375
125
0.448514
# Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. # Example 1: # Input: n = 12 # Output: 3 # Explanation: 12 = 4 + 4 + 4. # Example 2: # Input: n = 13 # Output: 2 # Explanation: 13 = 4 + 9. class Solution(object): def numSquares(self, n...
1,536
508
167
4b642531f4d2a435d10018cb459ade38ae6e1377
2,727
py
Python
eternity_backend_server/blueprints/datamin/detail_function/token_parse.py
Eternity-labs/eternity-backend-server
3159326a0277e37b8fa74e747e8e13934d1bccc2
[ "Apache-2.0" ]
null
null
null
eternity_backend_server/blueprints/datamin/detail_function/token_parse.py
Eternity-labs/eternity-backend-server
3159326a0277e37b8fa74e747e8e13934d1bccc2
[ "Apache-2.0" ]
null
null
null
eternity_backend_server/blueprints/datamin/detail_function/token_parse.py
Eternity-labs/eternity-backend-server
3159326a0277e37b8fa74e747e8e13934d1bccc2
[ "Apache-2.0" ]
null
null
null
from bs4 import BeautifulSoup from lxml import etree import json # xpath需要定期更换,否则数据抓取不全 def overview_info_parse(parse_str:str = ''): """ 传入一个待解析的字符串 """ html_info = etree.HTML(parse_str,parser=None) try: #=======================开始解析字段======================= Price = html_info.xpath...
37.875
147
0.550422
from bs4 import BeautifulSoup from lxml import etree import json # xpath需要定期更换,否则数据抓取不全 def overview_info_parse(parse_str:str = ''): """ 传入一个待解析的字符串 """ html_info = etree.HTML(parse_str,parser=None) try: #=======================开始解析字段======================= Price = html_info.xpath...
0
0
0
043d655f3334a0feef5a5b9e28711c7249e3649c
281
py
Python
iot_api/user_api/schemas/app_keys_schema.py
dolfandringa/rolaguard_backend
d4df7b55fc001aa6e0499edcfa94bf1b1c63b084
[ "Apache-2.0" ]
null
null
null
iot_api/user_api/schemas/app_keys_schema.py
dolfandringa/rolaguard_backend
d4df7b55fc001aa6e0499edcfa94bf1b1c63b084
[ "Apache-2.0" ]
7
2020-05-05T20:10:59.000Z
2021-05-26T17:59:24.000Z
iot_api/user_api/schemas/app_keys_schema.py
dolfandringa/rolaguard_backend
d4df7b55fc001aa6e0499edcfa94bf1b1c63b084
[ "Apache-2.0" ]
1
2021-01-28T05:54:11.000Z
2021-01-28T05:54:11.000Z
from marshmallow import Schema, fields from marshmallow.validate import Length from iot_api.user_api.repository.AppKeysRepository import MAX_PER_ORGANIZATION
46.833333
93
0.83274
from marshmallow import Schema, fields from marshmallow.validate import Length from iot_api.user_api.repository.AppKeysRepository import MAX_PER_ORGANIZATION class AppKeysSchema(Schema): keys = fields.List(fields.Str(), required=True, validate=Length(1, MAX_PER_ORGANIZATION))
0
101
23
156b2a11a4f618e4547a8257ca33ab9c15ae88e3
924
py
Python
kubeyard/commands/build.py
socialwifi/kubeyard
094576e6ad4ff7b9eb419234a3392523cf9e2b18
[ "BSD-3-Clause" ]
16
2018-11-30T09:53:23.000Z
2020-06-07T16:36:10.000Z
kubeyard/commands/build.py
socialwifi/kubeyard
094576e6ad4ff7b9eb419234a3392523cf9e2b18
[ "BSD-3-Clause" ]
34
2018-12-17T15:22:16.000Z
2020-08-14T11:04:24.000Z
kubeyard/commands/build.py
socialwifi/kubeyard
094576e6ad4ff7b9eb419234a3392523cf9e2b18
[ "BSD-3-Clause" ]
4
2018-12-17T09:57:09.000Z
2020-05-14T11:16:34.000Z
import logging import shlex from kubeyard.commands.devel import BaseDevelCommand logger = logging.getLogger(__name__) class BuildCommand(BaseDevelCommand): """ Builds docker image required to run tests and deployment. Can be overridden in <project_dir>/sripts/build. If kubeyard is set up in development ...
35.538462
110
0.70671
import logging import shlex from kubeyard.commands.devel import BaseDevelCommand logger = logging.getLogger(__name__) class BuildCommand(BaseDevelCommand): """ Builds docker image required to run tests and deployment. Can be overridden in <project_dir>/sripts/build. If kubeyard is set up in development ...
419
0
54
eca0a428d1caa2f9f94de70e2ac9e7901807a7f3
8,819
py
Python
misc_scripts/Check_Name_Synonym.py
pombase/legacy-eg-loader
1a324121325ffc3b9a4c15922f7a12756a9c3206
[ "Apache-2.0" ]
null
null
null
misc_scripts/Check_Name_Synonym.py
pombase/legacy-eg-loader
1a324121325ffc3b9a4c15922f7a12756a9c3206
[ "Apache-2.0" ]
null
null
null
misc_scripts/Check_Name_Synonym.py
pombase/legacy-eg-loader
1a324121325ffc3b9a4c15922f7a12756a9c3206
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import MySQLdb as mdb import psycopg2 import psycopg2.extras import psycopg2.extensions from psycopg2 import OperationalError import sys import argparse parser = argparse.ArgumentParser(description='Generate an SQL file to update the ontology terms in the core database based on the matching terms in...
54.438272
591
0.666175
#!/usr/bin/python import MySQLdb as mdb import psycopg2 import psycopg2.extras import psycopg2.extensions from psycopg2 import OperationalError import sys import argparse parser = argparse.ArgumentParser(description='Generate an SQL file to update the ontology terms in the core database based on the matching terms in...
0
0
0
cccb856461f5dee256e2947dd6c864b3a76229c4
8,123
py
Python
rlkit/torch/sets/models.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
rlkit/torch/sets/models.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
null
null
null
rlkit/torch/sets/models.py
jcoreyes/erl
43f4e8407967749f5364106163f3c5335eb7dc83
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
import numpy as np from torch import nn from rlkit.launchers.experiments.disentanglement import ( contextual_encoder_distance_launcher as cedl, ) from rlkit.torch.core import PyTorchModule from rlkit.torch.distributions import MultivariateDiagonalNormal from rlkit.torch.networks import ( BasicCNN, Flatten,...
33.987448
80
0.667857
import numpy as np from torch import nn from rlkit.launchers.experiments.disentanglement import ( contextual_encoder_distance_launcher as cedl, ) from rlkit.torch.core import PyTorchModule from rlkit.torch.distributions import MultivariateDiagonalNormal from rlkit.torch.networks import ( BasicCNN, Flatten,...
7,032
13
260
1962404f10e788ca65e007899f888e6147170f36
4,687
py
Python
src/MPLayout/Figure.py
csiegl182/MPLayout
68d7d30c38796e370e187f1b31ff70cd3e756162
[ "MIT" ]
null
null
null
src/MPLayout/Figure.py
csiegl182/MPLayout
68d7d30c38796e370e187f1b31ff70cd3e756162
[ "MIT" ]
null
null
null
src/MPLayout/Figure.py
csiegl182/MPLayout
68d7d30c38796e370e187f1b31ff70cd3e756162
[ "MIT" ]
null
null
null
import matplotlib import matplotlib.pyplot as mpl from dataclasses import dataclass from typing import Callable, List import os import numpy import pkg_resources ## @dataclass
36.617188
223
0.680393
import matplotlib import matplotlib.pyplot as mpl from dataclasses import dataclass from typing import Callable, List import os import numpy import pkg_resources def get_mplstyle_path(style: str): return pkg_resources.resource_filename('MPLayout', os.path.join('mplstyles', style + '.mplstyle')) def new_figure(sty...
3,824
123
561
7cfed758f72efd2d83f83aa742d1af06f10e7817
7,527
py
Python
senior/TBEFN/predict_TBEFN.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
senior/TBEFN/predict_TBEFN.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
senior/TBEFN/predict_TBEFN.py
LeiGitHub1024/lowlight
86649ae4275b8908d39561792a8068d391318f8d
[ "MIT" ]
null
null
null
""" # -*- coding:utf-8 -*- # @Time : 2019/5/4 20:24 # @Author : KUN LU @ SXU # @Email : lukun199@gmail.com # @Github : lukun199 """ from __future__ import division #import sys import os, time # import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.contrib.slim as slim import...
41.585635
132
0.620433
""" # -*- coding:utf-8 -*- # @Time : 2019/5/4 20:24 # @Author : KUN LU @ SXU # @Email : lukun199@gmail.com # @Github : lukun199 """ from __future__ import division #import sys import os, time # import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.contrib.slim as slim import...
4,768
0
175
e3088fc35f45a82bc2737b6c54697ce8970a2605
6,686
py
Python
projetdrone-MissionControll/flightcommand.py
mariusweiler/raspberry-phantom2
39e9a85e6a9163618e4f49402f89dbdf6111dc9f
[ "MIT" ]
null
null
null
projetdrone-MissionControll/flightcommand.py
mariusweiler/raspberry-phantom2
39e9a85e6a9163618e4f49402f89dbdf6111dc9f
[ "MIT" ]
null
null
null
projetdrone-MissionControll/flightcommand.py
mariusweiler/raspberry-phantom2
39e9a85e6a9163618e4f49402f89dbdf6111dc9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # import des fonctions de temps pour attendre import time ## import de grovepi adresse 4 import grovepi ## import du grovepi adresse 3 import grovepi3 ## import de la division reele qui retourne un chiffre a virgule from operator import truediv ## fonction de stabilisation de la hauteur #...
73.472527
410
0.71373
# -*- coding: utf-8 -*- # import des fonctions de temps pour attendre import time ## import de grovepi adresse 4 import grovepi ## import du grovepi adresse 3 import grovepi3 ## import de la division reele qui retourne un chiffre a virgule from operator import truediv class flightcommand: ## initialisation des vari...
5,331
726
178
071c7bf9ca4121241e39992ae3d768dd0acc9c54
1,461
py
Python
pyvisdk/do/vm_port_group_profile.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/vm_port_group_profile.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/vm_port_group_profile.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmPortGroupProfile(vim, *args, **kwargs): '''The VmPortGroupProfile data object repre...
38.447368
124
0.649555
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmPortGroupProfile(vim, *args, **kwargs): '''The VmPortGroupProfile data object repre...
0
0
0
46773800e04d8319548ed25ab2a1a3e42483700b
5,494
py
Python
src/app.py
rewindio/aws-es-update-notifier
0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572
[ "MIT" ]
null
null
null
src/app.py
rewindio/aws-es-update-notifier
0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572
[ "MIT" ]
null
null
null
src/app.py
rewindio/aws-es-update-notifier
0c4c8a9d2efac58046cfd7ba9e81f7f67d77e572
[ "MIT" ]
null
null
null
import json import boto3 from botocore.exceptions import ClientError import os from slack import WebClient from slack.errors import SlackApiError boto_session = boto3.session.Session() es_client = boto_session.client('es') ssm_client = boto_session.client('ssm') iam_client = boto_session.client('iam')
49.053571
174
0.442847
import json import boto3 from botocore.exceptions import ClientError import os from slack import WebClient from slack.errors import SlackApiError boto_session = boto3.session.Session() es_client = boto_session.client('es') ssm_client = boto_session.client('ssm') iam_client = boto_session.client('iam') def get_aws_acc...
5,121
0
69
bc6db2b6ef5b4593996b30437e553f766a7c65c4
719
py
Python
raiden/network/proxies/utils.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
2,101
2016-06-01T11:31:49.000Z
2022-03-27T20:13:19.000Z
raiden/network/proxies/utils.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
5,291
2016-06-01T18:14:04.000Z
2022-03-31T11:19:09.000Z
raiden/network/proxies/utils.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
484
2016-06-01T18:21:06.000Z
2022-03-22T10:29:45.000Z
from raiden.exceptions import RaidenUnrecoverableError from raiden.utils.formatting import format_block_id from raiden.utils.typing import BlockIdentifier, NoReturn def raise_on_call_returned_empty(given_block_identifier: BlockIdentifier) -> NoReturn: """Format a message and raise RaidenUnrecoverableError.""" ...
42.294118
86
0.752434
from raiden.exceptions import RaidenUnrecoverableError from raiden.utils.formatting import format_block_id from raiden.utils.typing import BlockIdentifier, NoReturn def raise_on_call_returned_empty(given_block_identifier: BlockIdentifier) -> NoReturn: """Format a message and raise RaidenUnrecoverableError.""" ...
0
0
0
4e04886fa95c43d0eb8613ef4407b50921568a29
242
py
Python
Program File/WAP2.py
cyph3r-exe/python-practice-files
d95dd5eb14378c4f08fe4354d66356e3128de54e
[ "Apache-2.0" ]
null
null
null
Program File/WAP2.py
cyph3r-exe/python-practice-files
d95dd5eb14378c4f08fe4354d66356e3128de54e
[ "Apache-2.0" ]
null
null
null
Program File/WAP2.py
cyph3r-exe/python-practice-files
d95dd5eb14378c4f08fe4354d66356e3128de54e
[ "Apache-2.0" ]
null
null
null
#Debangshu Roy #WAP to add input no. in inches and display in cms to program list oldvalue = int(input("Enter your number in inches ")) inches(oldvalue)
24.2
66
0.698347
#Debangshu Roy #WAP to add input no. in inches and display in cms to program list def inches(value): cms = value*2.54 print("The given lenth in cms is ", cms) oldvalue = int(input("Enter your number in inches ")) inches(oldvalue)
63
0
24
e39369d60e9fa840b84e71d4c6b03e9664ebaa3c
95
py
Python
envdsys/envproject/apps.py
NOAA-PMEL/envDataSystem
4db4a3569d2329658799a3eef06ce36dd5c0597d
[ "Unlicense" ]
1
2021-11-06T19:22:53.000Z
2021-11-06T19:22:53.000Z
envdsys/envproject/apps.py
NOAA-PMEL/envDataSystem
4db4a3569d2329658799a3eef06ce36dd5c0597d
[ "Unlicense" ]
25
2019-06-18T20:40:36.000Z
2021-07-23T20:56:48.000Z
envdsys/envproject/apps.py
NOAA-PMEL/envDataSystem
4db4a3569d2329658799a3eef06ce36dd5c0597d
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig
15.833333
34
0.768421
from django.apps import AppConfig class EnvprojectConfig(AppConfig): name = 'envproject'
0
37
23
616db53f745f376766e0e74de7ba9d7078ce39c4
3,090
py
Python
src/sentry/web/frontend/create_project.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
src/sentry/web/frontend/create_project.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
src/sentry/web/frontend/create_project.py
ChadKillingsworth/sentry
ffcb9007a95a83ee267935fe605f8ee8f03a85a5
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from sentry.models import ( OrganizationMember, OrganizationMemberType, Project, Team ) from sentry.web.forms.add_project import AddProjectForm from sentry.web.frontend....
33.586957
95
0.654369
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from sentry.models import ( OrganizationMember, OrganizationMemberType, Project, Team ) from sentry.web.forms.add_project import AddProjectForm from sentry.web.frontend....
2,073
269
126
d41f67967a99e1b1ab5280dcea22b87c5d6fe9df
750
py
Python
generate_files.py
sharkbound/advent_of_code_2016
e655974b2dea422af4ec1debad296ee6c22d690a
[ "MIT" ]
null
null
null
generate_files.py
sharkbound/advent_of_code_2016
e655974b2dea422af4ec1debad296ee6c22d690a
[ "MIT" ]
null
null
null
generate_files.py
sharkbound/advent_of_code_2016
e655974b2dea422af4ec1debad296ee6c22d690a
[ "MIT" ]
null
null
null
from builtins import SystemError from pathlib import Path from sys import argv from typing import Union if len(argv) == 1: day = int(input('day? ')) else: day = int(argv[1]) day_folder = Path(f'day{day}/') make_files(day_folder, 'data.txt', 'part1.py', 'part2.py', 'notes.md')
19.230769
70
0.606667
from builtins import SystemError from pathlib import Path from sys import argv from typing import Union if len(argv) == 1: day = int(input('day? ')) else: day = int(argv[1]) def make_files(day_folder: Path, *files: Union[str, Path]): if not day_folder.exists(): day_folder.mkdir(parents=True) ...
438
0
23
1f8e22688b05f6b5049e8f2cee683f3a0e997a60
2,660
py
Python
redbean/reactive/specs.py
lcgong/redbean
4e3a075567336db3f5469c5bc7dc009b5a24071c
[ "Apache-2.0" ]
4
2017-08-26T10:03:59.000Z
2022-02-17T20:46:02.000Z
redbean/reactive/specs.py
lcgong/redbean
4e3a075567336db3f5469c5bc7dc009b5a24071c
[ "Apache-2.0" ]
1
2018-06-04T10:57:28.000Z
2018-06-04T10:57:28.000Z
redbean/reactive/specs.py
lcgong/redbean
4e3a075567336db3f5469c5bc7dc009b5a24071c
[ "Apache-2.0" ]
null
null
null
import functools from typing import Callable, Awaitable, Any HandlerType = Callable[..., Awaitable[Any]] from .exceptions import UmountAction
28.602151
76
0.658271
import functools from typing import Callable, Awaitable, Any HandlerType = Callable[..., Awaitable[Any]] class ListenerSpec: __slots__ = ("topic_expr", "handler", "group_id") def __init__(self, topic_expr: str, handler: HandlerType): self.topic_expr = topic_expr self.handler = handler ...
1,974
498
91
e0551a7f555c95c837ea468ad85fe0295c3bb83b
16,157
py
Python
smore/models/beta.py
isabella232/smore
02e5a89e84a805eed632eefbdecd957d95e202d4
[ "Apache-2.0" ]
78
2021-10-31T23:20:26.000Z
2022-03-21T01:07:01.000Z
smore/models/beta.py
google-research/smore
e4ba95a7466ef7d018987bce7688b77bf2ea7e4f
[ "Apache-2.0" ]
4
2021-11-02T13:45:38.000Z
2022-02-17T04:18:32.000Z
smore/models/beta.py
pyg-team/smore
02e5a89e84a805eed632eefbdecd957d95e202d4
[ "Apache-2.0" ]
15
2021-11-02T23:55:29.000Z
2022-03-19T10:30:51.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
52.288026
264
0.630129
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
14,092
718
176
efdba53aa00a559d2c77d76f103cae0ad25e70e6
253
py
Python
example/main.py
zx013/pyvoxel
4d886b25a3430dbd54863bf433c2eebbd030d0f4
[ "MIT" ]
null
null
null
example/main.py
zx013/pyvoxel
4d886b25a3430dbd54863bf433c2eebbd030d0f4
[ "MIT" ]
null
null
null
example/main.py
zx013/pyvoxel
4d886b25a3430dbd54863bf433c2eebbd030d0f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from pyvoxel.log import Log from pyvoxel.manager import Manager if __name__ == '__main__': log_test() Log.error('Error') p = Manager.auto_load() print(p)
21.083333
36
0.592885
# -*- coding: utf-8 -*- from pyvoxel.log import Log from pyvoxel.manager import Manager if __name__ == '__main__': def log_test(): Log.debug('Debug') log_test() Log.error('Error') p = Manager.auto_load() print(p)
22
0
27
dbb3d433f54cbaa0deb5b7a60a9e0cac74b3920d
15,619
py
Python
python/redmonster/physics/pixelsplines.py
tskisner/redmonster
57f31d66259ec92c0fb5c60c202c419028c1b9cf
[ "CNRI-Python" ]
null
null
null
python/redmonster/physics/pixelsplines.py
tskisner/redmonster
57f31d66259ec92c0fb5c60c202c419028c1b9cf
[ "CNRI-Python" ]
2
2016-06-16T08:33:39.000Z
2016-06-16T13:23:59.000Z
python/redmonster/physics/pixelsplines.py
julienguy/redlantern
ba92b0951d8af56693b210b1f51254a6a11dc17a
[ "CNRI-Python" ]
null
null
null
# pixelsplines.py # Pixel-integrated sline utilities. # Written by A. Bolton, U. of Utah, 2010-2013. import numpy as n from scipy import linalg as la from scipy import sparse as sp from scipy import special as sf def compute_duck_slopes(pixbound, flux): """ Compute the slope of the illuminating quadratic ...
45.40407
80
0.584673
# pixelsplines.py # Pixel-integrated sline utilities. # Written by A. Bolton, U. of Utah, 2010-2013. import numpy as n from scipy import linalg as la from scipy import sparse as sp from scipy import special as sf def compute_duck_slopes(pixbound, flux): """ Compute the slope of the illuminating quadratic ...
4,461
11
205
bba7d66222da2af05f6a32b36d7582a900766e87
3,633
py
Python
src/File.py
ytyaru/Python.File.Dir.Stat.20180402093000
f66e5eff603c62e24dd25f4aea034ce288059c66
[ "CC0-1.0" ]
null
null
null
src/File.py
ytyaru/Python.File.Dir.Stat.20180402093000
f66e5eff603c62e24dd25f4aea034ce288059c66
[ "CC0-1.0" ]
null
null
null
src/File.py
ytyaru/Python.File.Dir.Stat.20180402093000
f66e5eff603c62e24dd25f4aea034ce288059c66
[ "CC0-1.0" ]
null
null
null
import os, os.path, pathlib, shutil from Stat import Stat
43.771084
194
0.629232
import os, os.path, pathlib, shutil from Stat import Stat class File(Stat): def __init__(self, path): if not os.path.isabs(path): raise ValueError('引数pathは絶対パスにしてください。path=\'{}\''.format(path)) super().__init__(path) def mk(self, path=None): if path is not None and os.path.isabs(path) ...
3,266
596
23
852dce101de13404757f08f03cc79527ac4ad765
998
py
Python
Contributions/nQueen.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
215
2021-10-01T08:18:16.000Z
2022-03-29T04:12:03.000Z
Contributions/nQueen.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
51
2021-10-01T08:16:42.000Z
2021-10-31T13:51:51.000Z
Contributions/nQueen.py
sattwik21/Hacktoberfest2021-1
74c8edd54f9c967c0f301f74dec31526dffa8222
[ "MIT" ]
807
2021-10-01T08:11:45.000Z
2021-11-21T18:57:09.000Z
n = int(input()) solution = [[0 for i in range(n)] for j in range(n)] for j in range(n) : nQueen(0, j, n, solution)
22.681818
52
0.465932
def isPoss(i, j, matrix) : for k in range(i) : if matrix[k][j] == 1 : return False for l in range(j) : if matrix[i][l] == 1 : return False k, l = i-1, j-1 while k>=0 and l>=0 : if matrix[k][l] == 1 : return False k, l = k-1, l-1 k, l = i-1, j+1 ...
827
0
50
803757d86c30f1ad8f20150e31c6efb96c90b346
1,936
py
Python
ee/tasks/webhooks_ee.py
adamb70/posthog
54ae8f0e70092f86b4aefbd93b56680dbd28b1c5
[ "MIT" ]
null
null
null
ee/tasks/webhooks_ee.py
adamb70/posthog
54ae8f0e70092f86b4aefbd93b56680dbd28b1c5
[ "MIT" ]
null
null
null
ee/tasks/webhooks_ee.py
adamb70/posthog
54ae8f0e70092f86b4aefbd93b56680dbd28b1c5
[ "MIT" ]
null
null
null
import re from typing import Any, Dict import requests from celery import Task from django.conf import settings from posthog.celery import app from posthog.models import Action, Event, Team from posthog.tasks.webhooks import determine_webhook_type, get_formatted_message @app.task(ignore_result=True, bind=True, max_...
37.230769
116
0.573347
import re from typing import Any, Dict import requests from celery import Task from django.conf import settings from posthog.celery import app from posthog.models import Action, Event, Team from posthog.tasks.webhooks import determine_webhook_type, get_formatted_message @app.task(ignore_result=True, bind=True, max_...
1,583
0
22
b95b936937e1f3a8196fa97a04c875ad44bcfa2f
12,306
py
Python
gevent/pool.py
bkad/gevent
185b71cc472db413515059ab4a197207cdaf1f6c
[ "MIT" ]
2
2015-12-19T01:34:43.000Z
2018-02-02T12:32:01.000Z
gevent/pool.py
alex/gevent
454a77ca561868854760b2d9cbfa3bf3bbd2e062
[ "MIT" ]
null
null
null
gevent/pool.py
alex/gevent
454a77ca561868854760b2d9cbfa3bf3bbd2e062
[ "MIT" ]
2
2019-11-24T12:11:50.000Z
2020-12-26T19:00:20.000Z
# Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
30.688279
124
0.573704
# Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
7,755
712
763
45cb9ce86ce46ee40a4f96a29f1f0759cef62cd4
2,834
py
Python
app/settings.py
shenhaizhumin/fastapi-demo
bce6ec556b1058f3b213e2698075d72033c2162d
[ "Apache-2.0" ]
null
null
null
app/settings.py
shenhaizhumin/fastapi-demo
bce6ec556b1058f3b213e2698075d72033c2162d
[ "Apache-2.0" ]
null
null
null
app/settings.py
shenhaizhumin/fastapi-demo
bce6ec556b1058f3b213e2698075d72033c2162d
[ "Apache-2.0" ]
null
null
null
import os import configparser import redis from passlib.context import CryptContext from app.util.log_util2 import get_path, get_logger from pydantic import BaseSettings, Field # from fastapi.logger import logger # from logging.handlers import RotatingFileHandler import logging formatter = logging.Formatter( "(%(...
32.574713
117
0.695483
import os import configparser import redis from passlib.context import CryptContext from app.util.log_util2 import get_path, get_logger from pydantic import BaseSettings, Field # from fastapi.logger import logger # from logging.handlers import RotatingFileHandler import logging formatter = logging.Formatter( "(%(...
0
1,389
23
7fd28b1257d684a486e683748c33d57b2368aca7
23,962
py
Python
geco/attrgenfunct.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
geco/attrgenfunct.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
geco/attrgenfunct.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
# Functions that can generate attribute values. # # These are functions that can be used in the GenerateFuncAttribute() class # (see module generator.py). They generate values according to some internal # functionality. # # The requirement of any such functions are: # 1) that it must return a string # 2) it can...
32.034759
91
0.562057
# Functions that can generate attribute values. # # These are functions that can be used in the GenerateFuncAttribute() class # (see module generator.py). They generate values according to some internal # functionality. # # The requirement of any such functions are: # 1) that it must return a string # 2) it can...
284
0
100
548255d2dbe0cab9d4fa99c132b58e09a06d7d2c
6,166
py
Python
mkdocs_terraform_monorepo_plugin/parser.py
wtc-cloud-eng/mkdocs-terraform-monorepo-plugin
a6bb70638219ae358e66923640d958608196b082
[ "Apache-2.0" ]
3
2021-03-11T13:53:42.000Z
2021-03-12T12:06:00.000Z
mkdocs_terraform_monorepo_plugin/parser.py
wtc-cloud-eng/mkdocs-terraform-monorepo-plugin
a6bb70638219ae358e66923640d958608196b082
[ "Apache-2.0" ]
53
2021-03-26T18:05:22.000Z
2022-03-28T13:12:33.000Z
mkdocs_terraform_monorepo_plugin/parser.py
wtc-cloud-eng/mkdocs-terraform-monorepo-plugin
a6bb70638219ae358e66923640d958608196b082
[ "Apache-2.0" ]
null
null
null
import logging import os import copy from pathlib import Path from mkdocs.utils import warning_filter log = logging.getLogger(__name__) log.addFilter(warning_filter) INCLUDE_STATEMENT = "!tf_modules_root " # TODO should make these config variables in mkdocs.yml DOCUMENT_FILE_NAME = 'README.md' NAVIGATION_KEY_NAME = ...
39.273885
104
0.554817
import logging import os import copy from pathlib import Path from mkdocs.utils import warning_filter log = logging.getLogger(__name__) log.addFilter(warning_filter) INCLUDE_STATEMENT = "!tf_modules_root " # TODO should make these config variables in mkdocs.yml DOCUMENT_FILE_NAME = 'README.md' NAVIGATION_KEY_NAME = ...
5,526
-4
314
c1d329add48daaf9b6c1f2cfa1999f82cfa7b64c
202
py
Python
samples/docs/simple.py
sidneyarcidiacono/coworks
7f51b83e8699ced991d16a5a43ad19e569b6e814
[ "MIT" ]
null
null
null
samples/docs/simple.py
sidneyarcidiacono/coworks
7f51b83e8699ced991d16a5a43ad19e569b6e814
[ "MIT" ]
null
null
null
samples/docs/simple.py
sidneyarcidiacono/coworks
7f51b83e8699ced991d16a5a43ad19e569b6e814
[ "MIT" ]
null
null
null
from coworks import TechMicroService from coworks import entry app = SimpleMicroService()
14.428571
43
0.727723
from coworks import TechMicroService from coworks import entry class SimpleMicroService(TechMicroService): @entry def get(self): return "Hello world.\n" app = SimpleMicroService()
25
60
23
98dcad3246ee4b1c4180827431f1ba0900947c7c
4,013
py
Python
whois/whois.py
jacobdshimer/Python-Misc-Scripts
d3a33d78542ef0492939334d176f231fb363f894
[ "MIT" ]
null
null
null
whois/whois.py
jacobdshimer/Python-Misc-Scripts
d3a33d78542ef0492939334d176f231fb363f894
[ "MIT" ]
null
null
null
whois/whois.py
jacobdshimer/Python-Misc-Scripts
d3a33d78542ef0492939334d176f231fb363f894
[ "MIT" ]
null
null
null
import urllib3 import csv import os import json import arin urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # TODO: Add in reverse lookup csvfile = open('countries_by_rir.csv', 'r') readcsv = csv.reader(csvfile, delimiter=',') rir = {'AFRINIC': [], 'APNIC': [], 'ARIN': [], ...
37.858491
146
0.427859
import urllib3 import csv import os import json import arin urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # TODO: Add in reverse lookup csvfile = open('countries_by_rir.csv', 'r') readcsv = csv.reader(csvfile, delimiter=',') rir = {'AFRINIC': [], 'APNIC': [], 'ARIN': [], ...
3,459
0
46
680252ce879d90c59db8b12d25a4d27573909ee8
535
py
Python
publish.py
jpbarto/redis_benchmark
0a926f45d9955aa4d03795b9e363bf1a85011c91
[ "Apache-2.0" ]
null
null
null
publish.py
jpbarto/redis_benchmark
0a926f45d9955aa4d03795b9e363bf1a85011c91
[ "Apache-2.0" ]
null
null
null
publish.py
jpbarto/redis_benchmark
0a926f45d9955aa4d03795b9e363bf1a85011c91
[ "Apache-2.0" ]
null
null
null
import redis import json import uuid import time HOST = 'localhost' PORT = 6379 MSG_COUNT = 250000 r = redis.Redis (host = HOST, port = PORT) pub = r.pubsub () sender_id = uuid.uuid4 () start_time = time.time () for i in range (MSG_COUNT): data = {"sender_id": str(sender_id), "message_id": i, "body": "I am mess...
25.47619
118
0.676636
import redis import json import uuid import time HOST = 'localhost' PORT = 6379 MSG_COUNT = 250000 r = redis.Redis (host = HOST, port = PORT) pub = r.pubsub () sender_id = uuid.uuid4 () start_time = time.time () for i in range (MSG_COUNT): data = {"sender_id": str(sender_id), "message_id": i, "body": "I am mess...
0
0
0
7695cce9e1bb37ade56725cc1738bb7551d90a27
1,981
py
Python
backend/flask_app/api/wallet.py
zIPjahoda/Flask-Angular
a31bfdd27aa30fffd6cacd6f27305f523879e710
[ "MIT" ]
null
null
null
backend/flask_app/api/wallet.py
zIPjahoda/Flask-Angular
a31bfdd27aa30fffd6cacd6f27305f523879e710
[ "MIT" ]
null
null
null
backend/flask_app/api/wallet.py
zIPjahoda/Flask-Angular
a31bfdd27aa30fffd6cacd6f27305f523879e710
[ "MIT" ]
null
null
null
from flask import Blueprint import json import logging import traceback from datetime import datetime from flask import Response, request, jsonify, current_app from gevent.wsgi import WSGIServer from flask_jwt_simple import ( JWTManager, jwt_required, create_jwt, get_jwt_identity, get_jwt ) from backend.flask_app...
31.951613
108
0.720343
from flask import Blueprint import json import logging import traceback from datetime import datetime from flask import Response, request, jsonify, current_app from gevent.wsgi import WSGIServer from flask_jwt_simple import ( JWTManager, jwt_required, create_jwt, get_jwt_identity, get_jwt ) from backend.flask_app...
1,253
0
22
cbbdaa273a9753aa6dd34408775ff7f313bfeb7e
790
py
Python
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-2/PSET-1/countingBobs.py
lilsweetcaligula/MIT6.00.1x
ee2902782a08ff685e388b2f40c09ea8c9c5fcfe
[ "MIT" ]
null
null
null
""" PSET-1 Counting Bobs Assume s is a string of lower case characters. Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'azcbobobegghakl', then your program should print: Number of times bob occurs is: 2 """ py_main()
21.351351
65
0.588608
""" PSET-1 Counting Bobs Assume s is a string of lower case characters. Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'azcbobobegghakl', then your program should print: Number of times bob occurs is: 2 """ def countPal(target, pal): midPoint = int(len...
455
0
54