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
4d6035a4fc60599c146da678702a9ea1e5501f20
417
py
Python
src/python/pants/backend/python/lint/black/register.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
1
2021-05-05T18:58:28.000Z
2021-05-05T18:58:28.000Z
src/python/pants/backend/python/lint/black/register.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/python/lint/black/register.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
3
2020-06-30T08:28:13.000Z
2021-07-28T09:35:57.000Z
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.python.lint import python_format_target, python_lint_target from pants.backend.python.lint.black import rules as black_rules
27.8
78
0.731415
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.python.lint import python_format_target, python_lint_target from pants.backend.python.lint.black import rules as black_rules def rules(): return ( *black_...
116
0
23
ecc5045a1aea6b00cccf6b261440eedff9b159c0
2,921
py
Python
Thomson_spectrometer_charge_to_mass_number_def.py
Similarities/Thomson-Parabola-analytical-plot
bd2761960ace28068efcd7eafbb4520c44b43994
[ "MIT" ]
null
null
null
Thomson_spectrometer_charge_to_mass_number_def.py
Similarities/Thomson-Parabola-analytical-plot
bd2761960ace28068efcd7eafbb4520c44b43994
[ "MIT" ]
null
null
null
Thomson_spectrometer_charge_to_mass_number_def.py
Similarities/Thomson-Parabola-analytical-plot
bd2761960ace28068efcd7eafbb4520c44b43994
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Aug 01 11:56:10 2015 @author: Zombie.Soc//similarities """ import matplotlib.pyplot as plt import matplotlib.image as mpimg print ("Reconstruction of Thomson spectrometer parabolas - to check parameters") #Parameters # !!! 0 point coordinates in ...
19.473333
81
0.5481
# -*- coding: utf-8 -*- """ Created on Sat Aug 01 11:56:10 2015 @author: Zombie.Soc//similarities """ import matplotlib.pyplot as plt import matplotlib.image as mpimg print ("Reconstruction of Thomson spectrometer parabolas - to check parameters") #Parameters # !!! 0 point coordinates in ...
349
0
58
c013bc222bc2bb135874674a676063550952f9bd
3,470
py
Python
tests/browser.py
nickmeet/kanvas
0fed091aa1b4011fc688ecc074e8525dd550b31d
[ "Apache-2.0" ]
null
null
null
tests/browser.py
nickmeet/kanvas
0fed091aa1b4011fc688ecc074e8525dd550b31d
[ "Apache-2.0" ]
5
2020-02-12T00:00:34.000Z
2021-06-10T19:37:45.000Z
tests/browser.py
nicosmaris/kanvas
0fed091aa1b4011fc688ecc074e8525dd550b31d
[ "Apache-2.0" ]
null
null
null
from selenium import webdriver import sys from os.path import join, abspath, dirname import logging from selenium.webdriver.remote.remote_connection import LOGGER as ghostdriver_logger from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from locators import homePage from selenium.webdriver.su...
41.807229
138
0.65562
from selenium import webdriver import sys from os.path import join, abspath, dirname import logging from selenium.webdriver.remote.remote_connection import LOGGER as ghostdriver_logger from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from locators import homePage from selenium.webdriver.su...
1,869
1,006
23
5c2419e80cf571fe31532b5945a81bf47c134391
8,043
py
Python
research/object_detection_app/mlb_detection/prepare_numpy.py
szhaofelicia/models-1.13.0-app
6213767f02ecf309d2af91989b4c081bf85f3bf9
[ "Apache-2.0" ]
null
null
null
research/object_detection_app/mlb_detection/prepare_numpy.py
szhaofelicia/models-1.13.0-app
6213767f02ecf309d2af91989b4c081bf85f3bf9
[ "Apache-2.0" ]
null
null
null
research/object_detection_app/mlb_detection/prepare_numpy.py
szhaofelicia/models-1.13.0-app
6213767f02ecf309d2af91989b4c081bf85f3bf9
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import io import json import math import os import numpy as np from PIL import Image from PIL import ImageFile import tensorflow.compat.v2 as tf from absl import logging from absl import app from absl import...
34.519313
113
0.659704
from __future__ import absolute_import from __future__ import division from __future__ import print_function import io import json import math import os import numpy as np from PIL import Image from PIL import ImageFile import tensorflow.compat.v2 as tf from absl import logging from absl import app from absl import...
309
0
23
dbed26663e7828bd1d7de6032d7366ca4fa81a22
3,386
py
Python
crypto/crypto_test_old.py
JohnOmernik/raspfarm
b187a81adea95dd39fe804a238105191f784c9be
[ "Apache-2.0" ]
null
null
null
crypto/crypto_test_old.py
JohnOmernik/raspfarm
b187a81adea95dd39fe804a238105191f784c9be
[ "Apache-2.0" ]
null
null
null
crypto/crypto_test_old.py
JohnOmernik/raspfarm
b187a81adea95dd39fe804a238105191f784c9be
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding import sys impor...
35.642105
181
0.700827
#!/usr/bin/python3 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding import sys impor...
2,717
0
68
9149780a2fe4d9f493fbf30d587e4c87a5240349
1,645
py
Python
backend/vehicules/migrations/0001_initial.py
RodrigoBLima/parking-project
4444033980aec03f0cd7ba1947b24d487bff9131
[ "MIT" ]
null
null
null
backend/vehicules/migrations/0001_initial.py
RodrigoBLima/parking-project
4444033980aec03f0cd7ba1947b24d487bff9131
[ "MIT" ]
3
2021-09-12T01:03:31.000Z
2022-02-27T06:47:30.000Z
backend/vehicules/migrations/0001_initial.py
RodrigoBLima/parking-project
4444033980aec03f0cd7ba1947b24d487bff9131
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-15 22:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
47
198
0.647416
# Generated by Django 3.0.7 on 2020-06-15 22:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('employees', '0001_initial'), migrations.swappable_dependency(se...
0
1,465
23
7cbca312c6107409ee289dcff735a96fab311dd3
733
py
Python
projects/speech_translation/lr_scheduler/subepoch_lr_scheduler.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
projects/speech_translation/lr_scheduler/subepoch_lr_scheduler.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
projects/speech_translation/lr_scheduler/subepoch_lr_scheduler.py
tran-khoa/fairseq
558366b3c6970a5dd85ad1909581d43e41fdce9f
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from dataclasses import dataclass, field from fairseq.dataclass import ChoiceEnum, FairseqDataclass STEP_MODE_CHOICE = ChoiceEnum(['epoch', 'subepoch']) @dataclass
26.178571
84
0.697135
from abc import ABC, abstractmethod from dataclasses import dataclass, field from fairseq.dataclass import ChoiceEnum, FairseqDataclass STEP_MODE_CHOICE = ChoiceEnum(['epoch', 'subepoch']) @dataclass class SubepochLRSchedulerConfig(FairseqDataclass): step_mode: STEP_MODE_CHOICE = field( default="subepoc...
180
303
45
853dc461e03b4829448d8970e799270c6aec43d6
179
py
Python
Exercicios/ex006.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
Exercicios/ex006.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
Exercicios/ex006.py
Vitmambro/Python9
d084e6fd8230b71e4dade87086a411210e131320
[ "MIT" ]
null
null
null
n = int(input('Digite um numero: ')) a = n * 2 b = n * 3 c = n ** (1/2) print('O dobro do numero seria {} \n O triplo seria {} \n A raiz quadrada seria {:.2f}'.format(a, b, c))
22.375
104
0.558659
n = int(input('Digite um numero: ')) a = n * 2 b = n * 3 c = n ** (1/2) print('O dobro do numero seria {} \n O triplo seria {} \n A raiz quadrada seria {:.2f}'.format(a, b, c))
0
0
0
1bed624c8eee0da3cdb05b47bd146d6d0a02a7d0
342
py
Python
Feature/corner_fast.py
Joevaen/Scikit-image_On_CT
e3bf0eeadc50691041b4b7c44a19d07546a85001
[ "Apache-2.0" ]
null
null
null
Feature/corner_fast.py
Joevaen/Scikit-image_On_CT
e3bf0eeadc50691041b4b7c44a19d07546a85001
[ "Apache-2.0" ]
null
null
null
Feature/corner_fast.py
Joevaen/Scikit-image_On_CT
e3bf0eeadc50691041b4b7c44a19d07546a85001
[ "Apache-2.0" ]
null
null
null
# FAST拐点检测,拐点检测Opencv有七种,且比skimage的方法快的多 from skimage import data, feature, img_as_float, io import numpy as np image = img_as_float(io.imread('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/10.jpg')) gamma_corrected = feature.corner_fast(image) points = feature.corner_peaks(gamma_corrected) print(points) io.ims...
31.090909
95
0.812865
# FAST拐点检测,拐点检测Opencv有七种,且比skimage的方法快的多 from skimage import data, feature, img_as_float, io import numpy as np image = img_as_float(io.imread('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/10.jpg')) gamma_corrected = feature.corner_fast(image) points = feature.corner_peaks(gamma_corrected) print(points) io.ims...
0
0
0
4f5c7ba674e75571c35d8a525e280d946419130f
2,090
py
Python
hpimdm/packet/ReceivedPacket.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
1
2020-02-04T20:59:03.000Z
2020-02-04T20:59:03.000Z
hpimdm/packet/ReceivedPacket.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
3
2020-06-09T16:37:01.000Z
2021-08-30T00:31:12.000Z
hpimdm/packet/ReceivedPacket.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
1
2020-11-23T06:47:46.000Z
2020-11-23T06:47:46.000Z
import socket from .Packet import Packet from .PacketIpHeader import PacketIpv4Header, PacketIpv6Header from hpimdm.tree.hpim_globals import MSG_FORMAT from hpimdm.utils import TYPE_CHECKING if TYPE_CHECKING: from hpimdm.Interface import Interface if MSG_FORMAT == "BINARY": from .PacketHPIMHeader import Packe...
40.192308
117
0.742105
import socket from .Packet import Packet from .PacketIpHeader import PacketIpv4Header, PacketIpv6Header from hpimdm.tree.hpim_globals import MSG_FORMAT from hpimdm.utils import TYPE_CHECKING if TYPE_CHECKING: from hpimdm.Interface import Interface if MSG_FORMAT == "BINARY": from .PacketHPIMHeader import Packe...
1,229
301
46
aa36ea2d7b5f61fd6a7f233730049f57e2580dd0
2,349
py
Python
sensor/scripts/top_phat_button.py
steviebd/bme680-container
9d3fb10e39d70f1e287ba3003f5567295b3da946
[ "MIT" ]
null
null
null
sensor/scripts/top_phat_button.py
steviebd/bme680-container
9d3fb10e39d70f1e287ba3003f5567295b3da946
[ "MIT" ]
null
null
null
sensor/scripts/top_phat_button.py
steviebd/bme680-container
9d3fb10e39d70f1e287ba3003f5567295b3da946
[ "MIT" ]
null
null
null
import time import RPi.GPIO as GPIO #Python Package Reference: https://pypi.org/project/RPi.GPIO/ # Code taken from https://learn.sparkfun.com/tutorials/raspberry-pi-safe-reboot-and-shutdown-button using the last example to minimize resources used (sleep function) # Pin definition reset_shutdown_pin = 17 # Suppress ...
32.625
166
0.696041
import time import RPi.GPIO as GPIO #Python Package Reference: https://pypi.org/project/RPi.GPIO/ # Code taken from https://learn.sparkfun.com/tutorials/raspberry-pi-safe-reboot-and-shutdown-button using the last example to minimize resources used (sleep function) # Pin definition reset_shutdown_pin = 17 # Suppress ...
446
0
44
a021d9318c9c0717bf8b97d0ce6bd22979592ede
755
py
Python
src/adafruit-circuitpython-bundle-4.x-mpy-20190713/examples/thermistor_simpletest.py
mbaaba/solar_panel
42059d8c61320494ad1298065dbc50cd9b3bd51e
[ "MIT" ]
1
2020-04-13T16:10:53.000Z
2020-04-13T16:10:53.000Z
infra/libs-400rc2-20190512/examples/thermistor_simpletest.py
jadudm/feather-isa
b7419e6698c3f64be4d8122656eb8124631ca859
[ "MIT" ]
null
null
null
infra/libs-400rc2-20190512/examples/thermistor_simpletest.py
jadudm/feather-isa
b7419e6698c3f64be4d8122656eb8124631ca859
[ "MIT" ]
null
null
null
import time import board import adafruit_thermistor # these values work with the Adafruit CircuitPlayground Express. # they may work with other thermistors as well, as they're fairly standard, # though the pin will likely need to change (ie board.A1) # pylint: disable=no-member pin = board.TEMPERATURE resisto...
32.826087
100
0.73245
import time import board import adafruit_thermistor # these values work with the Adafruit CircuitPlayground Express. # they may work with other thermistors as well, as they're fairly standard, # though the pin will likely need to change (ie board.A1) # pylint: disable=no-member pin = board.TEMPERATURE resisto...
0
0
0
9e68d50f8a29ef3849f51edcab4ecba6940dc350
187
py
Python
setup.py
NikNakk/jellylanguage
40cc217ec50272370867fc5ea4fbd5c6126f1c11
[ "MIT" ]
392
2018-04-10T14:12:02.000Z
2022-03-27T11:44:16.000Z
setup.py
NikNakk/jellylanguage
40cc217ec50272370867fc5ea4fbd5c6126f1c11
[ "MIT" ]
33
2015-12-05T22:55:40.000Z
2018-01-13T18:04:23.000Z
setup.py
NikNakk/jellylanguage
40cc217ec50272370867fc5ea4fbd5c6126f1c11
[ "MIT" ]
58
2015-12-12T16:57:14.000Z
2018-02-27T00:10:15.000Z
from distutils.core import setup setup( name = 'jellylanguage', version = '0.1.31', packages = [ 'jelly' ], scripts = [ 'scripts/jelly' ], install_requires = [ 'sympy' ] )
11.6875
32
0.609626
from distutils.core import setup setup( name = 'jellylanguage', version = '0.1.31', packages = [ 'jelly' ], scripts = [ 'scripts/jelly' ], install_requires = [ 'sympy' ] )
0
0
0
e690d7a20c2b4f9af76c7b48a269e64c901a832f
283
py
Python
setup.py
duranbe/lev
36a9199469480bbd343e1a95c1628ea7aed1a7c4
[ "MIT" ]
2
2021-07-03T21:52:53.000Z
2021-07-05T15:57:06.000Z
setup.py
duranbe/lev
36a9199469480bbd343e1a95c1628ea7aed1a7c4
[ "MIT" ]
null
null
null
setup.py
duranbe/lev
36a9199469480bbd343e1a95c1628ea7aed1a7c4
[ "MIT" ]
null
null
null
from distutils.core import setup, Extension if __name__ == "__main__": main()
25.727273
77
0.724382
from distutils.core import setup, Extension def main(): setup(name="levenshtein", version="0.0.1", description="Levenshtein Distance implemented as C Extension for Python 3", ext_modules=[Extension("levenshtein",["src/levenshtein.c"])] ) if __name__ == "__main__": main()
181
0
23
dda5c39d720198b73ef58145deafa5e98f64b03d
6,587
py
Python
src/bxgateway/services/block_queuing_service_manager.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
21
2019-11-06T17:37:41.000Z
2022-03-28T07:18:33.000Z
src/bxgateway/services/block_queuing_service_manager.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
4
2019-11-06T22:08:00.000Z
2021-12-08T06:20:51.000Z
src/bxgateway/services/block_queuing_service_manager.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
10
2020-08-05T15:58:16.000Z
2022-02-07T23:51:10.000Z
from typing import Optional, Dict, List, Tuple from bxcommon.messages.abstract_block_message import AbstractBlockMessage from bxcommon.network.ip_endpoint import IpEndpoint from bxcommon.utils.expiring_dict import ExpiringDict from bxcommon.utils.object_hash import Sha256Hash from bxgateway import log_messages from bx...
46.062937
120
0.730682
from typing import Optional, Dict, List, Tuple from bxcommon.messages.abstract_block_message import AbstractBlockMessage from bxcommon.network.ip_endpoint import IpEndpoint from bxcommon.utils.expiring_dict import ExpiringDict from bxcommon.utils.object_hash import Sha256Hash from bxgateway import log_messages from bx...
4,712
1,272
23
e24db7c66349793decd4936a1352fb128cb6de8b
979
py
Python
batji/audio_lib.py
hiankun/py_sandbox
6623edd0c8ab17641e1ce09fba7da34c4865fc4f
[ "MIT" ]
null
null
null
batji/audio_lib.py
hiankun/py_sandbox
6623edd0c8ab17641e1ce09fba7da34c4865fc4f
[ "MIT" ]
null
null
null
batji/audio_lib.py
hiankun/py_sandbox
6623edd0c8ab17641e1ce09fba7da34c4865fc4f
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*- mode: python; coding: utf-8 -*- #import simpleaudio as sa # This need wav files # avconv -i audio/d/dog.mp3 -acodec pcm_u8 -ar 8000 audio/d/dog.wav import time import os from gtts import gTTS import pyglet from subprocess import call
25.102564
73
0.645557
#!/usr/bin/python #-*- mode: python; coding: utf-8 -*- #import simpleaudio as sa # This need wav files # avconv -i audio/d/dog.mp3 -acodec pcm_u8 -ar 8000 audio/d/dog.wav import time import os from gtts import gTTS import pyglet from subprocess import call def get_tts_mp3(lang, text, audio_path): tts = gTTS(text...
649
0
69
a93d838965225c6c8b6bc1e243dc5e816230b034
794
py
Python
python/unit_test/get_data_test.py
aaronlam88/cmpe295
dfe9fee8b11f0d2104d8879f578c4a6864314b76
[ "MIT" ]
5
2018-03-12T07:15:42.000Z
2019-04-21T05:46:28.000Z
python/unit_test/get_data_test.py
aaronlam88/cmpe295
dfe9fee8b11f0d2104d8879f578c4a6864314b76
[ "MIT" ]
52
2018-03-25T23:21:10.000Z
2020-11-18T21:22:38.000Z
python/unit_test/get_data_test.py
aaronlam88/cmpe295
dfe9fee8b11f0d2104d8879f578c4a6864314b76
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, '../models') from get_data import GetData # from python.ultilities.get_data import GetData import unittest import csv if __name__ == '__main__': unittest.main()
29.407407
58
0.68262
import sys sys.path.insert(0, '../models') from get_data import GetData # from python.ultilities.get_data import GetData import unittest import csv class TestGetData(unittest.TestCase): def test_getAllFeatures1(self): getData = GetData() features = getData.getAllFeatures() self.assertIsNotN...
476
16
107
9cd9724c4f49dfcb109cc05f72977a2e1334cfa9
899
py
Python
dbaas/physical/tests/test_engine_type.py
didindinn/database-as-a-service
747de31ff8546f7874ddd654af860e130afd17a0
[ "BSD-3-Clause" ]
303
2015-01-08T10:35:54.000Z
2022-02-28T08:54:06.000Z
dbaas/physical/tests/test_engine_type.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
124
2015-01-14T12:56:15.000Z
2022-03-22T20:45:11.000Z
dbaas/physical/tests/test_engine_type.py
nouraellm/database-as-a-service
5e655c9347bea991b7218a01549f5e44f161d7be
[ "BSD-3-Clause" ]
110
2015-01-02T11:59:48.000Z
2022-02-28T08:54:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.contrib import admin from physical.admin.engine_type import EngineTypeAdmin from physical.models import EngineType SEARCH_FIELDS = ('name', ) LIST_FILTER = ('is_in_memory', ) LIST_FIELDS = ('n...
29
73
0.749722
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.contrib import admin from physical.admin.engine_type import EngineTypeAdmin from physical.models import EngineType SEARCH_FIELDS = ('name', ) LIST_FILTER = ('is_in_memory', ) LIST_FIELDS = ('n...
351
14
158
fa7eef9f715a1d26fda616e1b65f2fb5b7b6a5ed
745
py
Python
xxcmd/dbitem.py
grking/xxcmd
287811a68d0bed0939ea888b555cacd1ac8b5a0e
[ "MIT" ]
null
null
null
xxcmd/dbitem.py
grking/xxcmd
287811a68d0bed0939ea888b555cacd1ac8b5a0e
[ "MIT" ]
null
null
null
xxcmd/dbitem.py
grking/xxcmd
287811a68d0bed0939ea888b555cacd1ac8b5a0e
[ "MIT" ]
null
null
null
# dbitem.py import re # Auto detect and split labels/cmd # Return a string suitable for substring searching
26.607143
61
0.46443
# dbitem.py import re class DBItem(): # Auto detect and split labels/cmd def __init__(self, line, tags=None): label = "" post = re.match(r'.*(\[(.*)\])$', line) pre = re.match(r'^(\[(.*)\])(.*)$', line) if post: label = post.group(2) line = re.sub(r'(\[...
557
-6
75
3bc857abeeec95d09a9ac687261d090c0e95f042
878
py
Python
tests/template_tests/test_base.py
shinshin86/django
5cc81cd9eb69f5f7a711412c02039b435c393135
[ "PSF-2.0", "BSD-3-Clause" ]
2
2020-11-04T06:26:42.000Z
2021-01-17T19:29:52.000Z
tests/template_tests/test_base.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
11
2020-03-24T15:46:05.000Z
2022-03-11T23:20:58.000Z
tests/template_tests/test_base.py
Blaahborgh/django
c591bc3ccece1514d6b419826c7fa36ada9d9213
[ "PSF-2.0", "BSD-3-Clause" ]
2
2018-01-08T08:14:29.000Z
2020-11-04T08:46:29.000Z
from django.template.base import Variable, VariableDoesNotExist from django.test import SimpleTestCase
38.173913
102
0.666287
from django.template.base import Variable, VariableDoesNotExist from django.test import SimpleTestCase class VariableDoesNotExistTests(SimpleTestCase): def test_str(self): exc = VariableDoesNotExist(msg='Failed lookup in %r', params=({'foo': 'bar'},)) self.assertEqual(str(exc), "Failed lookup in {...
270
431
72
51f49434b72bf30b02042d658c8777e8e03fdea0
66
py
Python
homebrain/agents/devicemanager/__init__.py
ErikBjare/Homebrain
7e4dcc9d0e5f5ef6bde3d2cf31639527166ab124
[ "MIT" ]
1
2015-12-03T18:42:54.000Z
2015-12-03T18:42:54.000Z
homebrain/agents/devicemanager/__init__.py
ErikBjare/Homebrain
7e4dcc9d0e5f5ef6bde3d2cf31639527166ab124
[ "MIT" ]
14
2015-12-02T22:21:12.000Z
2019-11-06T10:26:08.000Z
homebrain/agents/devicemanager/__init__.py
ErikBjare/Homebrain
7e4dcc9d0e5f5ef6bde3d2cf31639527166ab124
[ "MIT" ]
null
null
null
# Import the agent class from .devicemanager import DeviceManager
22
40
0.833333
# Import the agent class from .devicemanager import DeviceManager
0
0
0
caf71cd01f3bb9c0494d877af8bc4b92a30c6065
1,480
py
Python
ReconstructOriginaldigits.py
AndySamoil/Elite_Code
7dc3b7b1b8688c932474f8a10fd2637fd2918bdd
[ "MIT" ]
null
null
null
ReconstructOriginaldigits.py
AndySamoil/Elite_Code
7dc3b7b1b8688c932474f8a10fd2637fd2918bdd
[ "MIT" ]
null
null
null
ReconstructOriginaldigits.py
AndySamoil/Elite_Code
7dc3b7b1b8688c932474f8a10fd2637fd2918bdd
[ "MIT" ]
null
null
null
def originalDigits(self, s: str) -> str: """ credit to ZitaoWang for being a beast (adapted sol.) The key to this solution is in the set-up in identifying that each number has its own unique character that defines it. Some don't have this characteristic but they become d...
43.529412
170
0.458784
def originalDigits(self, s: str) -> str: """ credit to ZitaoWang for being a beast (adapted sol.) The key to this solution is in the set-up in identifying that each number has its own unique character that defines it. Some don't have this characteristic but they become d...
0
0
0
1167d35a80949bd319acdab65f97e28ebc761d96
20,342
py
Python
onepercentclub/settings/base.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
7
2015-01-02T19:31:14.000Z
2021-03-22T17:30:23.000Z
onepercentclub/settings/base.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
1
2015-03-06T08:34:59.000Z
2015-03-06T08:34:59.000Z
onepercentclub/settings/base.py
jfterpstra/onepercentclub-site
43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e
[ "BSD-3-Clause" ]
null
null
null
# coding=utf-8 # Django settings for bluebottle project. import os, datetime # Import global settings for overriding without throwing away defaults from django.conf import global_settings from django.utils.translation import ugettext as _ from admin_dashboard import * from .payments import * # Set PROJECT_ROOT to th...
31.984277
123
0.723528
# coding=utf-8 # Django settings for bluebottle project. import os, datetime # Import global settings for overriding without throwing away defaults from django.conf import global_settings from django.utils.translation import ugettext as _ from admin_dashboard import * from .payments import * # Set PROJECT_ROOT to th...
0
0
0
e607a44a1aa94201d10998a2a66e5d422aaaebba
3,084
py
Python
Semestre_2016_1/Sol_Parcial_III/p1.py
SherylA/Archivo_Fundamentos
4b40cca6d808efdb9c96fa62dabb453931965882
[ "CC-BY-4.0" ]
null
null
null
Semestre_2016_1/Sol_Parcial_III/p1.py
SherylA/Archivo_Fundamentos
4b40cca6d808efdb9c96fa62dabb453931965882
[ "CC-BY-4.0" ]
null
null
null
Semestre_2016_1/Sol_Parcial_III/p1.py
SherylA/Archivo_Fundamentos
4b40cca6d808efdb9c96fa62dabb453931965882
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #Los valores reales eran #La altura inicial es 0.5 [m] #La gravedad es 9.8 [m/s^2] #El ángulo es 25 [grados] #La velocidad inicial es 5 [m/s] #El Xmax es 2.724 [m] #El Ymax es 0.728 [m] import math, sys #PARA REVISAR RÁPIDAMENTE n=15 x=[0.100,0.250,0.400,0.550,0.700...
21.87234
219
0.590467
#!/usr/bin/env python # -*- coding: utf-8 -*- #Los valores reales eran #La altura inicial es 0.5 [m] #La gravedad es 9.8 [m/s^2] #El ángulo es 25 [grados] #La velocidad inicial es 5 [m/s] #El Xmax es 2.724 [m] #El Ymax es 0.728 [m] import math, sys def reglineal(y,x,n): A=0.0 B=0.0 C=0.0 D=0.0 for i in ra...
989
0
47
5db3d3e7396889be388b655ff404041e12f5a1ff
1,736
py
Python
test/test_orthonormal_basis_symbolic.py
wzh-code/basix
a5dc28dc4ed33e12518d8460b9d85b9f2da108d8
[ "MIT" ]
3
2020-11-19T19:17:06.000Z
2020-12-04T11:00:26.000Z
test/test_orthonormal_basis_symbolic.py
wzh-code/basix
a5dc28dc4ed33e12518d8460b9d85b9f2da108d8
[ "MIT" ]
33
2020-11-08T18:55:27.000Z
2020-12-14T10:08:19.000Z
test/test_orthonormal_basis_symbolic.py
wzh-code/basix
a5dc28dc4ed33e12518d8460b9d85b9f2da108d8
[ "MIT" ]
1
2020-11-23T19:40:31.000Z
2020-11-23T19:40:31.000Z
# Copyright (c) 2020 Chris Richardson & Matthew Scroggs # FEniCS Project # SPDX-License-Identifier: MIT import sympy import basix import numpy as np
26.707692
77
0.553571
# Copyright (c) 2020 Chris Richardson & Matthew Scroggs # FEniCS Project # SPDX-License-Identifier: MIT import sympy import basix import numpy as np def P_interval(n, x): r = [] for i in range(n + 1): p = x ** i for j in r: p -= (p * j).integrate((x, 0, 1)) * j p /= sympy....
1,514
0
69
291e5f10a8abe29a41b76b7aa9d6af7ab6c029b3
114
py
Python
libalgopy/common/enums/binary_heap_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
libalgopy/common/enums/binary_heap_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
libalgopy/common/enums/binary_heap_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
from enum import Enum if __name__ == '__main__': pass
10.363636
27
0.622807
from enum import Enum class BinaryHeapType(Enum): MIN = 1 MAX = 2 if __name__ == '__main__': pass
0
30
23
b5c99aad807c9c047b440b75f64ba73da15b30d0
6,535
py
Python
visualize.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
visualize.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
visualize.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Visualize results of Gaussian process bootstrapping. """ import argparse import math import os import pathlib import pandas as pd import matplotlib.pyplot as mpl def parse_args(): """ Parse command line arguments. """ parser = argparse.ArgumentParser(description=__doc__.s...
33.172589
110
0.636113
#!/usr/bin/env python3 """ Visualize results of Gaussian process bootstrapping. """ import argparse import math import os import pathlib import pandas as pd import matplotlib.pyplot as mpl def parse_args(): """ Parse command line arguments. """ parser = argparse.ArgumentParser(description=__doc__.s...
0
0
0
29c0d8a6d52b7b776decec9e70f2971d2f22cee9
222
py
Python
exercises/01.python-for-everybody/chapter06/exercise04.py
Fabricio-Lopees/computer-science-learning
e8cfcd468f9fdbaa1cacf803d0dade04a99eb19a
[ "MIT" ]
null
null
null
exercises/01.python-for-everybody/chapter06/exercise04.py
Fabricio-Lopees/computer-science-learning
e8cfcd468f9fdbaa1cacf803d0dade04a99eb19a
[ "MIT" ]
null
null
null
exercises/01.python-for-everybody/chapter06/exercise04.py
Fabricio-Lopees/computer-science-learning
e8cfcd468f9fdbaa1cacf803d0dade04a99eb19a
[ "MIT" ]
null
null
null
text = input('Enter a text: ') character = input('Enter a character that you can search in "'+text+'": ') result = text.count(character) print('The character "'+character+'" appears '+str(result)+' times in "'+text+'".')
37
83
0.662162
text = input('Enter a text: ') character = input('Enter a character that you can search in "'+text+'": ') result = text.count(character) print('The character "'+character+'" appears '+str(result)+' times in "'+text+'".')
0
0
0
351f0855d402f27478b354263c225351c8121de8
5,807
py
Python
test.py
chenrz925/pytorch_fft
459cb20291717398df2def466faa2f3495b2454f
[ "Apache-2.0" ]
322
2017-05-25T08:42:23.000Z
2022-03-28T02:32:25.000Z
test.py
bloodmage/pytorch_fft
34057d19563c939cc49b116ff8570f95747e552c
[ "Apache-2.0" ]
37
2017-06-16T20:05:53.000Z
2021-03-11T08:04:09.000Z
test.py
bloodmage/pytorch_fft
34057d19563c939cc49b116ff8570f95747e552c
[ "Apache-2.0" ]
54
2017-05-26T02:20:54.000Z
2022-01-19T12:40:18.000Z
import torch torch.manual_seed(0) # from _ext import th_fft import pytorch_fft.fft as cfft import pytorch_fft.fft.autograd as afft import numpy as np import numpy.fft as nfft if __name__ == "__main__": if torch.cuda.is_available(): nfft3 = lambda x: nfft.fftn(x,axes=(1,2,3)) nifft3 = lambda x:...
32.623596
93
0.6456
import torch torch.manual_seed(0) # from _ext import th_fft import pytorch_fft.fft as cfft import pytorch_fft.fft.autograd as afft import numpy as np import numpy.fft as nfft def run_c2c(x, z, _f1, _f2, _if1, _if2, atol): y1, y2 = _f1(x, z) x_np = x.cpu().numpy().squeeze() y_np = _f2(x_np) assert np.al...
3,893
0
437
5c94c4181bfdc440bbcd269985eebfcc3512956e
1,705
py
Python
one_fm/accommodation/doctype/accommodation_unit/accommodation_unit.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
16
2021-06-14T23:56:47.000Z
2022-03-22T12:05:06.000Z
one_fm/accommodation/doctype/accommodation_unit/accommodation_unit.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
119
2020-08-17T16:27:45.000Z
2022-03-28T12:42:56.000Z
one_fm/accommodation/doctype/accommodation_unit/accommodation_unit.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
12
2021-05-16T13:35:40.000Z
2022-02-21T12:41:04.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, omar jaber and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _
35.520833
113
0.781232
# -*- coding: utf-8 -*- # Copyright (c) 2020, omar jaber and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ class AccommodationUnit(Document): def validate(self): self.set_title() ...
1,260
13
189
3f4cfc16abf8cfe74758513ff7729c9e659a4a30
2,501
py
Python
PDFer/PDFer/PDFer.py
lucadalbosco/PDFer
e7ee45691044d50bb8e72258191e07e457dc7f50
[ "MIT" ]
null
null
null
PDFer/PDFer/PDFer.py
lucadalbosco/PDFer
e7ee45691044d50bb8e72258191e07e457dc7f50
[ "MIT" ]
null
null
null
PDFer/PDFer/PDFer.py
lucadalbosco/PDFer
e7ee45691044d50bb8e72258191e07e457dc7f50
[ "MIT" ]
null
null
null
import pdf2txt #import time import csv from PySide import QtGui import os import os.path # prove prove my_dir = QtGui.QFileDialog.getExistingDirectory(None,'Scegli una cartella','\\srveuro\Ufficio_Tecnico\VALIDAZIONE\S10') file_list = [] for dirpath, dirnames, filenames in os.walk(my_dir): for fi...
22.132743
120
0.497001
import pdf2txt #import time import csv from PySide import QtGui import os import os.path # prove prove my_dir = QtGui.QFileDialog.getExistingDirectory(None,'Scegli una cartella','\\srveuro\Ufficio_Tecnico\VALIDAZIONE\S10') file_list = [] for dirpath, dirnames, filenames in os.walk(my_dir): for fi...
0
0
0
b98c9e42fb41fb4d56962db2e910d1d60853fcb4
5,074
py
Python
stellar_sdk/account.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
null
null
null
stellar_sdk/account.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
27
2022-01-12T10:55:38.000Z
2022-03-28T01:38:24.000Z
stellar_sdk/account.py
Shaptic/py-stellar-base
f5fa47f4d96f215889d99249fb25c7be002f5cf3
[ "Apache-2.0" ]
2
2021-12-02T12:42:03.000Z
2021-12-07T20:53:10.000Z
from typing import Any, Dict, List, Optional, Union from .muxed_account import MuxedAccount from .sep.ed25519_public_key_signer import Ed25519PublicKeySigner from .type_checked import type_checked __all__ = ["Account"] @type_checked class Account: """The :class:`Account` object represents a single account o...
38.439394
109
0.669294
from typing import Any, Dict, List, Optional, Union from .muxed_account import MuxedAccount from .sep.ed25519_public_key_signer import Ed25519PublicKeySigner from .type_checked import type_checked __all__ = ["Account"] @type_checked class Account: """The :class:`Account` object represents a single account o...
1,673
-4
209
d9dd94963a22d1ef9ae39d0995e3510f4b30f57c
135
py
Python
pastepwn/api/__init__.py
SaFiSec/pastepwn
9009874f9c9edd2be86399cc90802117ae28d3ce
[ "MIT" ]
1
2019-04-28T17:48:34.000Z
2019-04-28T17:48:34.000Z
pastepwn/api/__init__.py
0xSaFi/pastepwn
9009874f9c9edd2be86399cc90802117ae28d3ce
[ "MIT" ]
null
null
null
pastepwn/api/__init__.py
0xSaFi/pastepwn
9009874f9c9edd2be86399cc90802117ae28d3ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .apiserver import APIServer from .apiresponse import APIResponse __all__ = ['APIServer', 'APIResponse']
19.285714
38
0.718519
# -*- coding: utf-8 -*- from .apiserver import APIServer from .apiresponse import APIResponse __all__ = ['APIServer', 'APIResponse']
0
0
0
3c8c7884ceeb6744551087c925736f38a5581eb0
1,667
py
Python
sky130/custom/scripts/fix_gpiov2_gds.py
lekez2005/open_pdks
e8416d541c839e4ec51187feb37f456f35a9b35b
[ "Apache-2.0" ]
null
null
null
sky130/custom/scripts/fix_gpiov2_gds.py
lekez2005/open_pdks
e8416d541c839e4ec51187feb37f456f35a9b35b
[ "Apache-2.0" ]
null
null
null
sky130/custom/scripts/fix_gpiov2_gds.py
lekez2005/open_pdks
e8416d541c839e4ec51187feb37f456f35a9b35b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # fix_gpiov2_gds.py --- # # Special-purpose script that does the work of what ought to be a simple # binary diff and patch. Except that no such thing exists as a standard # offering on most Linux systems, so instead of adding another OS # package requirement, I'm just writing a binary search-a...
34.729167
84
0.716857
#!/usr/bin/env python3 # # fix_gpiov2_gds.py --- # # Special-purpose script that does the work of what ought to be a simple # binary diff and patch. Except that no such thing exists as a standard # offering on most Linux systems, so instead of adding another OS # package requirement, I'm just writing a binary search-a...
0
0
0
320b6fa95fbb616d5b44ecaf14d38d8a64b3ac3f
11,340
py
Python
utils/geometry_helper.py
matsuren/crownconv360depth
8f8f30b6739409e5cd762af92206fe72d74b0d54
[ "MIT" ]
35
2020-07-12T15:31:56.000Z
2022-02-13T01:33:20.000Z
utils/geometry_helper.py
matsuren/crownconv360depth
8f8f30b6739409e5cd762af92206fe72d74b0d54
[ "MIT" ]
5
2020-07-17T09:22:59.000Z
2022-02-17T16:02:58.000Z
utils/geometry_helper.py
matsuren/crownconv360depth
8f8f30b6739409e5cd762af92206fe72d74b0d54
[ "MIT" ]
6
2020-10-27T15:23:21.000Z
2021-07-16T06:52:46.000Z
import math import os from copy import copy from functools import lru_cache from functools import partial from os.path import join import igl import numpy as np from numpy.linalg import norm # @lru_cache(maxsize=None) @lru_cache(maxsize=None) @lru_cache(maxsize=None) @lru_cache() def distort_unfold_t...
29.608355
105
0.587213
import math import os from copy import copy from functools import lru_cache from functools import partial from os.path import join import igl import numpy as np from numpy.linalg import norm # @lru_cache(maxsize=None) def get_icosahedron(level=0): if level == 0: v, f = get_base_icosahedron() retu...
9,189
16
473
cd3b9182d0f7f375965ecf2411fe35384ab62ab0
553
py
Python
banix_server/src/initialize_database.py
4rund3v/banix
d67a4b6883a86e6f36476c103fba821eeb03b87a
[ "CC0-1.0" ]
null
null
null
banix_server/src/initialize_database.py
4rund3v/banix
d67a4b6883a86e6f36476c103fba821eeb03b87a
[ "CC0-1.0" ]
null
null
null
banix_server/src/initialize_database.py
4rund3v/banix
d67a4b6883a86e6f36476c103fba821eeb03b87a
[ "CC0-1.0" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from configuration import DATABASE_FILE import os import sys # custom module imports from src.models import Base if not os.path.exists(os.path.dirname(DATABASE_FILE)): print(f"[initialize_database] Creating the database dir : {os.path.dir...
32.529412
96
0.792043
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from configuration import DATABASE_FILE import os import sys # custom module imports from src.models import Base if not os.path.exists(os.path.dirname(DATABASE_FILE)): print(f"[initialize_database] Creating the database dir : {os.path.dir...
0
0
0
d6983dcba30f5c74adcaa1c06debc7b1e1a4d1d6
428
py
Python
myalgorithms/VertexForAlgorithm.py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
2
2020-01-27T11:58:54.000Z
2020-03-30T10:54:08.000Z
myalgorithms/VertexForAlgorithm.py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
null
null
null
myalgorithms/VertexForAlgorithm.py
andriidem308/python_practice
85a0ebd6ecbecf63eaba170c8279f0a88600237a
[ "MIT" ]
null
null
null
from Vertex import Vertex INF = 10**9
20.380952
37
0.628505
from Vertex import Vertex INF = 10**9 class VertexForAlgorithms(Vertex): def __init__(self, key): super().__init__(key) self.distance = INF self.source = None def set_distance(self, distance): self.distance = distance def distance(self): return self.distance ...
220
13
157
e3acee8508f7303664692ddbee629864707b816f
703
py
Python
pig-latin/pig_latin.py
j-mak/exercism.io
2092ee17c899abbcfb8e98521ac2fa21368f504f
[ "MIT" ]
null
null
null
pig-latin/pig_latin.py
j-mak/exercism.io
2092ee17c899abbcfb8e98521ac2fa21368f504f
[ "MIT" ]
null
null
null
pig-latin/pig_latin.py
j-mak/exercism.io
2092ee17c899abbcfb8e98521ac2fa21368f504f
[ "MIT" ]
null
null
null
VOWELS = ('a', 'e', 'i', 'o', 'u', 'yt', 'xr') CONSONANTS = ('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z', 'sh', 'sch', 'zz', 'gh', 'ch', 'th', 'qu', 'thr', 'squ')
29.291667
62
0.385491
VOWELS = ('a', 'e', 'i', 'o', 'u', 'yt', 'xr') CONSONANTS = ('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z', 'sh', 'sch', 'zz', 'gh', 'ch', 'th', 'qu', 'thr', 'squ') def transl...
371
0
23
f999aabed81f7dc07d7b32f0db118169cb07d83b
555
py
Python
khan_mini/settings.py
tobykurien/ase
42520a60aa373293527a15097b2ffd9e3816b415
[ "MIT" ]
null
null
null
khan_mini/settings.py
tobykurien/ase
42520a60aa373293527a15097b2ffd9e3816b415
[ "MIT" ]
null
null
null
khan_mini/settings.py
tobykurien/ase
42520a60aa373293527a15097b2ffd9e3816b415
[ "MIT" ]
null
null
null
import os KHAN_BASE_URL = "http://192.168.1.2:8080" # instance used by khan mini to access API KHAN_MINI_BASE_URL = "http://192.168.1.2:8081" KHAN_BASE_URL2 = "http://192.168.1.2" # excluding port, which will be randomly assigned from below KHAN_INSTANCES = [8082,8083,8084,8085,8086] khanconf = os.pat...
42.692308
108
0.731532
import os KHAN_BASE_URL = "http://192.168.1.2:8080" # instance used by khan mini to access API KHAN_MINI_BASE_URL = "http://192.168.1.2:8081" KHAN_BASE_URL2 = "http://192.168.1.2" # excluding port, which will be randomly assigned from below KHAN_INSTANCES = [8082,8083,8084,8085,8086] khanconf = os.pat...
0
0
0
7417cf5e6ce0b9948c0a5bbc3a8d6bdfbf2115a4
2,456
py
Python
BackendAPI/customuser/admin.py
silvioramalho/django-startup-rest-api
b984ee6be27990d29ab3df7cdd446bb63ee3ee34
[ "MIT" ]
9
2020-05-23T14:42:00.000Z
2022-03-04T12:21:00.000Z
BackendAPI/customuser/admin.py
silvioramalho/django-startup-rest-api
b984ee6be27990d29ab3df7cdd446bb63ee3ee34
[ "MIT" ]
6
2020-05-14T21:34:09.000Z
2021-09-22T19:01:15.000Z
BackendAPI/customuser/admin.py
silvioramalho/django-startup-rest-api
b984ee6be27990d29ab3df7cdd446bb63ee3ee34
[ "MIT" ]
1
2022-03-04T12:20:52.000Z
2022-03-04T12:20:52.000Z
from django.contrib import admin from django.contrib.admin.actions import delete_selected from .models import CustomUser from djoser import signals, utils from djoser.compat import get_user_email from djoser.conf import settings make_activate.short_description = "Ativar Usuarios" send_confirmation_email.short_descr...
36.656716
79
0.736156
from django.contrib import admin from django.contrib.admin.actions import delete_selected from .models import CustomUser from djoser import signals, utils from djoser.compat import get_user_email from djoser.conf import settings def make_activate(modeladmin, request, queryset): queryset.update(is_active=True) de...
907
443
138
f2b13eab6e221386027678d317dbab5f8bb2dc64
467
py
Python
applicationServer/main.py
YkBastidas/REST-distribuidos
f43fbb13f081f84b91a2aabe6eedb6ca695acda0
[ "MIT" ]
1
2022-02-12T16:00:43.000Z
2022-02-12T16:00:43.000Z
applicationServer/main.py
YkBastidas/REST-distribuidos
f43fbb13f081f84b91a2aabe6eedb6ca695acda0
[ "MIT" ]
null
null
null
applicationServer/main.py
YkBastidas/REST-distribuidos
f43fbb13f081f84b91a2aabe6eedb6ca695acda0
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Api from objects import Objects from replicate import Replicate from restore import Restore from object import Object app = Flask(__name__) api = Api(app) api.add_resource(Objects, "/api/objects/") api.add_resource(Replicate, "/api/replicate/<action>") api.add_resource...
27.470588
54
0.760171
from flask import Flask from flask_restful import Api from objects import Objects from replicate import Replicate from restore import Restore from object import Object app = Flask(__name__) api = Api(app) api.add_resource(Objects, "/api/objects/") api.add_resource(Replicate, "/api/replicate/<action>") api.add_resource...
0
0
0
1e4ad983cebf259060996e755982865fa7dd25b3
433
py
Python
CursoIntensivoPython/curso-intensivo-python-master/capitulo_04/exercicios/buffet.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_04/exercicios/buffet.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_04/exercicios/buffet.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
pratos = ('bolinho de bacalhau', 'francesinha', 'caldo verde', 'pastel de belém', 'feijoada') print('Cardápio principal:') for prato in pratos: print(f'\t{prato.title()}') pratos = ('arroz de forno', 'farofa crocante', 'caldo verde', 'pastel de ...
24.055556
32
0.549654
pratos = ('bolinho de bacalhau', 'francesinha', 'caldo verde', 'pastel de belém', 'feijoada') print('Cardápio principal:') for prato in pratos: print(f'\t{prato.title()}') pratos = ('arroz de forno', 'farofa crocante', 'caldo verde', 'pastel de ...
0
0
0
248ce9e2a1ed33df23443a2674dd4d800fcb7be1
4,176
py
Python
blockchain_connector/ethereum/ethereum_connector/eth_connector_service.py
san-lab/avalon_dalion
7dcd8ce46366caa51b658e33eac88d2853a5b595
[ "Apache-2.0" ]
null
null
null
blockchain_connector/ethereum/ethereum_connector/eth_connector_service.py
san-lab/avalon_dalion
7dcd8ce46366caa51b658e33eac88d2853a5b595
[ "Apache-2.0" ]
1
2021-02-03T07:57:06.000Z
2021-02-13T13:53:49.000Z
blockchain_connector/ethereum/ethereum_connector/eth_connector_service.py
pankajgoyal2/trusted-compute-framework
c060755995864f05516206e98c46e00e3826e425
[ "Apache-2.0" ]
4
2021-06-09T08:55:26.000Z
2021-11-26T16:25:48.000Z
# Copyright 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
32.625
76
0.613506
# Copyright 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
2,354
0
46
59161acdbbfe0086ad74e6b4f04b3ab3f51c44b3
2,366
py
Python
test/test_membalancer.py
dcsparkes/adventofcode
e8bf8cef1d8757ad8981dde8dc76f8f7ec396be5
[ "Unlicense" ]
null
null
null
test/test_membalancer.py
dcsparkes/adventofcode
e8bf8cef1d8757ad8981dde8dc76f8f7ec396be5
[ "Unlicense" ]
null
null
null
test/test_membalancer.py
dcsparkes/adventofcode
e8bf8cef1d8757ad8981dde8dc76f8f7ec396be5
[ "Unlicense" ]
null
null
null
""" https://adventofcode.com/2017/day/6 """ import unittest from _2017 import d06_memreallocation if __name__ == '__main__': unittest.main()
30.333333
57
0.62891
""" https://adventofcode.com/2017/day/6 """ import unittest from _2017 import d06_memreallocation class TestMemBalancer(unittest.TestCase): fInput = "input2017_06a.txt" fTest1 = "test2017_06a.txt" def test_readFile_fTest1_len(self): mb = d06_memreallocation.MemBalancer(self.fTest1) self.a...
1,813
382
23
c34ae911dc7634a0bfbf6a8c8b14453dc7a1f47b
10,411
py
Python
harvester/agent_manager.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
6
2020-03-08T21:04:47.000Z
2021-05-29T07:14:25.000Z
harvester/agent_manager.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
5
2020-04-20T08:41:48.000Z
2021-01-04T18:15:39.000Z
harvester/agent_manager.py
DrInfy/TheHarvester
dd21194ab2220c8edb73352c299d2bfb0f11d7d6
[ "MIT" ]
2
2021-01-18T21:07:56.000Z
2021-11-22T15:24:21.000Z
from random import randint from typing import Optional from harvester.zerg_action import ZergAction from sc2 import UnitTypeId from sc2.ids.upgrade_id import UpgradeId from sharpy.interfaces import IGameAnalyzer, IEnemyUnitsManager from sharpy.managers.extensions.game_states import AirArmy from sharpy.managers.extensi...
41.478088
114
0.621074
from random import randint from typing import Optional from harvester.zerg_action import ZergAction from sc2 import UnitTypeId from sc2.ids.upgrade_id import UpgradeId from sharpy.interfaces import IGameAnalyzer, IEnemyUnitsManager from sharpy.managers.extensions.game_states import AirArmy from sharpy.managers.extensi...
9,634
259
23
09e2d8ae0fd803e5a993783454003f4eba5dc1d2
275
py
Python
sunnysouth/marketplace/serializers/categories.py
EdwinBaeza05/django-genricsl-app
a8759d609957e80883cca79f0694d494364775a4
[ "MIT" ]
null
null
null
sunnysouth/marketplace/serializers/categories.py
EdwinBaeza05/django-genricsl-app
a8759d609957e80883cca79f0694d494364775a4
[ "MIT" ]
null
null
null
sunnysouth/marketplace/serializers/categories.py
EdwinBaeza05/django-genricsl-app
a8759d609957e80883cca79f0694d494364775a4
[ "MIT" ]
null
null
null
# Django from rest_framework import serializers # Models from sunnysouth.marketplace.models import Category
21.153846
59
0.730909
# Django from rest_framework import serializers # Models from sunnysouth.marketplace.models import Category class CategoryModelSerializer(serializers.ModelSerializer): class Meta: model = Category fields = '__all__' read_only_fields = ['uuid']
0
142
23
9fc23fc2e4a05ea6f915783e7573f4e1dddd686a
1,666
py
Python
launch_xml/test/launch_xml/test_include.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
67
2015-06-12T21:17:24.000Z
2022-03-30T07:19:52.000Z
launch_xml/test/launch_xml/test_include.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
516
2015-03-20T02:22:59.000Z
2022-03-30T12:33:33.000Z
launch_xml/test/launch_xml/test_include.py
bedieber/launch
4dfe69763379e405df7a21bde536aad7e39fdd93
[ "Apache-2.0" ]
101
2016-01-12T16:56:54.000Z
2022-03-09T12:35:37.000Z
# Copyright 2019 Open Source Robotics Foundation, Inc. # # 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...
33.32
84
0.729292
# Copyright 2019 Open Source Robotics Foundation, Inc. # # 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...
0
0
0
fdb67a622240f2063fb76151882d0b104415b1aa
651
py
Python
scrapple/utils/dynamicdispatch.py
scrappleapp/scrapple
0c19c7a2606f6ef5a1225a337c6ab08cb8431906
[ "MIT" ]
331
2015-02-04T18:12:31.000Z
2015-10-02T18:55:38.000Z
scrapple/utils/dynamicdispatch.py
harishb93/scrapple
0c19c7a2606f6ef5a1225a337c6ab08cb8431906
[ "MIT" ]
19
2015-01-24T13:44:11.000Z
2015-05-29T10:49:19.000Z
scrapple/utils/dynamicdispatch.py
harishb93/scrapple
0c19c7a2606f6ef5a1225a337c6ab08cb8431906
[ "MIT" ]
35
2015-12-17T06:32:02.000Z
2022-02-13T18:33:43.000Z
""" scrapple.utils.dynamicdispatch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Functions related to dynamic dispatch of objects """ def get_command_class(command): """ Called from runCLI() to select the command class for the selected command. :param command: The command to be implemented :return: The command clas...
27.125
80
0.658986
""" scrapple.utils.dynamicdispatch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Functions related to dynamic dispatch of objects """ def get_command_class(command): """ Called from runCLI() to select the command class for the selected command. :param command: The command to be implemented :return: The command clas...
0
0
0
597451557300b887a44f7f8772fc32f6fbfec8f5
274
py
Python
api_providing/api_currency_exchange.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
2
2020-10-15T22:12:17.000Z
2020-10-26T07:17:17.000Z
api_providing/api_currency_exchange.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
null
null
null
api_providing/api_currency_exchange.py
xyla-io/almacen
7b7f235dc7939777f971f1b5eadd5621e980c15e
[ "MIT" ]
null
null
null
import tasks from . import base from jones import FixerAPI
30.444444
95
0.79927
import tasks from . import base from jones import FixerAPI class CurrencyExchangeAPIProvider(base.APIProvider[tasks.FetchBaseCurrencyExchangeReportTask]): def provide(self): api_key = self.task.api_credentials['api_key'] self.task.api = FixerAPI(api_key=api_key)
94
74
47
b6c2b4befaf3d438e97b81d9007068d1ea6a1911
1,877
py
Python
asax/lj.py
sirmarcel/asax
f12d7b4837e807506a62daad9a3e4ff38ba6b777
[ "MIT" ]
1
2022-02-10T18:40:13.000Z
2022-02-10T18:40:13.000Z
asax/lj.py
sirmarcel/asax
f12d7b4837e807506a62daad9a3e4ff38ba6b777
[ "MIT" ]
4
2021-05-11T11:10:07.000Z
2021-11-11T21:48:18.000Z
asax/lj.py
sirmarcel/asax
f12d7b4837e807506a62daad9a3e4ff38ba6b777
[ "MIT" ]
1
2021-04-27T15:01:53.000Z
2021-04-27T15:01:53.000Z
from typing import Tuple import jax.numpy as jnp from ase import units from jax_md import energy from jax_md.energy import NeighborFn from .calculator import Calculator from .jax_utils import EnergyFn class LennardJones(Calculator): """Lennard-Jones Potential""" implemented_properties = ["energy", "energie...
30.274194
86
0.606287
from typing import Tuple import jax.numpy as jnp from ase import units from jax_md import energy from jax_md.energy import NeighborFn from .calculator import Calculator from .jax_utils import EnergyFn class LennardJones(Calculator): """Lennard-Jones Potential""" implemented_properties = ["energy", "energie...
599
0
27
5265017dcc3f9ea3967279e14b5718bf28920abb
11,197
py
Python
drake_pytorch/symbolic.py
DAIRLab/drake-pytorch
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
[ "BSD-3-Clause" ]
9
2022-01-17T04:24:41.000Z
2022-02-11T17:53:04.000Z
drake_pytorch/symbolic.py
DAIRLab/drake-pytorch
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
[ "BSD-3-Clause" ]
null
null
null
drake_pytorch/symbolic.py
DAIRLab/drake-pytorch
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from typing import Tuple, Callable, List, Union, cast from typing_extensions import Protocol import types import torch import pydrake.symbolic as sym import pdb import sympy from sympy import Symbol, sympify, simplify, trigsimp from functools import reduce import operator from enum import Enum # str...
35.321767
80
0.650889
import numpy as np from typing import Tuple, Callable, List, Union, cast from typing_extensions import Protocol import types import torch import pydrake.symbolic as sym import pdb import sympy from sympy import Symbol, sympify, simplify, trigsimp from functools import reduce import operator from enum import Enum # str...
6,554
72
320
4050934dd9bda1e21ef90f323f11b488f12c6b09
446
py
Python
Mesh/System/Entity/Function/Actuate.py
ys-warble/Mesh
115e7391d19ea09db3c627d8b8ed90b3e3bef9b5
[ "MIT" ]
null
null
null
Mesh/System/Entity/Function/Actuate.py
ys-warble/Mesh
115e7391d19ea09db3c627d8b8ed90b3e3bef9b5
[ "MIT" ]
2
2019-02-25T00:10:15.000Z
2019-03-22T20:13:32.000Z
Mesh/System/Entity/Function/Actuate.py
ys-warble/Mesh
115e7391d19ea09db3c627d8b8ed90b3e3bef9b5
[ "MIT" ]
null
null
null
from Mesh.System.Entity.Function import BaseFunction from Mesh.System.Entity.Function.Tasked import TaskName
18.583333
55
0.650224
from Mesh.System.Entity.Function import BaseFunction from Mesh.System.Entity.Function.Tasked import TaskName class Actuate(BaseFunction): tasks = [ TaskName.ACTUATE ] def __init__(self, entity): super().__init__(entity) def eval(self): pass def init(self): pass ...
126
187
23
49cfc822a3160fcdfc4c0fcae521eafb316d87e2
2,177
py
Python
python/landsat8_browseimage.py
vightel/FloodMapsWorkshop
ebc5246fbca52f2ee181a07663b859b2f6f59532
[ "Apache-2.0" ]
24
2015-02-07T06:34:14.000Z
2021-11-06T08:06:40.000Z
python/landsat8_browseimage.py
vightel/FloodMapsWorkshop
ebc5246fbca52f2ee181a07663b859b2f6f59532
[ "Apache-2.0" ]
1
2018-07-23T01:54:23.000Z
2018-07-23T01:55:05.000Z
python/landsat8_browseimage.py
vightel/FloodMapsWorkshop
ebc5246fbca52f2ee181a07663b859b2f6f59532
[ "Apache-2.0" ]
15
2015-03-10T06:39:10.000Z
2020-01-06T19:54:16.000Z
#!/usr/bin/env python # # Created on 07/11/2014 Pat Cappelaere - Vightel Corporation # # Output: Landsat 8 browse image # import os, inspect, sys import argparse import numpy import scipy import math from scipy import ndimage from osgeo import gdal from osgeo import osr from osgeo import ogr from which import * im...
28.272727
119
0.716123
#!/usr/bin/env python # # Created on 07/11/2014 Pat Cappelaere - Vightel Corporation # # Output: Landsat 8 browse image # import os, inspect, sys import argparse import numpy import scipy import math from scipy import ndimage from osgeo import gdal from osgeo import osr from osgeo import ogr from which import * im...
1,059
-6
95
c676c877a24ab95600634a7a7acbc4f2edc0df63
208
py
Python
String/ex004.py
Raissadg/Python
de5ba694291f48152433237d2a14bbea931b423c
[ "MIT" ]
null
null
null
String/ex004.py
Raissadg/Python
de5ba694291f48152433237d2a14bbea931b423c
[ "MIT" ]
null
null
null
String/ex004.py
Raissadg/Python
de5ba694291f48152433237d2a14bbea931b423c
[ "MIT" ]
null
null
null
nome = input('Digite seu nome: ').upper() print(f'Seu nome possui {nome.count("A")} letra A') print(f'O primeiro A está na posição {nome.find("A")+1}') print(f'O último A está na posição {nome.rfind("A")+1}')
52
57
0.668269
nome = input('Digite seu nome: ').upper() print(f'Seu nome possui {nome.count("A")} letra A') print(f'O primeiro A está na posição {nome.find("A")+1}') print(f'O último A está na posição {nome.rfind("A")+1}')
0
0
0
2ed971517d20113ba8073aec719f3751603fa79f
3,143
py
Python
kopf/clients/events.py
yashbhutwala/kopf
4ad77dae699d8516ee7c189b11c6cedbe9224975
[ "MIT" ]
null
null
null
kopf/clients/events.py
yashbhutwala/kopf
4ad77dae699d8516ee7c189b11c6cedbe9224975
[ "MIT" ]
null
null
null
kopf/clients/events.py
yashbhutwala/kopf
4ad77dae699d8516ee7c189b11c6cedbe9224975
[ "MIT" ]
null
null
null
import asyncio import datetime import logging import pykube import requests from kopf import config from kopf.clients import auth from kopf.structs import hierarchies logger = logging.getLogger(__name__) MAX_MESSAGE_LENGTH = 1024 CUT_MESSAGE_INFIX = '...' async def post_event(*, obj=None, ref=None, type, reason, ...
36.976471
115
0.641744
import asyncio import datetime import logging import pykube import requests from kopf import config from kopf.clients import auth from kopf.structs import hierarchies logger = logging.getLogger(__name__) MAX_MESSAGE_LENGTH = 1024 CUT_MESSAGE_INFIX = '...' async def post_event(*, obj=None, ref=None, type, reason, ...
0
0
0
f15869078cd0dd7a1fe8a9ab38ea4519aefe6a92
195
py
Python
pypcl/__init__.py
r9y9/pypcl
0528aacb8cfa1ceea2cbb3c7e3f20a1f066f23bf
[ "MIT" ]
null
null
null
pypcl/__init__.py
r9y9/pypcl
0528aacb8cfa1ceea2cbb3c7e3f20a1f066f23bf
[ "MIT" ]
null
null
null
pypcl/__init__.py
r9y9/pypcl
0528aacb8cfa1ceea2cbb3c7e3f20a1f066f23bf
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import division, print_function, absolute_import import pkg_resources __version__ = pkg_resources.get_distribution('pypcl').version from pypcl.common import *
19.5
64
0.815385
# coding: utf-8 from __future__ import division, print_function, absolute_import import pkg_resources __version__ = pkg_resources.get_distribution('pypcl').version from pypcl.common import *
0
0
0
10490a3f72ab52863674a818ec6c6176fa89e87f
587
py
Python
app/main/views.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
null
null
null
app/main/views.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
7
2020-02-20T13:58:44.000Z
2021-02-08T20:40:59.000Z
app/main/views.py
marknesh/Blogging-website
e8baca97136dae0adc4c7bf895bf076152430bbc
[ "MIT" ]
null
null
null
from . import main from flask import render_template,abort from flask_login import login_required from ..models import User,Blog from app.request import get_quote @main.route('/') @main.route('/user/<jina>',methods=['GET','POST'])
22.576923
74
0.715503
from . import main from flask import render_template,abort from flask_login import login_required from ..models import User,Blog from app.request import get_quote @main.route('/') def index(): neew=Blog.get_blog(id) qoute=get_quote() return render_template('home.html',pitch=neew,qoute=qoute) @main.ro...
304
0
44
2938f72bf2bac145173d9e763a2c2c54feec089d
349
py
Python
17_lambda.py
JimBae/pythonTips
5541569d9534536fc6da00f065707c176e7b95f4
[ "MIT" ]
null
null
null
17_lambda.py
JimBae/pythonTips
5541569d9534536fc6da00f065707c176e7b95f4
[ "MIT" ]
null
null
null
17_lambda.py
JimBae/pythonTips
5541569d9534536fc6da00f065707c176e7b95f4
[ "MIT" ]
null
null
null
# lambda 는 1줄 함수. # lambda argument: manipulate(argument) # ex add = lambda x, y: x + y print(add(2,4)) # sort a = [(1,2), (4,1), (9,10), (13,-3)] a.sort(key = lambda x:x[1]) print(a) # 병렬로 sort list list1 = [1,2,3,4,5] list2 = [9,8,5,3,1] data = list(zip(list1, list2)) print(data) data.sort() list1, list2 = map(la...
16.619048
49
0.593123
# lambda 는 1줄 함수. # lambda argument: manipulate(argument) # ex add = lambda x, y: x + y print(add(2,4)) # sort a = [(1,2), (4,1), (9,10), (13,-3)] a.sort(key = lambda x:x[1]) print(a) # 병렬로 sort list list1 = [1,2,3,4,5] list2 = [9,8,5,3,1] data = list(zip(list1, list2)) print(data) data.sort() list1, list2 = map(la...
0
0
0
5efaa4c5f3d7db8ce10787be7825583c4c7ec0e1
4,546
py
Python
model_training/loss/loss.py
fluke-tracker/fluke-tracker
1f9c5842f2100ed5ab449cd437ba74b880418624
[ "MIT" ]
2
2021-07-13T07:22:08.000Z
2021-07-13T08:18:32.000Z
model_training/loss/loss.py
fluke-tracker/fluke-tracker
1f9c5842f2100ed5ab449cd437ba74b880418624
[ "MIT" ]
null
null
null
model_training/loss/loss.py
fluke-tracker/fluke-tracker
1f9c5842f2100ed5ab449cd437ba74b880418624
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F class TripletLoss(object): """Modified from Tong Xiao's open-reid (https://github.com/Cysu/open-reid). Related Triplet Loss theory can be found in paper 'In Defense of the Triplet Loss for Person Re-Identification'."""
34.439394
97
0.639683
import torch import torch.nn as nn import torch.nn.functional as F def l2_norm(input, axis=1): norm = torch.norm(input, 2, axis, True) output = torch.div(input, norm) return output def euclidean_dist(x, y): m, n = x.size(0), y.size(0) xx = torch.pow(x, 2).sum(1, keepdim=True).expand(m, n) yy...
4,025
0
215
533064bd6976699dc1dffdd6facee75002254ea6
11,953
py
Python
AppServer/google/appengine/api/channel/channel_service_stub.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/google/appengine/api/channel/channel_service_stub.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/google/appengine/api/channel/channel_service_stub.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
30.886305
80
0.705597
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
81
9
50
db40152567bfed7b9803d41dc20e56428f9891c1
3,308
py
Python
eax_stream.py
jkmnt/tiny_eax_mode
370c4dac55fc45b50cc592fe87e7417abd25a705
[ "Unlicense" ]
null
null
null
eax_stream.py
jkmnt/tiny_eax_mode
370c4dac55fc45b50cc592fe87e7417abd25a705
[ "Unlicense" ]
null
null
null
eax_stream.py
jkmnt/tiny_eax_mode
370c4dac55fc45b50cc592fe87e7417abd25a705
[ "Unlicense" ]
null
null
null
from eax import gf_double, xorstrings # these classes simulate the way it could be done in C in online mode, byte by byte # wrappers for the online stream api to test it
31.807692
84
0.570133
from eax import gf_double, xorstrings # these classes simulate the way it could be done in C in online mode, byte by byte class OMAC_stream: def __init__(self, cfg, key, tweak): enc = cfg.ECB(key) L = enc.run(bytes([0] * cfg.BLOCKSIZE)) L_int = int.from_bytes(L, cfg.ENDIAN, signed=Fa...
2,847
-7
287
50244aa53e4bcb1d6cbdbfa6cf55283bec699087
817
py
Python
setup.py
romenrg/body-mass-index
462c9984a21cfc306c9466b20aafd184e6b1be37
[ "MIT" ]
2
2020-12-18T10:03:59.000Z
2021-01-16T12:50:15.000Z
setup.py
romenrg/body-mass-index
462c9984a21cfc306c9466b20aafd184e6b1be37
[ "MIT" ]
null
null
null
setup.py
romenrg/body-mass-index
462c9984a21cfc306c9466b20aafd184e6b1be37
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="body-mass-index", version="1.0.1", author="Romen Rodriguez-Gil", author_email="contact@romenrg.com", description="Utilities related to the Body Mass Index (BMI): Calculat...
32.68
120
0.662179
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="body-mass-index", version="1.0.1", author="Romen Rodriguez-Gil", author_email="contact@romenrg.com", description="Utilities related to the Body Mass Index (BMI): Calculat...
0
0
0
1cf19256d4d17d4dc98a553f94b4a0742aa4154b
431
py
Python
algotrade-bot-main/populate.py
ChoiceCoin/DeFi
8ee334d43f3709dba9e09fb65cdf9d57797502d8
[ "Apache-2.0" ]
2
2022-03-23T00:19:04.000Z
2022-03-24T19:10:49.000Z
algotrade-bot-main/populate.py
ChoiceCoin/DeFi
8ee334d43f3709dba9e09fb65cdf9d57797502d8
[ "Apache-2.0" ]
null
null
null
algotrade-bot-main/populate.py
ChoiceCoin/DeFi
8ee334d43f3709dba9e09fb65cdf9d57797502d8
[ "Apache-2.0" ]
null
null
null
from db.models import Trade, Asset ass1 = Asset(name="Algo", asset_id="0", network="mainnet") ass2 = Asset(name="Choice", asset_id="297995609", network="mainnet") ass1.save() ass2.save() trade = Trade( wallet_address="Replace With Address", asset1=ass1, asset2=ass2, asset_in=ass2, asset_in_amount...
20.52381
68
0.672854
from db.models import Trade, Asset ass1 = Asset(name="Algo", asset_id="0", network="mainnet") ass2 = Asset(name="Choice", asset_id="297995609", network="mainnet") ass1.save() ass2.save() trade = Trade( wallet_address="Replace With Address", asset1=ass1, asset2=ass2, asset_in=ass2, asset_in_amount...
0
0
0
fbf51807ae76b0f1f34461dc9bf4c73186f2503c
931
py
Python
examples/featherwing_alphanum_simpletest.py
iraytrace/Adafruit_CircuitPython_FeatherWing
2e398df58d4f0d679890f1af0167ae66e60a4c33
[ "MIT" ]
null
null
null
examples/featherwing_alphanum_simpletest.py
iraytrace/Adafruit_CircuitPython_FeatherWing
2e398df58d4f0d679890f1af0167ae66e60a4c33
[ "MIT" ]
null
null
null
examples/featherwing_alphanum_simpletest.py
iraytrace/Adafruit_CircuitPython_FeatherWing
2e398df58d4f0d679890f1af0167ae66e60a4c33
[ "MIT" ]
null
null
null
"""This example changes the fill, brightness, blink rates, shows number and text printing, displays a counter and then shows off the new marquee features.""" from time import sleep from adafruit_featherwing import alphanum_featherwing display = alphanum_featherwing.AlphaNumFeatherWing() #Fill and empty all segments ...
22.166667
58
0.726101
"""This example changes the fill, brightness, blink rates, shows number and text printing, displays a counter and then shows off the new marquee features.""" from time import sleep from adafruit_featherwing import alphanum_featherwing display = alphanum_featherwing.AlphaNumFeatherWing() #Fill and empty all segments ...
0
0
0
a935e3065f38ba3f1eebd53f899074b9cc088b4c
4,134
py
Python
src/panda_arm_motion_planning/scripts/end_to_end_learning.py
rajathkmanjunath/Motion-Planning-Network
e53ee8c35b8349e78c5141d42670061f00a198d4
[ "MIT" ]
3
2020-04-13T03:43:30.000Z
2021-11-03T09:08:17.000Z
src/panda_arm_motion_planning/scripts/end_to_end_learning.py
rajathkmanjunath/Motion-Planning-Network
e53ee8c35b8349e78c5141d42670061f00a198d4
[ "MIT" ]
null
null
null
src/panda_arm_motion_planning/scripts/end_to_end_learning.py
rajathkmanjunath/Motion-Planning-Network
e53ee8c35b8349e78c5141d42670061f00a198d4
[ "MIT" ]
4
2021-09-16T06:06:56.000Z
2021-11-10T08:45:34.000Z
import argparse import numpy as np import os import torch from torch import nn from torch.autograd import Variable from torch.backends import cudnn from torch.utils import data from utils.mpnet import MPNet from utils.plan_class import plan_dataset if __name__ == '__main__': parser = argparse.ArgumentParser() ...
35.637931
110
0.579584
import argparse import numpy as np import os import torch from torch import nn from torch.autograd import Variable from torch.backends import cudnn from torch.utils import data from utils.mpnet import MPNet from utils.plan_class import plan_dataset def main(args): cudnn.benchmark = True # Parameters tra...
2,940
0
23
8c5b050b28a617f800cf70829f393e5c2794b87e
23,318
py
Python
homepage/views.py
tommyfuu/BioCalculator
9501e7ce1420eb47a591ecf3c855e9e1b0330c60
[ "MIT" ]
3
2021-02-06T18:58:25.000Z
2021-06-25T16:02:04.000Z
homepage/views.py
tommyfuu/BioCalculator
9501e7ce1420eb47a591ecf3c855e9e1b0330c60
[ "MIT" ]
9
2021-06-15T23:38:31.000Z
2021-10-08T21:58:08.000Z
homepage/views.py
tommyfuu/BioCalculator
9501e7ce1420eb47a591ecf3c855e9e1b0330c60
[ "MIT" ]
1
2021-02-27T19:07:14.000Z
2021-02-27T19:07:14.000Z
from django.shortcuts import render, HttpResponse, HttpResponseRedirect # importing calculators from .calculatorDilution import DilutionForm from .calculatorDilution import * from .calculatorPCR import PCRForm from .calculatorPCR import * from .calculatorUnitConvert import ConversionForm from .calculatorUnitConvert im...
38.039152
203
0.596063
from django.shortcuts import render, HttpResponse, HttpResponseRedirect # importing calculators from .calculatorDilution import DilutionForm from .calculatorDilution import * from .calculatorPCR import PCRForm from .calculatorPCR import * from .calculatorUnitConvert import ConversionForm from .calculatorUnitConvert im...
19,702
0
390
d3c44721938c2e001d9a0ea64b9e887be6780370
1,293
py
Python
scrape_tvz.py
awordforthat/rhymes
b7d47b48a9b641e4736ed04058a183afc0a83b04
[ "MIT" ]
null
null
null
scrape_tvz.py
awordforthat/rhymes
b7d47b48a9b641e4736ed04058a183afc0a83b04
[ "MIT" ]
null
null
null
scrape_tvz.py
awordforthat/rhymes
b7d47b48a9b641e4736ed04058a183afc0a83b04
[ "MIT" ]
1
2021-02-16T03:06:38.000Z
2021-02-16T03:06:38.000Z
# scrapes Townes van Zandt lyrics # sample code so I don't have to remember all of this stuff # the next time I want to source some verses from bs4 import BeautifulSoup as soup import requests import string punctuation_trans_table = str.maketrans("", "", string.punctuation) base_url = "http://ippc2.orst.edu/coopl/...
28.108696
67
0.657386
# scrapes Townes van Zandt lyrics # sample code so I don't have to remember all of this stuff # the next time I want to source some verses from bs4 import BeautifulSoup as soup import requests import string punctuation_trans_table = str.maketrans("", "", string.punctuation) def strip_punctuation(s): return s.tr...
433
0
46
ad6a3927e81b1954002958e1e12bc5b7e6b8edec
592
py
Python
charity/management/commands/import_charities.py
A-jha383/Charity_backend
2f985dac9de41af80b593210e74bd1890022a435
[ "MIT" ]
1
2021-06-10T03:36:22.000Z
2021-06-10T03:36:22.000Z
charity/management/commands/import_charities.py
A-jha383/Charity_backend
2f985dac9de41af80b593210e74bd1890022a435
[ "MIT" ]
null
null
null
charity/management/commands/import_charities.py
A-jha383/Charity_backend
2f985dac9de41af80b593210e74bd1890022a435
[ "MIT" ]
null
null
null
from django.core import management from django.core.management.base import BaseCommand
29.6
89
0.594595
from django.core import management from django.core.management.base import BaseCommand class Command(BaseCommand): scrapers = [ "ccew", "ccni", # "oscr", ] def handle(self, *args, **options): for scraper in self.scrapers: try: mana...
363
114
24
a6bf6944f817db921b3a6da6d9784ed05684654a
301
py
Python
examples/ssids.py
AndersBlomdell/python-networkmanager
5842142a3777acdeab1740623b07e7152eba6706
[ "Zlib" ]
128
2015-01-13T12:42:31.000Z
2022-02-19T11:21:53.000Z
examples/ssids.py
smuething/python-networkmanager
d3018f4e24abf929f322c26e90afe4e364c5fd5b
[ "Zlib" ]
75
2015-01-06T15:47:56.000Z
2022-03-15T08:43:04.000Z
examples/ssids.py
smuething/python-networkmanager
d3018f4e24abf929f322c26e90afe4e364c5fd5b
[ "Zlib" ]
85
2015-01-22T08:59:33.000Z
2022-03-23T17:05:43.000Z
""" Display all visible SSIDs """ import NetworkManager for dev in NetworkManager.NetworkManager.GetDevices(): if dev.DeviceType != NetworkManager.NM_DEVICE_TYPE_WIFI: continue for ap in dev.GetAccessPoints(): print('%-30s %dMHz %d%%' % (ap.Ssid, ap.Frequency, ap.Strength))
25.083333
72
0.694352
""" Display all visible SSIDs """ import NetworkManager for dev in NetworkManager.NetworkManager.GetDevices(): if dev.DeviceType != NetworkManager.NM_DEVICE_TYPE_WIFI: continue for ap in dev.GetAccessPoints(): print('%-30s %dMHz %d%%' % (ap.Ssid, ap.Frequency, ap.Strength))
0
0
0
9e584b561484c57289fc7a5484fd3660c7b2b173
5,255
py
Python
src/utility/GetStationCategoryNameLocation.py
Jinglebear/db-ripper
dbea55349fbc37df8836cefc6206fa5972f34d99
[ "MIT" ]
1
2021-06-28T18:37:27.000Z
2021-06-28T18:37:27.000Z
src/utility/GetStationCategoryNameLocation.py
Jinglebear/db-ripper
dbea55349fbc37df8836cefc6206fa5972f34d99
[ "MIT" ]
2
2021-07-12T18:01:43.000Z
2021-07-26T15:26:56.000Z
src/utility/GetStationCategoryNameLocation.py
Jinglebear/db-ripper
dbea55349fbc37df8836cefc6206fa5972f34d99
[ "MIT" ]
1
2021-06-25T08:29:29.000Z
2021-06-25T08:29:29.000Z
import requests import time import csv import sys from itertools import groupby import Utils # ==================================================================== # **Description** # This script takes the list of train stations we found on wikipedia # --> Extracts: train station number, train station name, train stat...
40.423077
113
0.64548
import requests import time import csv import sys from itertools import groupby import Utils # ==================================================================== # **Description** # This script takes the list of train stations we found on wikipedia # --> Extracts: train station number, train station name, train stat...
2,642
0
88
5d41f03e0a4e0e25064b6ab9df87cfc137c1462d
19,283
py
Python
curt/cli.py
mittagessen/curt
f8c5fa8b785a87a126cdbbbaae3dba2be8acaa3b
[ "Apache-2.0" ]
null
null
null
curt/cli.py
mittagessen/curt
f8c5fa8b785a87a126cdbbbaae3dba2be8acaa3b
[ "Apache-2.0" ]
null
null
null
curt/cli.py
mittagessen/curt
f8c5fa8b785a87a126cdbbbaae3dba2be8acaa3b
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python import glob import time import torch import click import os.path import random import logging import pathlib import datetime import numpy as np import torchvision.transforms as tf from PIL import Image, ImageDraw from pathlib import Path from rich.logging import RichHandler from pytorch_lightnin...
49.955959
172
0.620858
#! /usr/bin/env python import glob import time import torch import click import os.path import random import logging import pathlib import datetime import numpy as np import torchvision.transforms as tf from PIL import Image, ImageDraw from pathlib import Path from rich.logging import RichHandler from pytorch_lightnin...
9,201
0
157
69886e37db12958e6460c2b4e7e9a2b9adf662f5
430
py
Python
panGraphViewerWeb/pangraphviewer/models.py
q623928815/panGraphViewer
05ca341d74d3cbabcbbaa16f5d1be5292c217447
[ "MIT" ]
13
2021-08-05T09:01:35.000Z
2022-03-05T17:20:08.000Z
panGraphViewerWeb/pangraphviewer/models.py
q623928815/panGraphViewer
05ca341d74d3cbabcbbaa16f5d1be5292c217447
[ "MIT" ]
2
2021-08-05T13:01:58.000Z
2022-01-09T09:11:45.000Z
panGraphViewerWeb/pangraphviewer/models.py
q623928815/panGraphViewer
05ca341d74d3cbabcbbaa16f5d1be5292c217447
[ "MIT" ]
2
2021-08-14T03:58:25.000Z
2022-01-04T05:45:27.000Z
from django.db import models # Create your models here.
26.875
60
0.725581
from django.db import models # Create your models here. class Upload(models.Model): #image = models.ImageField(upload_to='images') image = models.FileField(upload_to='files') def __str__(self): return str(self.pk) class Profile(models.Model): user_id = models.AutoField(primary_key=True) ...
25
302
46
39fa3e4bb022ce4e7de1242c59424ed31de363f0
1,598
py
Python
util/archives.py
roteroktober/stromx
e081a35114f68a77e99a4761946b8b8c64eb591a
[ "Apache-2.0" ]
null
null
null
util/archives.py
roteroktober/stromx
e081a35114f68a77e99a4761946b8b8c64eb591a
[ "Apache-2.0" ]
null
null
null
util/archives.py
roteroktober/stromx
e081a35114f68a77e99a4761946b8b8c64eb591a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import argparse import os import re import shutil import zipfile parser = argparse.ArgumentParser() parser.add_argument('directory', type=str, nargs=1) group = parser.add_mutually_exclusive_group(required = True) group.add_argument('--extract', action='store_true') group.add_argument('--compre...
38.047619
66
0.536921
# -*- coding: utf-8 -*- import argparse import os import re import shutil import zipfile parser = argparse.ArgumentParser() parser.add_argument('directory', type=str, nargs=1) group = parser.add_mutually_exclusive_group(required = True) group.add_argument('--extract', action='store_true') group.add_argument('--compre...
0
0
0
8dc0317b820267511cd7dbce5551f965f80a08c5
4,594
py
Python
tests/core/test_prediction_problem_generator.py
FeatureLabs/Trane
04c18c2f2e2351706d2434ea355c01892bab22ae
[ "MIT" ]
31
2018-04-02T15:46:28.000Z
2022-01-22T02:41:44.000Z
tests/core/test_prediction_problem_generator.py
FeatureLabs/Trane
04c18c2f2e2351706d2434ea355c01892bab22ae
[ "MIT" ]
17
2018-04-26T19:17:28.000Z
2018-11-20T19:11:47.000Z
tests/core/test_prediction_problem_generator.py
FeatureLabs/Trane
04c18c2f2e2351706d2434ea355c01892bab22ae
[ "MIT" ]
13
2018-05-03T23:41:40.000Z
2021-09-27T00:53:48.000Z
"""TESTING STRATEGY Function: generate(self) 1. Ensure the correct # of problems are generated. 2. Generated problems are of proper type 3. Ensure prediction problems are generated in order of Filter->Row->Transformation->Aggregation """ import unittest import pandas as pd from mock import MagicMock, call, patch f...
34.80303
79
0.614497
"""TESTING STRATEGY Function: generate(self) 1. Ensure the correct # of problems are generated. 2. Generated problems are of proper type 3. Ensure prediction problems are generated in order of Filter->Row->Transformation->Aggregation """ import unittest import pandas as pd from mock import MagicMock, call, patch f...
1,520
1,867
50
d102d09522f569e78de5c05b74c53dceac5c7cdc
17,668
py
Python
source/pydwf/core/api/digital_spi.py
sidneycadot/pydwf
cd9eba8b45d990f09095bec62b20115f0757baba
[ "MIT" ]
14
2021-05-10T16:19:45.000Z
2022-03-13T08:30:12.000Z
source/pydwf/core/api/digital_spi.py
sidneycadot/pydwf
cd9eba8b45d990f09095bec62b20115f0757baba
[ "MIT" ]
22
2021-05-01T09:51:09.000Z
2021-11-13T12:35:36.000Z
source/pydwf/core/api/digital_spi.py
sidneycadot/pydwf
cd9eba8b45d990f09095bec62b20115f0757baba
[ "MIT" ]
2
2021-05-02T12:13:16.000Z
2022-03-11T21:15:07.000Z
"""The |pydwf.core.api.digital_spi| module implements a single class: |DigitalSpi|.""" from typing import List from pydwf.core.dwf_device_subapi import AbstractDwfDeviceSubApi from pydwf.core.auxiliary.typespec_ctypes import typespec_ctypes from pydwf.core.auxiliary.constants import RESULT_SUCCESS from pydwf.core.au...
31.050967
105
0.553883
"""The |pydwf.core.api.digital_spi| module implements a single class: |DigitalSpi|.""" from typing import List from pydwf.core.dwf_device_subapi import AbstractDwfDeviceSubApi from pydwf.core.auxiliary.typespec_ctypes import typespec_ctypes from pydwf.core.auxiliary.constants import RESULT_SUCCESS from pydwf.core.au...
0
0
0
01b3e8f71a828e37adfa40af2be365af344a02c3
2,591
py
Python
buildProjectDocumentation.py
pktrigg/DocumentDelivery
fabcd39441653797d2083edb1cf642ebf1196d01
[ "Apache-2.0" ]
2
2019-04-30T02:13:44.000Z
2019-04-30T02:13:54.000Z
buildProjectDocumentation.py
pktrigg/DocumentDelivery
fabcd39441653797d2083edb1cf642ebf1196d01
[ "Apache-2.0" ]
null
null
null
buildProjectDocumentation.py
pktrigg/DocumentDelivery
fabcd39441653797d2083edb1cf642ebf1196d01
[ "Apache-2.0" ]
null
null
null
#created p.kennedy@fugro.com #created: May 2015 #Based on twitter bootstrap import os import sys import re import time import datetime # set an include path sys.path.append("./_bootstrap/_scripts") import zBMS import scan import whatsNew # import repairMenu outputFileName = "index.html" ignoreFolders = ['trash', '...
31.597561
101
0.764956
#created p.kennedy@fugro.com #created: May 2015 #Based on twitter bootstrap import os import sys import re import time import datetime # set an include path sys.path.append("./_bootstrap/_scripts") import zBMS import scan import whatsNew # import repairMenu outputFileName = "index.html" ignoreFolders = ['trash', '...
0
0
0
1845773d797a18574b396466b48f7eead0777656
1,121
py
Python
f1tenth_gym/envs/tasks.py
axelbr/f1tenth_gym
ee220fef9ed3973259fd164756b4a99be9a3f632
[ "MIT" ]
null
null
null
f1tenth_gym/envs/tasks.py
axelbr/f1tenth_gym
ee220fef9ed3973259fd164756b4a99be9a3f632
[ "MIT" ]
null
null
null
f1tenth_gym/envs/tasks.py
axelbr/f1tenth_gym
ee220fef9ed3973259fd164756b4a99be9a3f632
[ "MIT" ]
null
null
null
import abc from abc import ABC from typing import Any import numpy as np
23.851064
82
0.624442
import abc from abc import ABC from typing import Any import numpy as np class Task(ABC): @abc.abstractmethod def reward(self, state: Any, action: Any, next_state: Any = None) -> float: pass @abc.abstractmethod def done(self, state: Any) -> bool: pass def reset(self) -> None: ...
669
146
231
19fb694bd712315309184b4c64de1903dd99d3d8
2,374
py
Python
srcs/mazes_main.py
ChampiB/POMCP
af6b7f9df3476126abad2adf21cc618e1d9898d1
[ "MIT" ]
null
null
null
srcs/mazes_main.py
ChampiB/POMCP
af6b7f9df3476126abad2adf21cc618e1d9898d1
[ "MIT" ]
null
null
null
srcs/mazes_main.py
ChampiB/POMCP
af6b7f9df3476126abad2adf21cc618e1d9898d1
[ "MIT" ]
null
null
null
from srcs.environments.MazeEnv import MazeEnv from srcs.agent.POMCP import POMCP import time import math if __name__ == "__main__": # Create the environment MAZE_FILE_NAME = "5.maze" env = MazeEnv("./mazes/" + MAZE_FILE_NAME) LOCAL_MINIMA = env.get_local_minima(MAZE_FILE_NAME) S = env.states_list(...
32.520548
105
0.627211
from srcs.environments.MazeEnv import MazeEnv from srcs.agent.POMCP import POMCP import time import math if __name__ == "__main__": # Create the environment MAZE_FILE_NAME = "5.maze" env = MazeEnv("./mazes/" + MAZE_FILE_NAME) LOCAL_MINIMA = env.get_local_minima(MAZE_FILE_NAME) S = env.states_list(...
0
0
0
69ca2ca35b80c9e593d1ce4f32abc074a09604df
1,518
py
Python
utils.py
Avashist1998/Morning_view_mode
d597b517e714fcf9a16286482bcc58dc023ad2f8
[ "MIT" ]
1
2021-06-04T07:20:55.000Z
2021-06-04T07:20:55.000Z
utils.py
Avashist1998/Morning_view_mode
d597b517e714fcf9a16286482bcc58dc023ad2f8
[ "MIT" ]
null
null
null
utils.py
Avashist1998/Morning_view_mode
d597b517e714fcf9a16286482bcc58dc023ad2f8
[ "MIT" ]
null
null
null
import numpy as np from os import getcwd, path from cv2 import imread, IMREAD_COLOR def read_image(path=None): ''' Read an image from a path Path is relative path or full path ''' base_path = getcwd() full_path = path.join(base_path,path) if base_path in path: full_path = pa...
30.36
96
0.620553
import numpy as np from os import getcwd, path from cv2 import imread, IMREAD_COLOR def read_image(path=None): ''' Read an image from a path Path is relative path or full path ''' base_path = getcwd() full_path = path.join(base_path,path) if base_path in path: full_path = pa...
890
0
69
b5152d0b0885d2eca41687730c8b29cfd3d8aac3
27,039
py
Python
tests/tape/interfaces/test_tape_autograd.py
anthayes92/pennylane
57734bbefadd7628d72b58bb2b0efea195cfd286
[ "Apache-2.0" ]
1
2020-10-15T01:09:27.000Z
2020-10-15T01:09:27.000Z
tests/tape/interfaces/test_tape_autograd.py
anthayes92/pennylane
57734bbefadd7628d72b58bb2b0efea195cfd286
[ "Apache-2.0" ]
null
null
null
tests/tape/interfaces/test_tape_autograd.py
anthayes92/pennylane
57734bbefadd7628d72b58bb2b0efea195cfd286
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # 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 applicabl...
36.888131
101
0.522246
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # 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 applicabl...
7,039
-8
961
e92a98bf4986fdb2e9e8cb59b7d590d3a5b15061
2,082
py
Python
tests/endpoints/test_account_token.py
eruvanos/warehouse14
a03c2b8e287368b77338cc1eb283c5a762f23104
[ "MIT" ]
2
2021-12-09T18:29:54.000Z
2022-02-23T13:59:36.000Z
tests/endpoints/test_account_token.py
eruvanos/warehouse14
a03c2b8e287368b77338cc1eb283c5a762f23104
[ "MIT" ]
5
2021-07-13T04:29:42.000Z
2021-10-14T08:31:39.000Z
tests/endpoints/test_account_token.py
eruvanos/warehouse14
a03c2b8e287368b77338cc1eb283c5a762f23104
[ "MIT" ]
1
2021-07-15T07:05:06.000Z
2021-07-15T07:05:06.000Z
import requests_html from pytest import fixture from requests_html import HTMLResponse from wsgiadapter import WSGIAdapter from tests.endpoints import login from warehouse14 import create_app @fixture @fixture
26.35443
87
0.68828
import requests_html from pytest import fixture from requests_html import HTMLResponse from wsgiadapter import WSGIAdapter from tests.endpoints import login from warehouse14 import create_app @fixture def app(db, storage, authenticator): app = create_app(db, storage, authenticator) app.debug = True retur...
1,727
0
136
bf221672f7c8a4902f6b355383fd12f3f97c36b4
252
py
Python
answers/Nitish1702/Day6/Answer1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
22
2021-03-16T14:07:47.000Z
2021-08-13T08:52:50.000Z
answers/Nitish1702/Day6/Answer1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
174
2021-03-16T21:16:40.000Z
2021-06-12T05:19:51.000Z
answers/Nitish1702/Day6/Answer1.py
arc03/30-DaysOfCode-March-2021
6d6e11bf70280a578113f163352fa4fa8408baf6
[ "MIT" ]
135
2021-03-16T16:47:12.000Z
2021-06-27T14:22:38.000Z
l=input("CANDIES: ").lstrip("[").rstrip("]") t=l.split(",") boolist=[] n= int(input("EXTRA CANDIES: ")) for i in range(len(t)): if int(t[i])+n>=int(max(t)): boolist.append("True") else: boolist.append("False") print(boolist)
22.909091
44
0.559524
l=input("CANDIES: ").lstrip("[").rstrip("]") t=l.split(",") boolist=[] n= int(input("EXTRA CANDIES: ")) for i in range(len(t)): if int(t[i])+n>=int(max(t)): boolist.append("True") else: boolist.append("False") print(boolist)
0
0
0
427ed1b45bd9acc71f91723b1a57e63ae7c1f115
5,268
py
Python
autovizwidget/autovizwidget/tests/test_plotlygraphs.py
sciserver/sparkmagic
ac0852cbe88a41faa368cf1e1c89045a2de973bf
[ "RSA-MD" ]
1,141
2015-09-21T20:52:00.000Z
2022-03-31T14:15:51.000Z
autovizwidget/autovizwidget/tests/test_plotlygraphs.py
sciserver/sparkmagic
ac0852cbe88a41faa368cf1e1c89045a2de973bf
[ "RSA-MD" ]
605
2015-09-23T23:27:43.000Z
2022-03-16T07:46:52.000Z
autovizwidget/autovizwidget/tests/test_plotlygraphs.py
sciserver/sparkmagic
ac0852cbe88a41faa368cf1e1c89045a2de973bf
[ "RSA-MD" ]
442
2015-09-23T21:31:28.000Z
2022-03-13T15:19:57.000Z
import pandas as pd from mock import MagicMock from ..plotlygraphs.graphbase import GraphBase from ..plotlygraphs.piegraph import PieGraph from ..plotlygraphs.datagraph import DataGraph from ..widget.encoding import Encoding from ..widget.invalidencodingerror import InvalidEncodingError
43.180328
120
0.64104
import pandas as pd from mock import MagicMock from ..plotlygraphs.graphbase import GraphBase from ..plotlygraphs.piegraph import PieGraph from ..plotlygraphs.datagraph import DataGraph from ..widget.encoding import Encoding from ..widget.invalidencodingerror import InvalidEncodingError def test_graph_base_display_m...
4,835
0
138
aba521846c16917007362546f863e685b09e3a92
963
py
Python
galaxy/main/migrations/0002_auto_20150824_1342.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
galaxy/main/migrations/0002_auto_20150824_1342.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
galaxy/main/migrations/0002_auto_20150824_1342.py
SamyCoenen/galaxy
7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e
[ "Apache-2.0" ]
null
null
null
# NOTE(cutwater): This migration is replaced by v2_4_0 and should be # deleted once superseding migration is merged into master. from django.db import migrations
25.342105
68
0.556594
# NOTE(cutwater): This migration is replaced by v2_4_0 and should be # deleted once superseding migration is merged into master. from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( ...
0
775
23
13211b63c9ef6ff265882d203f5807eb77a45c16
7,973
py
Python
landgrab.py
tangrams/landgrab
217699e4730a1bdb7c9e03bfd9c2c0c31950eb7c
[ "MIT" ]
20
2015-02-26T15:55:42.000Z
2021-07-30T00:19:31.000Z
landgrab.py
tangrams/landgrab
217699e4730a1bdb7c9e03bfd9c2c0c31950eb7c
[ "MIT" ]
1
2018-04-02T12:13:30.000Z
2021-10-04T00:59:38.000Z
landgrab.py
tangrams/landgrab
217699e4730a1bdb7c9e03bfd9c2c0c31950eb7c
[ "MIT" ]
5
2015-03-03T23:31:39.000Z
2018-01-17T03:13:34.000Z
# todo: handle cases where the boundary crosses the dateline # usage: # python landgrab.py [osm id] [zoom level] [optional list-only flag] import requests, json, math, sys, os import xml.etree.ElementTree as ET import pprint if len(sys.argv) < 3: print "At least 2 arguments needed - please enter an OSM ID and zoo...
31.023346
154
0.572056
# todo: handle cases where the boundary crosses the dateline # usage: # python landgrab.py [osm id] [zoom level] [optional list-only flag] import requests, json, math, sys, os import xml.etree.ElementTree as ET import pprint if len(sys.argv) < 3: print "At least 2 arguments needed - please enter an OSM ID and zoo...
5,241
0
111
0233556465378f52f8e0c9b96010bffb6dee39d0
714
py
Python
e-gov Hackathon/ReplyBot1/test.py
chellabeatrixkiddo/MTechAssignments
327159c44e91872ff539ec15d6c8e066b6cfef4c
[ "CC0-1.0" ]
null
null
null
e-gov Hackathon/ReplyBot1/test.py
chellabeatrixkiddo/MTechAssignments
327159c44e91872ff539ec15d6c8e066b6cfef4c
[ "CC0-1.0" ]
null
null
null
e-gov Hackathon/ReplyBot1/test.py
chellabeatrixkiddo/MTechAssignments
327159c44e91872ff539ec15d6c8e066b6cfef4c
[ "CC0-1.0" ]
null
null
null
import tweepy from keys import keys CONSUMER_KEY = keys['consumer_key'] CONSUMER_SECRET = keys['consumer_secret'] ACCESS_TOKEN = keys['access_token'] ACCESS_TOKEN_SECRET = keys['access_token_secret'] auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) a...
27.461538
70
0.645658
import tweepy from keys import keys CONSUMER_KEY = keys['consumer_key'] CONSUMER_SECRET = keys['consumer_secret'] ACCESS_TOKEN = keys['access_token'] ACCESS_TOKEN_SECRET = keys['access_token_secret'] auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) a...
0
0
0
31798a13dc457f168afe39f5703df56d9635b651
74
py
Python
cobain/structure/__init__.py
gecheline/cobain-code
4f1c0e9c08d23bf7b5f57cc5af0fbf904d5109f7
[ "MIT" ]
2
2018-04-24T14:13:16.000Z
2018-04-24T14:13:19.000Z
cobain/structure/__init__.py
gecheline/cobain01
4f1c0e9c08d23bf7b5f57cc5af0fbf904d5109f7
[ "MIT" ]
1
2018-10-22T17:08:40.000Z
2018-10-22T17:08:40.000Z
cobain/structure/__init__.py
gecheline/cobain01
4f1c0e9c08d23bf7b5f57cc5af0fbf904d5109f7
[ "MIT" ]
null
null
null
from constants import * from polytropes import * from potentials import *
18.5
24
0.797297
from constants import * from polytropes import * from potentials import *
0
0
0
0a569b30a97a6e6fe704519e61b6543be9162f24
77
py
Python
File Vault/src/webApp/utils/app/__init__.py
comvx/File-Vault
305166a647f9cb001274250a96ea19c7dba1e369
[ "MIT", "Unlicense" ]
3
2021-01-20T17:26:41.000Z
2022-03-14T17:39:44.000Z
File Vault/dev enviroment/src/webApp/utils/app/__init__.py
comvx/File-Vault
305166a647f9cb001274250a96ea19c7dba1e369
[ "MIT", "Unlicense" ]
null
null
null
File Vault/dev enviroment/src/webApp/utils/app/__init__.py
comvx/File-Vault
305166a647f9cb001274250a96ea19c7dba1e369
[ "MIT", "Unlicense" ]
null
null
null
from webApp.utils.app.routes import * from webApp.utils.app.forms import auth
38.5
39
0.818182
from webApp.utils.app.routes import * from webApp.utils.app.forms import auth
0
0
0
1b65f7b9f00421ed6ead25d24ae20f352063576b
2,669
py
Python
gateware/rtl/video/framer.py
gregdavill/DiVA-firmware
2d67d8e5dd15c4a7863616979309700c3aeb74a2
[ "BSD-2-Clause" ]
9
2020-11-07T02:50:52.000Z
2021-11-29T19:46:18.000Z
gateware/rtl/video/framer.py
gregdavill/DiVA-firmware
2d67d8e5dd15c4a7863616979309700c3aeb74a2
[ "BSD-2-Clause" ]
17
2020-11-01T00:30:17.000Z
2021-09-19T05:39:44.000Z
gateware/rtl/video/framer.py
gregdavill/DiVA-firmware
2d67d8e5dd15c4a7863616979309700c3aeb74a2
[ "BSD-2-Clause" ]
2
2020-09-27T13:39:46.000Z
2021-06-18T20:54:48.000Z
# This file is Copyright (c) 2020 Gregory Davill <greg.davill@gmail.com> # License: BSD from migen import * from litex.soc.interconnect.stream import Endpoint from rtl.edge_detect import EdgeDetect from litex.soc.interconnect.csr import AutoCSR, CSR, CSRStatus, CSRStorage from litex.soc.interconnect.stream import End...
30.329545
87
0.498689
# This file is Copyright (c) 2020 Gregory Davill <greg.davill@gmail.com> # License: BSD from migen import * from litex.soc.interconnect.stream import Endpoint from rtl.edge_detect import EdgeDetect from litex.soc.interconnect.csr import AutoCSR, CSR, CSRStatus, CSRStorage from litex.soc.interconnect.stream import End...
2,231
9
72
6b06fbd8744ffcbc1d05513c367e6f1c03a4f40c
17,612
py
Python
alife/stats.py
flags/Reactor-3
b41a2904c9ec8cc14bcee03611602d0e568acf12
[ "MIT" ]
56
2015-04-20T08:31:29.000Z
2021-12-19T14:05:18.000Z
alife/stats.py
HexDecimal/Reactor-3
b41a2904c9ec8cc14bcee03611602d0e568acf12
[ "MIT" ]
2
2018-07-24T11:24:41.000Z
2021-05-16T03:04:53.000Z
alife/stats.py
HexDecimal/Reactor-3
b41a2904c9ec8cc14bcee03611602d0e568acf12
[ "MIT" ]
9
2015-11-03T02:56:20.000Z
2021-04-28T08:19:57.000Z
from globals import * import life as lfe import historygen import judgement import survival import speech import groups import combat import camps import sight import brain import zones import bad_numbers import logging import random MAX_INFLUENCE_FROM = 80 MAX_INTROVERSION = 10 MAX_CHARISMA = 9
25.824047
152
0.718544
from globals import * import life as lfe import historygen import judgement import survival import speech import groups import combat import camps import sight import brain import zones import bad_numbers import logging import random MAX_INFLUENCE_FROM = 80 MAX_INTROVERSION = 10 MAX_CHARISMA = 9 def init(life): l...
15,748
0
1,564
6a7d4a0082b0eb7a570ad9c0c1c8abfa45a66d5b
1,930
py
Python
ndvi.py
ismailsunni/docker-qgis3-model
04d98564b04253dc19810ebc6ebb1d679292cd13
[ "MIT" ]
2
2019-06-03T20:17:39.000Z
2020-09-11T08:40:24.000Z
ndvi.py
ismailsunni/docker-qgis3-model
04d98564b04253dc19810ebc6ebb1d679292cd13
[ "MIT" ]
null
null
null
ndvi.py
ismailsunni/docker-qgis3-model
04d98564b04253dc19810ebc6ebb1d679292cd13
[ "MIT" ]
1
2019-06-27T21:59:29.000Z
2019-06-27T21:59:29.000Z
from qgis.core import QgsProcessing from qgis.core import QgsProcessingAlgorithm from qgis.core import QgsProcessingMultiStepFeedback from qgis.core import QgsProcessingParameterRasterLayer from qgis.core import QgsProcessingParameterRasterDestination import processing
38.6
150
0.691192
from qgis.core import QgsProcessing from qgis.core import QgsProcessingAlgorithm from qgis.core import QgsProcessingMultiStepFeedback from qgis.core import QgsProcessingParameterRasterLayer from qgis.core import QgsProcessingParameterRasterDestination import processing class Calculate_ndvi(QgsProcessingAlgorithm): ...
1,423
24
212
03b515f57dd956e4947044b58411862c28b988fe
6,241
py
Python
bof_torch.py
xujli/cbof_torch
ed8d67dd7a41b6345305d970d0f8fa0892f8ccee
[ "MIT" ]
null
null
null
bof_torch.py
xujli/cbof_torch
ed8d67dd7a41b6345305d970d0f8fa0892f8ccee
[ "MIT" ]
null
null
null
bof_torch.py
xujli/cbof_torch
ed8d67dd7a41b6345305d970d0f8fa0892f8ccee
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F import torch from sklearn.cluster import KMeans from sklearn.metrics.pairwise import pairwise_distances import numpy as np def initialize_bof_layers(model, data_loader, n_samples=100, n_feature_samples=5000, batch_size=32, k_means_max_iters=300, ...
43.340278
122
0.617529
import torch.nn as nn import torch.nn.functional as F import torch from sklearn.cluster import KMeans from sklearn.metrics.pairwise import pairwise_distances import numpy as np class BoF_Pooling(nn.Module): def __init__(self, n_codewords, features, spatial_level=0, **kwargs): super(BoF_Pooling, self).__ini...
3,091
8
156
1f52ae0846d6b5f387a3df82623f2baf524401d1
810
py
Python
examples/ping_pong.py
arago/gevent-tiny-actorsystem
f55abee8bd2089a9965a517e9fc6126ab5476f87
[ "MIT" ]
null
null
null
examples/ping_pong.py
arago/gevent-tiny-actorsystem
f55abee8bd2089a9965a517e9fc6126ab5476f87
[ "MIT" ]
null
null
null
examples/ping_pong.py
arago/gevent-tiny-actorsystem
f55abee8bd2089a9965a517e9fc6126ab5476f87
[ "MIT" ]
2
2019-11-28T22:07:17.000Z
2021-07-01T09:01:15.000Z
#!/usr/bin/env python3 from gevent import monkey; monkey.patch_all() from arago.actors import Actor, Root import arago.actors.pattern_matching as matching from arago.common.logging import getCustomLogger logger = getCustomLogger(level="WARNING") players = [PingPong(name="Player One"), PingPong(name="Player Two")] pl...
27
68
0.739506
#!/usr/bin/env python3 from gevent import monkey; monkey.patch_all() from arago.actors import Actor, Root import arago.actors.pattern_matching as matching from arago.common.logging import getCustomLogger logger = getCustomLogger(level="WARNING") class PingPong(Actor): def serve(self, opponent): opponent.tell("Ping...
147
247
23
ddbd2047a7b0a039506309a52d105624b98a0fcf
553
py
Python
labs/lab-05/scripts/sb_sample_app.py
AndreyVoytuk/bigdata-playground-master
9faf3ca7ca5642a737f477768d4ddee9e5e81009
[ "Apache-2.0" ]
4
2019-09-16T07:02:57.000Z
2020-07-09T10:12:58.000Z
labs/lab-05/scripts/sb_sample_app.py
AndreyVoytuk/bigdata-playground-master
9faf3ca7ca5642a737f477768d4ddee9e5e81009
[ "Apache-2.0" ]
null
null
null
labs/lab-05/scripts/sb_sample_app.py
AndreyVoytuk/bigdata-playground-master
9faf3ca7ca5642a737f477768d4ddee9e5e81009
[ "Apache-2.0" ]
4
2019-09-15T20:44:51.000Z
2019-09-27T18:31:23.000Z
import pyspark import random if __name__ == "__main__": sc_conf = pyspark.SparkConf() sc_conf.setAppName("pi-app") sc_conf.setMaster('spark://spark-master-01:7077') sc_conf.set('spark.executor.cores','1') sc_conf.set("spark.executor.memory", '1g') sc = pyspark.SparkContext(conf=sc_conf) num_samples = ...
21.269231
70
0.669078
import pyspark import random if __name__ == "__main__": sc_conf = pyspark.SparkConf() sc_conf.setAppName("pi-app") sc_conf.setMaster('spark://spark-master-01:7077') sc_conf.set('spark.executor.cores','1') sc_conf.set("spark.executor.memory", '1g') sc = pyspark.SparkContext(conf=sc_conf) num_samples = ...
67
0
25
e7adba8b2cf3c64b73de2096ac44fc8cf879a089
4,772
py
Python
bika/lims/jsonapi/read.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/jsonapi/read.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/jsonapi/read.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
from Products.CMFPlone.utils import safe_unicode from bika.lims import logger, to_utf8 from bika.lims.interfaces import IJSONReadExtender from bika.lims.jsonapi import get_include_fields from plone.jsonapi.core import router from plone.jsonapi.core.interfaces import IRouteProvider from plone.protect.authenticator impor...
32.910345
80
0.64627
from Products.CMFPlone.utils import safe_unicode from bika.lims import logger, to_utf8 from bika.lims.interfaces import IJSONReadExtender from bika.lims.jsonapi import get_include_fields from plone.jsonapi.core import router from plone.jsonapi.core.interfaces import IRouteProvider from plone.protect.authenticator impor...
3,394
756
46
481f134705f71ab0bcdea34d192dfce72053ecc1
2,112
py
Python
cpgames/modules/core/tankwar/modules/interfaces/switchinterface.py
Wasabii88/Games
33262ca1958207a24e57e3532feded7e275b1dd1
[ "MIT" ]
1
2022-02-27T10:33:41.000Z
2022-02-27T10:33:41.000Z
cpgames/modules/core/tankwar/modules/interfaces/switchinterface.py
beiwei365/Games
f6499f378802d3212a08aeca761191b58714b7f0
[ "MIT" ]
null
null
null
cpgames/modules/core/tankwar/modules/interfaces/switchinterface.py
beiwei365/Games
f6499f378802d3212a08aeca761191b58714b7f0
[ "MIT" ]
null
null
null
''' Function: 关卡切换界面 Author: Charles 微信公众号: Charles的皮卡丘 ''' import pygame from .....utils import QuitGame '''关卡切换界面'''
39.111111
161
0.671875
''' Function: 关卡切换界面 Author: Charles 微信公众号: Charles的皮卡丘 ''' import pygame from .....utils import QuitGame '''关卡切换界面''' def SwitchLevelIterface(screen, cfg, resource_loader, level_next=1): background_img = resource_loader.images['others']['background'] color_white = (255, 255, 255) color_gray =...
2,002
0
22
19a72e22b7b667c3b7c010898f69b0fa5b3d7a52
10,009
py
Python
entso_data_clean.py
hungchristine/ReDyFEV
b40d9df43c7b2611fba9f34501e69c2df6b5b5b2
[ "BSD-3-Clause" ]
null
null
null
entso_data_clean.py
hungchristine/ReDyFEV
b40d9df43c7b2611fba9f34501e69c2df6b5b5b2
[ "BSD-3-Clause" ]
null
null
null
entso_data_clean.py
hungchristine/ReDyFEV
b40d9df43c7b2611fba9f34501e69c2df6b5b5b2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Reads in the raw data fetched from ENTSO-E Transparency Platform, refactors the data and fills in missing data """ import pandas as pd import numpy as np from datetime import datetime, date, time, timezone, timedelta import pickle import os import logging #%% def aggregate_entso(dictiona...
46.124424
198
0.593866
# -*- coding: utf-8 -*- """ Reads in the raw data fetched from ENTSO-E Transparency Platform, refactors the data and fills in missing data """ import pandas as pd import numpy as np from datetime import datetime, date, time, timezone, timedelta import pickle import os import logging #%% def checkEqual(iterator): ...
5,115
0
91
01aaf6de57071dcdf6b605b4f73dddb353bd903a
949
py
Python
engine/dictionary.py
blubits/unscramble
a90da49b593a29b8968799e1995814e9c9df379c
[ "MIT" ]
null
null
null
engine/dictionary.py
blubits/unscramble
a90da49b593a29b8968799e1995814e9c9df379c
[ "MIT" ]
null
null
null
engine/dictionary.py
blubits/unscramble
a90da49b593a29b8968799e1995814e9c9df379c
[ "MIT" ]
null
null
null
""" A dictionary of words. :Author: Maded Batara III :Version: v20181010 """ from collections import Counter from .dictionary_query import DictionaryQuery class Dictionary(DictionaryQuery): """A dictionary of words. As this is a subclass of DictionaryQuery, this class supports all its methods.""...
24.973684
73
0.61117
""" A dictionary of words. :Author: Maded Batara III :Version: v20181010 """ from collections import Counter from .dictionary_query import DictionaryQuery class Dictionary(DictionaryQuery): """A dictionary of words. As this is a subclass of DictionaryQuery, this class supports all its methods.""...
0
0
0
161ba4ce1425c6adbab5f5ea95ba45d85ab47903
6,770
py
Python
emulator/cr.py
Adancurusul/UR408_Core
077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159
[ "MIT" ]
4
2020-07-13T03:12:19.000Z
2021-08-03T02:09:28.000Z
emulator/cr.py
Adancurusul/UR408_Core
077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159
[ "MIT" ]
null
null
null
emulator/cr.py
Adancurusul/UR408_Core
077712cb3d2a2dd3d9d1a0eeaae2bc71b632e159
[ "MIT" ]
null
null
null
from myhdl import * @block def cr(pc_next,branch_offset,r6_r7_data,cr_data,clk,rst,int0,int1,int2,int3,mem_read,mem_write,mem_ok,branch,selector,cr_write,ret,apc,jmp,bra ,main_state): ''' :param clk: 1 in clk :param rst: 1 in rst :param int0: 1 in interrupt :param int1: 1 in interrupt ...
29.181034
142
0.538109
from myhdl import * @block def cr(pc_next,branch_offset,r6_r7_data,cr_data,clk,rst,int0,int1,int2,int3,mem_read,mem_write,mem_ok,branch,selector,cr_write,ret,apc,jmp,bra ,main_state): ''' :param clk: 1 in clk :param rst: 1 in rst :param int0: 1 in interrupt :param int1: 1 in interrupt ...
3,522
0
312
837c2bb49c43c7827b7da66e16ade1f183903c41
3,994
py
Python
CinderMetrics.py
dloucasfx/collectd-openstack
05a0e4657ff28a9c2cccb13b61144c702ec766cc
[ "Apache-2.0" ]
null
null
null
CinderMetrics.py
dloucasfx/collectd-openstack
05a0e4657ff28a9c2cccb13b61144c702ec766cc
[ "Apache-2.0" ]
null
null
null
CinderMetrics.py
dloucasfx/collectd-openstack
05a0e4657ff28a9c2cccb13b61144c702ec766cc
[ "Apache-2.0" ]
null
null
null
import sys from os import path import inspect from keystoneauth1 import identity from keystoneauth1 import session from cinderclient import client import re METRIC_NAME_PREFIX = "openstack." CINDER_LIMIT_PREFIX = "cinder.limit." CINDER_VOLUME_PREFIX = "cinder.volume." CINDER_SNAPSHOT_PREFIX = "cinder.snapshot." DEFAU...
32.209677
85
0.593891
import sys from os import path import inspect from keystoneauth1 import identity from keystoneauth1 import session from cinderclient import client import re METRIC_NAME_PREFIX = "openstack." CINDER_LIMIT_PREFIX = "cinder.limit." CINDER_VOLUME_PREFIX = "cinder.volume." CINDER_SNAPSHOT_PREFIX = "cinder.snapshot." DEFAU...
3,484
-1
157