hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7275f87f8a46c54c59aa154abe1e2df4f3c1c6d
18,246
py
Python
tests/core/test_datamodules.py
lsqshr/pytorch-lightning
c6b68883879e38719688865aceac746477f0a9b9
[ "Apache-2.0" ]
null
null
null
tests/core/test_datamodules.py
lsqshr/pytorch-lightning
c6b68883879e38719688865aceac746477f0a9b9
[ "Apache-2.0" ]
null
null
null
tests/core/test_datamodules.py
lsqshr/pytorch-lightning
c6b68883879e38719688865aceac746477f0a9b9
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
33.478899
120
0.71961
import pickle from argparse import ArgumentParser from typing import Any, Dict from unittest import mock from unittest.mock import call, PropertyMock import pytest import torch from pytorch_lightning import LightningDataModule, Trainer from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_...
true
true
f7275fe5fae95e29aeb9f0a69b69a28a48dc9e9a
2,048
py
Python
jupyter_resource_usage/tests/test_basic.py
fcollonval/jupyter-resource-usage
77ef2341efdee67a1457b6c6a0de5e001ca4c3aa
[ "BSD-2-Clause" ]
1
2021-03-20T09:24:46.000Z
2021-03-20T09:24:46.000Z
jupyter_resource_usage/tests/test_basic.py
fcollonval/jupyter-resource-usage
77ef2341efdee67a1457b6c6a0de5e001ca4c3aa
[ "BSD-2-Clause" ]
null
null
null
jupyter_resource_usage/tests/test_basic.py
fcollonval/jupyter-resource-usage
77ef2341efdee67a1457b6c6a0de5e001ca4c3aa
[ "BSD-2-Clause" ]
null
null
null
from mock import MagicMock from mock import patch class TestBasic: """Some basic tests, checking import, making sure APIs remain consistent, etc""" def test_import_serverextension(self): """Check that serverextension hooks are available""" from jupyter_resource_usage import ( _jup...
35.929825
87
0.625488
from mock import MagicMock from mock import patch class TestBasic: def test_import_serverextension(self): from jupyter_resource_usage import ( _jupyter_server_extension_paths, _jupyter_nbextension_paths, load_jupyter_server_extension, ) assert _jupyter...
true
true
f7275ff361eebaef39028e0b71a649811bfb8cc5
1,646
py
Python
multitrackpy/mtt.py
bbo-lab/multitrackpy
a25ebdb94969b0682c851ab69ba5895173b581d0
[ "BSD-3-Clause" ]
null
null
null
multitrackpy/mtt.py
bbo-lab/multitrackpy
a25ebdb94969b0682c851ab69ba5895173b581d0
[ "BSD-3-Clause" ]
null
null
null
multitrackpy/mtt.py
bbo-lab/multitrackpy
a25ebdb94969b0682c851ab69ba5895173b581d0
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import h5py from pprint import pprint def read_calib(mtt_path): mtt_file = h5py.File(mtt_path) istracking = np.squeeze(np.asarray([mtt_file['mt']['cam_istracking']]) == 1) calind = np.squeeze(np.int32(mtt_file['mt']['calind']))[istracking] - 1 mc = { 'Rglobal': np.asarray(m...
36.577778
119
0.600243
import numpy as np import h5py from pprint import pprint def read_calib(mtt_path): mtt_file = h5py.File(mtt_path) istracking = np.squeeze(np.asarray([mtt_file['mt']['cam_istracking']]) == 1) calind = np.squeeze(np.int32(mtt_file['mt']['calind']))[istracking] - 1 mc = { 'Rglobal': np.asarray(m...
true
true
f727605ce453fa3224aa6df44afa7128f0668b0c
2,544
py
Python
tao_action_recognition/data_generation/split_dataset.py
morrimeg/tao_toolkit_recipes
011f5426e2cec44af5b686d0c6225836460202f8
[ "MIT" ]
null
null
null
tao_action_recognition/data_generation/split_dataset.py
morrimeg/tao_toolkit_recipes
011f5426e2cec44af5b686d0c6225836460202f8
[ "MIT" ]
null
null
null
tao_action_recognition/data_generation/split_dataset.py
morrimeg/tao_toolkit_recipes
011f5426e2cec44af5b686d0c6225836460202f8
[ "MIT" ]
null
null
null
# Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
39.75
81
0.72445
import os import shutil import sys root_path = sys.argv[1] split_files_path = sys.argv[2] target_train_path = sys.argv[3] target_test_path = sys.argv[4] if not os.path.exists(target_train_path): os.makedirs(target_train_path) if not os.path.exists(target_test_path): os.makedirs(target_test...
true
true
f72760a70f1f2dd346effdba76e317afc3c4c200
458
py
Python
Tests/misc/eexec_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
2,705
2016-09-27T10:02:12.000Z
2022-03-31T09:37:46.000Z
Tests/misc/eexec_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
1,599
2016-09-27T09:07:36.000Z
2022-03-31T23:04:51.000Z
Tests/misc/eexec_test.py
odidev/fonttools
27b5f568f562971d7fbf64eeb027ea61e4939db4
[ "Apache-2.0", "MIT" ]
352
2016-10-07T04:18:15.000Z
2022-03-30T07:35:01.000Z
from fontTools.misc.eexec import decrypt, encrypt def test_decrypt(): testStr = b"\0\0asdadads asds\265" decryptedStr, R = decrypt(testStr, 12321) assert decryptedStr == b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1' assert R == 36142 def test_encrypt(): testStr = b'0d\nh\x15\xe8\xc4\xb2\x15\x1...
28.625
74
0.68559
from fontTools.misc.eexec import decrypt, encrypt def test_decrypt(): testStr = b"\0\0asdadads asds\265" decryptedStr, R = decrypt(testStr, 12321) assert decryptedStr == b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1' assert R == 36142 def test_encrypt(): testStr = b'0d\nh\x15\xe8\xc4\xb2\x15\x1...
true
true
f7276149bae5156f7cb9fe99fd0ec9a0e37e83ee
2,019
py
Python
jigsaw/migrations/0004_auto_20160315_2014.py
sxyu/Jiggly
af705453902b11d7bc1f298dce4698fdc9a470fe
[ "FSFAP" ]
3
2018-03-29T13:31:31.000Z
2022-02-26T04:49:40.000Z
jigsaw/migrations/0004_auto_20160315_2014.py
sxyu/Jiggly
af705453902b11d7bc1f298dce4698fdc9a470fe
[ "FSFAP" ]
null
null
null
jigsaw/migrations/0004_auto_20160315_2014.py
sxyu/Jiggly
af705453902b11d7bc1f298dce4698fdc9a470fe
[ "FSFAP" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-16 03:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import jigsaw.models class Migration(migrations.Migration): dependencies = [ ('jigsaw', '0003_auto_20160315_1733'), ...
36.709091
142
0.592372
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import jigsaw.models class Migration(migrations.Migration): dependencies = [ ('jigsaw', '0003_auto_20160315_1733'), ] operations = [ migrations.CreateModel( na...
true
true
f727619381755861c088ab5d8fb34a9eb7540f17
341
py
Python
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
2
2018-02-24T17:20:02.000Z
2018-02-24T17:25:43.000Z
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
null
null
null
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
null
null
null
class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ a=0 x=0 while(x<len(nums)): if nums[x]==val: nums.pop(x) x-=1 x+=1 ...
21.3125
39
0.384164
class Solution(object): def removeElement(self, nums, val): a=0 x=0 while(x<len(nums)): if nums[x]==val: nums.pop(x) x-=1 x+=1 return len(nums)
true
true
f727626a0369587c267d59e56782c18664512665
11,871
py
Python
django/contrib/admin/util.py
t11e/django
447f5375d378dba3bac1ded0306fa0d1b8ab55a4
[ "BSD-3-Clause" ]
1
2016-05-08T13:32:33.000Z
2016-05-08T13:32:33.000Z
django/contrib/admin/util.py
t11e/django
447f5375d378dba3bac1ded0306fa0d1b8ab55a4
[ "BSD-3-Clause" ]
null
null
null
django/contrib/admin/util.py
t11e/django
447f5375d378dba3bac1ded0306fa0d1b8ab55a4
[ "BSD-3-Clause" ]
null
null
null
from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.utils import formats from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.text import capfirst from django.utils.encoding import force_unicode, smart_unicode, smart_str from dja...
35.435821
94
0.598602
from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.utils import formats from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.text import capfirst from django.utils.encoding import force_unicode, smart_unicode, smart_str from dja...
true
true
f72762d80e22c0940fd6c0b7df91a5eb5427ea3d
18,819
py
Python
log_complete/model_403.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_403.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_403.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.354369
710
0.806525
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', ...
true
true
f72765a52a463ef2846870cae24daa680f1ff6c0
11,200
py
Python
toontown/catalog/CatalogAccessoryItemGlobals.py
CrankySupertoon01/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
toontown/catalog/CatalogAccessoryItemGlobals.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
toontown/catalog/CatalogAccessoryItemGlobals.py
CrankySupertoonArchive/Toontown-2
60893d104528a8e7eb4aced5d0015f22e203466d
[ "MIT" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
ATArticle = 0 ATString = 1 ATBasePrice = 2 ATReleased = 3 ATEmblemPrices = 4 AHat = 0 AGlasses = 1 ABackpack = 2 AShoes = 3 APriceBasic = 250 APriceBasicPlus = 400 APriceCool = 800 APriceAwesome = 1500 AccessoryTypes = {101: (AHat, 'hbb1', APriceBasic, 1), 102: (AHat, 'hsf1', APriceC...
15.176152
29
0.413304
ATArticle = 0 ATString = 1 ATBasePrice = 2 ATReleased = 3 ATEmblemPrices = 4 AHat = 0 AGlasses = 1 ABackpack = 2 AShoes = 3 APriceBasic = 250 APriceBasicPlus = 400 APriceCool = 800 APriceAwesome = 1500 AccessoryTypes = {101: (AHat, 'hbb1', APriceBasic, 1), 102: (AHat, 'hsf1', APriceC...
true
true
f727679b242e26a0cafd9fa4682d96dd99b90d0a
2,309
py
Python
Extra_python/Scripts/manualDel.py
JPGarCar/HORS
e06d4be00921d09f89406da5e64bbb5717c8bf07
[ "MIT" ]
1
2019-12-23T22:43:46.000Z
2019-12-23T22:43:46.000Z
Extra_python/Scripts/manualDel.py
JPGarCar/HORS
e06d4be00921d09f89406da5e64bbb5717c8bf07
[ "MIT" ]
18
2021-01-15T02:35:48.000Z
2021-12-08T17:39:51.000Z
Extra_python/Scripts/manualDel.py
JPGarCar/HORS
e06d4be00921d09f89406da5e64bbb5717c8bf07
[ "MIT" ]
null
null
null
from cs50 import SQL db = SQL("sqlite:///immuns.db") global currentUser def manualDel(number, curUser): stem = db.execute("SELECT * FROM :dataBase WHERE id=:ids", dataBase=curUser, ids=number) for stoop in stem: comm = stoop["committee"] db.execute("UPDATE generalList SET delegate_name = '' ...
69.969697
149
0.672152
from cs50 import SQL db = SQL("sqlite:///immuns.db") global currentUser def manualDel(number, curUser): stem = db.execute("SELECT * FROM :dataBase WHERE id=:ids", dataBase=curUser, ids=number) for stoop in stem: comm = stoop["committee"] db.execute("UPDATE generalList SET delegate_name = '' ...
true
true
f72767e3fe7d8c9e8e9895a0ec1f3c6a2f6fe9d2
1,765
py
Python
products/migrations/0001_initial.py
UB-ES-2021-A1/wannasell-backend
84360b2985fc28971867601373697f39303e396b
[ "Unlicense" ]
null
null
null
products/migrations/0001_initial.py
UB-ES-2021-A1/wannasell-backend
84360b2985fc28971867601373697f39303e396b
[ "Unlicense" ]
62
2021-11-22T21:52:44.000Z
2021-12-17T15:07:02.000Z
products/migrations/0001_initial.py
UB-ES-2021-A1/wannasell-backend
84360b2985fc28971867601373697f39303e396b
[ "Unlicense" ]
null
null
null
# Generated by Django 3.2.8 on 2021-10-18 11:53 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ...
51.911765
615
0.586969
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.BigAutoField(auto_create...
true
true
f727686cecf1ae4d8cd0131fdaf4bd65fedf922c
8,921
py
Python
python_samples/Python_Examples/ibm_db/ibm_db-special_columns.py
adrianmahjour/db2-samples
ff984aec81c5c08ce28443d896c0818cfae4f789
[ "Apache-2.0" ]
54
2019-08-02T13:15:07.000Z
2022-03-21T17:36:48.000Z
python_samples/Python_Examples/ibm_db/ibm_db-special_columns.py
junsulee75/db2-samples
d9ee03101cad1f9167eebc1609b4151559124017
[ "Apache-2.0" ]
13
2019-07-26T13:51:16.000Z
2022-03-25T21:43:52.000Z
python_samples/Python_Examples/ibm_db/ibm_db-special_columns.py
junsulee75/db2-samples
d9ee03101cad1f9167eebc1609b4151559124017
[ "Apache-2.0" ]
75
2019-07-20T04:53:24.000Z
2022-03-23T20:56:55.000Z
#! /usr/bin/python3 #-------------------------------------------------------------------------------------------------# # NAME: ibm_db-special_columns.py # # # ...
56.462025
99
0.512723
import sys import ibm_db from ibm_db_tools import Db2ConnectionMgr from ipynb_exit import exit dbName = "SAMPLE" userID = "db2inst1" passWord = "Passw0rd" dbConnection = None schemaName = userID.upper() tableName = "EMPLOYEE" resultSet = False dataRecord = False sqlDataTypes = {0 : "SQL_UNKNOWN_TY...
true
true
f72768f88bd6b9a784e985befa28896108619edb
3,690
py
Python
tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py
KamiGazi/PteraSoftware
3b6f6bfb8db776970674234cb524c338ecc82df1
[ "MIT" ]
null
null
null
tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py
KamiGazi/PteraSoftware
3b6f6bfb8db776970674234cb524c338ecc82df1
[ "MIT" ]
null
null
null
tests/integration/test_unsteady_ring_vortex_lattice_method_static_geometry.py
KamiGazi/PteraSoftware
3b6f6bfb8db776970674234cb524c338ecc82df1
[ "MIT" ]
null
null
null
"""This is a testing case for the unsteady ring vortex lattice method solver with static geometry. Based on an equivalent XFLR5 testing case, the expected output for this case is: CL: 0.588 CDi: 0.011 Cm: -0.197 Note: The expected output was created using XFLR5's inviscid VLM2 analysis type, wh...
32.946429
109
0.712737
import unittest import pterasoftware as ps from tests.integration.fixtures import solver_fixtures class TestUnsteadyRingVortexLatticeMethodStaticGeometry(unittest.TestCase): def setUp(self): self.unsteady_ring_vortex_lattice_method_validation_solver = ( solver_fixtures.make_unstead...
true
true
f7276a118dd544956c6a75767571b4963130bb32
192
py
Python
setup.py
ericlee0803/lookahead_release
373295f11be81d82b1c69eeadeec32ae96f26b1f
[ "MIT" ]
3
2020-06-17T20:25:12.000Z
2020-11-24T17:21:59.000Z
setup.py
ericlee0803/lookahead_release
373295f11be81d82b1c69eeadeec32ae96f26b1f
[ "MIT" ]
null
null
null
setup.py
ericlee0803/lookahead_release
373295f11be81d82b1c69eeadeec32ae96f26b1f
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='lookahead', version='0.0.2', packages=find_packages(), install_requires=['scikit-learn', 'scipy', 'numpy', 'qmcpy'] )
21.333333
64
0.671875
from setuptools import setup, find_packages setup( name='lookahead', version='0.0.2', packages=find_packages(), install_requires=['scikit-learn', 'scipy', 'numpy', 'qmcpy'] )
true
true
f7276a2c611535e6562f2d0b10dcd978082fd085
10,047
py
Python
gabriel/server/gabriel3/proxy/common.py
lee4138/6d-pose-estimation-with-ml-in-ar
e29162c82c867d4a8177322d7d49a55c5fd90639
[ "MIT" ]
7
2020-02-04T10:58:58.000Z
2021-11-26T07:37:22.000Z
gabriel/server/gabriel3/proxy/common.py
buaafw/6d-pose-estimation-with-ml-in-ar
e29162c82c867d4a8177322d7d49a55c5fd90639
[ "MIT" ]
1
2021-02-19T03:56:10.000Z
2021-02-19T03:56:10.000Z
gabriel/server/gabriel3/proxy/common.py
buaafw/6d-pose-estimation-with-ml-in-ar
e29162c82c867d4a8177322d7d49a55c5fd90639
[ "MIT" ]
8
2019-12-05T10:05:36.000Z
2021-01-27T14:09:53.000Z
#!/usr/bin/env python # # Cloudlet Infrastructure for Mobile Computing # # Author: Kiryong Ha <krha@cmu.edu> # Zhuo Chen <zhuoc@cs.cmu.edu> # # Copyright (C) 2011-2013 Carnegie Mellon University # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in com...
36.270758
159
0.643973
import json import multiprocessing import queue import select import socket import struct import sys import threading import time import traceback import gabriel3 LOG = gabriel3.logging.getLogger(__name__) class ProxyError(Exception): pass class SensorReceiveClient(gabriel3.network.Common...
true
true
f7276a69899ad99ba6680fb0b931907cb13b39e3
2,402
py
Python
src/wormhole/test/dilate/test_parse.py
dmgolembiowski/magic-wormhole
d517a10282d5e56f300db462b1a6eec517202af7
[ "MIT" ]
2,801
2021-01-10T16:37:14.000Z
2022-03-31T19:02:50.000Z
src/wormhole/test/dilate/test_parse.py
dmgolembiowski/magic-wormhole
d517a10282d5e56f300db462b1a6eec517202af7
[ "MIT" ]
52
2021-01-10T01:54:00.000Z
2022-03-11T13:12:41.000Z
src/wormhole/test/dilate/test_parse.py
dmgolembiowski/magic-wormhole
d517a10282d5e56f300db462b1a6eec517202af7
[ "MIT" ]
106
2021-01-21T14:32:22.000Z
2022-03-18T10:33:09.000Z
from __future__ import print_function, unicode_literals import mock from twisted.trial import unittest from ..._dilation.connection import (parse_record, encode_record, KCM, Ping, Pong, Open, Data, Close, Ack) class Parse(unittest.TestCase): def test_parse(self): self....
53.377778
85
0.594088
from __future__ import print_function, unicode_literals import mock from twisted.trial import unittest from ..._dilation.connection import (parse_record, encode_record, KCM, Ping, Pong, Open, Data, Close, Ack) class Parse(unittest.TestCase): def test_parse(self): self....
true
true
f7276c0f73e6ebdbc9164c77803a6a39d802249f
4,350
py
Python
tests/test_stream_xep_0047.py
marconfus/slixmpp
bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa
[ "BSD-3-Clause" ]
null
null
null
tests/test_stream_xep_0047.py
marconfus/slixmpp
bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa
[ "BSD-3-Clause" ]
null
null
null
tests/test_stream_xep_0047.py
marconfus/slixmpp
bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa
[ "BSD-3-Clause" ]
null
null
null
import asyncio import threading import time import unittest from slixmpp.test import SlixTest class TestInBandByteStreams(SlixTest): def setUp(self): self.stream_start(plugins=['xep_0047', 'xep_0030']) def tearDown(self): self.stream_close() def testOpenStream(self): """Test re...
27.018634
74
0.50092
import asyncio import threading import time import unittest from slixmpp.test import SlixTest class TestInBandByteStreams(SlixTest): def setUp(self): self.stream_start(plugins=['xep_0047', 'xep_0030']) def tearDown(self): self.stream_close() def testOpenStream(self): events = ...
true
true
f7276ccb81e55d56903c23dd551e1c32e13eedf8
402
py
Python
Lab-assignment/A-2/digitalRoot.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
2
2020-09-01T04:58:16.000Z
2021-01-30T03:45:52.000Z
Lab-assignment/A-2/digitalRoot.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
null
null
null
Lab-assignment/A-2/digitalRoot.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
null
null
null
# PROGRAM: To find the digital root of an integer # FILE: digitalRoot.py # CREATED BY: Santosh Hembram # DATED: 23-09-20 num = int(input("Enter an integer: ")) temp = num sum = 10 while(sum>=10): sum = 0 while(num!=0): dg = num % 10 sum = sum + dg num = num // 1...
15.461538
50
0.517413
num = int(input("Enter an integer: ")) temp = num sum = 10 while(sum>=10): sum = 0 while(num!=0): dg = num % 10 sum = sum + dg num = num // 10 num = sum print("The digital root of ",temp,"is",sum)
true
true
f7276d8b2cac2a3f653f6513bcab4a0e6a780d71
1,583
py
Python
airflow/migrations/versions/0101_a3bcd0914482_add_data_compressed_to_serialized_dag.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
8,092
2016-04-27T20:32:29.000Z
2019-01-05T07:39:33.000Z
airflow/migrations/versions/0101_a3bcd0914482_add_data_compressed_to_serialized_dag.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
2,961
2016-05-05T07:16:16.000Z
2019-01-05T08:47:59.000Z
airflow/migrations/versions/0101_a3bcd0914482_add_data_compressed_to_serialized_dag.py
npodewitz/airflow
511ea702d5f732582d018dad79754b54d5e53f9d
[ "Apache-2.0" ]
3,546
2016-05-04T20:33:16.000Z
2019-01-05T05:14:26.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
32.979167
88
0.760581
import sqlalchemy as sa from alembic import op revision = 'a3bcd0914482' down_revision = 'e655c0453f75' branch_labels = None depends_on = None airflow_version = '2.3.0' def upgrade(): with op.batch_alter_table('serialized_dag') as batch_op: batch_op.alter_column('data', existing_type=...
true
true
f7276e95cabbe199d785db08683a32a5ff10b6c4
3,062
py
Python
code/options.py
frizman04/language-style-transfer-python3
9110eb9d5b72d2926f805ac258915c0f1a369638
[ "Apache-2.0" ]
3
2018-07-11T07:41:58.000Z
2022-02-10T09:34:32.000Z
code/options.py
frizman04/language-style-transfer-python3
9110eb9d5b72d2926f805ac258915c0f1a369638
[ "Apache-2.0" ]
null
null
null
code/options.py
frizman04/language-style-transfer-python3
9110eb9d5b72d2926f805ac258915c0f1a369638
[ "Apache-2.0" ]
null
null
null
import sys import argparse import pprint def load_arguments(): argparser = argparse.ArgumentParser(sys.argv[0]) argparser.add_argument('--train', type=str, default='') argparser.add_argument('--dev', type=str, default='') argparser.add_argum...
29.728155
81
0.497061
import sys import argparse import pprint def load_arguments(): argparser = argparse.ArgumentParser(sys.argv[0]) argparser.add_argument('--train', type=str, default='') argparser.add_argument('--dev', type=str, default='') argparser.add_argum...
true
true
f7276ecb99f6a3382aea6076e38bd2ab95a340d1
239
py
Python
tests/configs/fragment_config_overrides.py
aptdamia/jirahub
f12516254784db23367f96ad7e6bb1b127d9de3f
[ "BSD-3-Clause" ]
10
2018-06-18T19:46:21.000Z
2022-03-03T20:50:15.000Z
tests/configs/fragment_config_overrides.py
aptdamia/jirahub
f12516254784db23367f96ad7e6bb1b127d9de3f
[ "BSD-3-Clause" ]
19
2018-04-13T15:01:51.000Z
2022-01-20T21:21:15.000Z
tests/configs/fragment_config_overrides.py
aptdamia/jirahub
f12516254784db23367f96ad7e6bb1b127d9de3f
[ "BSD-3-Clause" ]
9
2018-04-04T19:14:21.000Z
2021-02-25T07:52:12.000Z
# This config is incomplete, but will specify all the required key # when combined with fragment_config_base.py. c.jira.project_key = "TEST" c.jira.max_retries = 7 c.jira.sync_milestones = False c.github.repository = "testing/test-repo"
26.555556
66
0.774059
c.jira.project_key = "TEST" c.jira.max_retries = 7 c.jira.sync_milestones = False c.github.repository = "testing/test-repo"
true
true
f7276f21393a47035bbe973f09006fec1326f4ec
4,735
py
Python
members/amit/clf/data_generator_binary.py
Leofltt/rg_sound_generation
8e79b4d9dce028def43284f80521a2ec61d0066c
[ "MIT" ]
null
null
null
members/amit/clf/data_generator_binary.py
Leofltt/rg_sound_generation
8e79b4d9dce028def43284f80521a2ec61d0066c
[ "MIT" ]
null
null
null
members/amit/clf/data_generator_binary.py
Leofltt/rg_sound_generation
8e79b4d9dce028def43284f80521a2ec61d0066c
[ "MIT" ]
null
null
null
import random import shutil import os import numpy as np import data_loader import audio_processing from typing import Dict from loguru import logger from tqdm import tqdm from pprint import pprint class DataGenerator: def __init__(self, conf: Dict, batch_size: int = 8): assert "csv_file_path" in conf ...
39.132231
98
0.583316
import random import shutil import os import numpy as np import data_loader import audio_processing from typing import Dict from loguru import logger from tqdm import tqdm from pprint import pprint class DataGenerator: def __init__(self, conf: Dict, batch_size: int = 8): assert "csv_file_path" in conf ...
true
true
f727702ee7977a991a5617a1ff32f85463c61f40
4,108
py
Python
feedback_system/findTable.py
bshrram/Graduation-Project---Omnidirectional-Conveyor-Table
6414fbcb3d53f3c3351c25ac8b48aa73397c250d
[ "MIT" ]
1
2020-09-24T05:06:17.000Z
2020-09-24T05:06:17.000Z
feedback_system/findTable.py
bshrram/Graduation-Project---Omnidirectional-Conveyor-Table
6414fbcb3d53f3c3351c25ac8b48aa73397c250d
[ "MIT" ]
null
null
null
feedback_system/findTable.py
bshrram/Graduation-Project---Omnidirectional-Conveyor-Table
6414fbcb3d53f3c3351c25ac8b48aa73397c250d
[ "MIT" ]
1
2020-12-13T13:31:08.000Z
2020-12-13T13:31:08.000Z
import numpy as np import cv2 as cv flann_params= dict(algorithm = 6, table_number = 6, # 12 key_size = 12, # 20 multi_probe_level = 1) #2 def init_feature(): """initialize feature detector and matcher algorithm """ detector = cv.ORB_create(300...
31.844961
110
0.565725
import numpy as np import cv2 as cv flann_params= dict(algorithm = 6, table_number = 6, key_size = 12, multi_probe_level = 1) def init_feature(): detector = cv.ORB_create(3000) norm = cv.NORM_HAMMING matcher = cv.FlannBasedMatcher(flann...
true
true
f72771a425e944529c8133e292bae69e1f9dc774
1,013
py
Python
tensorlayer/package_info.py
Officium/tensorlayer
89bd7646cff2bc77c6569f2a51d48bc1e80229e4
[ "Apache-2.0" ]
2
2020-10-18T15:43:49.000Z
2020-10-27T14:52:48.000Z
tensorlayer/package_info.py
sheiiva/tensorlayer
5d692fe87ac4d4439506b5c4827399fd5a8ab5da
[ "Apache-2.0" ]
null
null
null
tensorlayer/package_info.py
sheiiva/tensorlayer
5d692fe87ac4d4439506b5c4827399fd5a8ab5da
[ "Apache-2.0" ]
1
2020-10-15T13:15:40.000Z
2020-10-15T13:15:40.000Z
#! /usr/bin/python # -*- coding: utf-8 -*- """Deep learning and Reinforcement learning library for Researchers and Engineers.""" MAJOR = 2 MINOR = 1 PATCH = 1 PRE_RELEASE = '' # Use the following formatting: (major, minor, patch, prerelease) VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) __shortversion__ = '.'.join(map...
40.52
96
0.757157
MAJOR = 2 MINOR = 1 PATCH = 1 PRE_RELEASE = '' VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE) __shortversion__ = '.'.join(map(str, VERSION[:3])) __version__ = '.'.join(map(str, VERSION[:3])) + ''.join(VERSION[3:]) __package_name__ = 'tensorlayer' __contact_names__ = 'TensorLayer Contributors' __contact_emails__ = '...
true
true
f7277265e7244b7ff4545ccd5788d0ae944adadd
167
py
Python
setup.py
contolini/regulations-site
c31a9ce3097910877657f61b4c19a4ccbd0f967f
[ "CC0-1.0" ]
null
null
null
setup.py
contolini/regulations-site
c31a9ce3097910877657f61b4c19a4ccbd0f967f
[ "CC0-1.0" ]
null
null
null
setup.py
contolini/regulations-site
c31a9ce3097910877657f61b4c19a4ccbd0f967f
[ "CC0-1.0" ]
null
null
null
from setuptools import setup, find_packages setup( name = "regulations", version = "0.1.0", license = "public domain", packages = find_packages() )
18.555556
43
0.646707
from setuptools import setup, find_packages setup( name = "regulations", version = "0.1.0", license = "public domain", packages = find_packages() )
true
true
f7277275036c1c4151a7b860aa018f1c5a139255
3,246
py
Python
scripts/ServerPoolMachinesHealth.py
sumedhpb/TAF
fc6f4cb8dc0b8234393f2e52a7b4a1aa723d9449
[ "Apache-2.0" ]
null
null
null
scripts/ServerPoolMachinesHealth.py
sumedhpb/TAF
fc6f4cb8dc0b8234393f2e52a7b4a1aa723d9449
[ "Apache-2.0" ]
null
null
null
scripts/ServerPoolMachinesHealth.py
sumedhpb/TAF
fc6f4cb8dc0b8234393f2e52a7b4a1aa723d9449
[ "Apache-2.0" ]
null
null
null
from com.jcraft.jsch import JSchException from com.jcraft.jsch import JSch from org.python.core.util import FileUtil from java.time import Duration from com.couchbase.client.java import Cluster, ClusterOptions from com.couchbase.client.java.env import ClusterEnvironment from com.couchbase.client.core.env import Timeout...
37.744186
222
0.66451
from com.jcraft.jsch import JSchException from com.jcraft.jsch import JSch from org.python.core.util import FileUtil from java.time import Duration from com.couchbase.client.java import Cluster, ClusterOptions from com.couchbase.client.java.env import ClusterEnvironment from com.couchbase.client.core.env import Timeout...
true
true
f727740bd33f10993c9982599ba782f10061bf7f
2,831
py
Python
Bigeleisen_KIE.py
valkenzz/Bigeleisen_KIE
aa82ee63c77be2e9d0bd97702c297aa70dfaa362
[ "MIT" ]
1
2021-06-25T22:48:39.000Z
2021-06-25T22:48:39.000Z
Bigeleisen_KIE.py
valkenzz/Bigeleisen_KIE
aa82ee63c77be2e9d0bd97702c297aa70dfaa362
[ "MIT" ]
null
null
null
Bigeleisen_KIE.py
valkenzz/Bigeleisen_KIE
aa82ee63c77be2e9d0bd97702c297aa70dfaa362
[ "MIT" ]
null
null
null
#Importation : import pandas as pd import numpy as np ################################################ #Parameters : #Planck constant (J/Hz) h=6.62607004*10**-34 #Boltzmann constant (J/K) kB=1.38064852*10**-23 #Light velocity in vaccum (m/s) c=299792458.0 #################################################...
37.746667
131
0.585306
import pandas as pd import numpy as np
true
true
f727743056c35927215b3d1cff28914c0160ba53
1,714
py
Python
examples/python/modulation-example.py
ideoforms/signalflow
1283cdf565d004495f1561d4d0683d51c11da50a
[ "MIT" ]
61
2020-10-12T11:46:09.000Z
2022-02-07T04:26:05.000Z
examples/python/modulation-example.py
ideoforms/signalflow
1283cdf565d004495f1561d4d0683d51c11da50a
[ "MIT" ]
26
2020-10-07T20:25:26.000Z
2022-03-25T11:40:57.000Z
examples/python/modulation-example.py
ideoforms/signalflow
1283cdf565d004495f1561d4d0683d51c11da50a
[ "MIT" ]
6
2021-02-27T19:50:25.000Z
2021-11-09T11:02:20.000Z
#!/usr/bin/env python3 #------------------------------------------------------------------------ # SignalFlow: Modulation example. #------------------------------------------------------------------------ from signalflow import * #------------------------------------------------------------------------ # Create the g...
41.804878
73
0.351225
from signalflow import * graph = AudioGraph(start=True) graph.show_status(1) clock = Impulse(8) frequency = ScaleLinExp(SawLFO(0.2), 0, 1, 200, 2000) sample_hold = SampleAndHold(frequency, clock) sine = TriangleOscillator(sample_hold) * 0.5 env = EnvelopeASR(attack=0.001, sustain=0.001, release=0.1, clock=...
true
true
f7277478cfed614fa4d55c97d1352a6fcb46bccc
2,908
py
Python
cifar10/custom_models.py
apexnetai/cifar-10-guide
7c76f310e93da3a229ce9d66defd770ee1c7dc56
[ "Apache-2.0" ]
null
null
null
cifar10/custom_models.py
apexnetai/cifar-10-guide
7c76f310e93da3a229ce9d66defd770ee1c7dc56
[ "Apache-2.0" ]
null
null
null
cifar10/custom_models.py
apexnetai/cifar-10-guide
7c76f310e93da3a229ce9d66defd770ee1c7dc56
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import torchvision class CustomResnetV1(nn.Module): def __init__(self): super(CustomResnetV1, self).__init__() self.resnet = torchvision.models.resnet18(pretrained=True) self.resnet.conv1 = nn.Conv2d(3, 64, kernel_size=(3...
29.979381
107
0.532669
import torch import torch.nn as nn import torch.nn.functional as F import torchvision class CustomResnetV1(nn.Module): def __init__(self): super(CustomResnetV1, self).__init__() self.resnet = torchvision.models.resnet18(pretrained=True) self.resnet.conv1 = nn.Conv2d(3, 64, kernel_size=(3...
true
true
f7277809d5c13e30181663ab40928852ffba8dea
2,031
py
Python
nyuki/geotiff_reprojector.py
raghuramdr/nyuki
664d3a955ae765214a42e8dbeb009029d5600c15
[ "MIT" ]
null
null
null
nyuki/geotiff_reprojector.py
raghuramdr/nyuki
664d3a955ae765214a42e8dbeb009029d5600c15
[ "MIT" ]
null
null
null
nyuki/geotiff_reprojector.py
raghuramdr/nyuki
664d3a955ae765214a42e8dbeb009029d5600c15
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for geotiff_reprojector.""" import sys import os import click import rasterio from rasterio.warp import calculate_default_transform, reproject, Resampling def reprojector(sourcefile, target_epsg='EPSG:4326', yes=False): # load file to get epsg info. dat = rasterio.op...
32.758065
141
0.58001
import sys import os import click import rasterio from rasterio.warp import calculate_default_transform, reproject, Resampling def reprojector(sourcefile, target_epsg='EPSG:4326', yes=False): dat = rasterio.open(sourcefile) targetfile = os.path.basename(sourcefile).split('.')[0] \ ...
true
true
f72779a298c969c64055451d767bd20d007cf308
576
py
Python
django_todos/migrations/0005_list_createdat.py
cxhandley/django-ddp-todos
e752133e31c901aba2ca056d16dc2022c57da823
[ "MIT" ]
2
2015-09-27T13:13:31.000Z
2015-09-28T01:16:11.000Z
django_todos/migrations/0005_list_createdat.py
cxhandley/django-ddp-todos-V2
e752133e31c901aba2ca056d16dc2022c57da823
[ "MIT" ]
null
null
null
django_todos/migrations/0005_list_createdat.py
cxhandley/django-ddp-todos-V2
e752133e31c901aba2ca056d16dc2022c57da823
[ "MIT" ]
1
2015-12-27T15:43:42.000Z
2015-12-27T15:43:42.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('django_todos', '0004_auto_20150909_1213'), ] operations = [ migrations...
25.043478
130
0.647569
from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('django_todos', '0004_auto_20150909_1213'), ] operations = [ migrations.AddField( ...
true
true
f72779dd707f715614f9cebb5334c248393f7004
90
py
Python
03_operator/03_operator.py
Jasper-Li/PythonTutorial
270d18a1830ae74eaa6fc797a6d4f672688f1cee
[ "CC0-1.0" ]
null
null
null
03_operator/03_operator.py
Jasper-Li/PythonTutorial
270d18a1830ae74eaa6fc797a6d4f672688f1cee
[ "CC0-1.0" ]
null
null
null
03_operator/03_operator.py
Jasper-Li/PythonTutorial
270d18a1830ae74eaa6fc797a6d4f672688f1cee
[ "CC0-1.0" ]
null
null
null
# 03 operator print(4+3) print(4-3) print(4*3) print(4 ** 3) # 这个小学没学 print(4/3)
11.25
24
0.566667
print(4+3) print(4-3) print(4*3) print(4 ** 3) print(4/3)
true
true
f7277a1c322b021d0f7590078adba406bb5b75a3
13,460
py
Python
utils/Finger/tool/tools.py
zxpzhong/DR_3DFM
6ef7d0d86813f4cc407a0d1011a2623e4775fbee
[ "MIT" ]
1
2021-01-19T01:44:47.000Z
2021-01-19T01:44:47.000Z
utils/Finger/tool/tools.py
zxpzhong/DR_3DFM
6ef7d0d86813f4cc407a0d1011a2623e4775fbee
[ "MIT" ]
null
null
null
utils/Finger/tool/tools.py
zxpzhong/DR_3DFM
6ef7d0d86813f4cc407a0d1011a2623e4775fbee
[ "MIT" ]
null
null
null
# 定义全局变量和方法 import numpy as np import math # import process.process_finger_data as pfd # 目前选用的图片尺寸 cur_pic_size = [640, 400] # cur_pic_size = [1280, 800] # 相机索引对应相机名称 camera_index_to_name = ['A', 'B', 'C', 'D', 'E', 'F'] # 6个相机的外参 camera_a_outer_para = np.mat([[0.574322111, 0.771054881, 0.275006333, 0.93847817], ...
52.784314
104
0.568722
import numpy as np import math cur_pic_size = [640, 400] camera_index_to_name = ['A', 'B', 'C', 'D', 'E', 'F'] camera_a_outer_para = np.mat([[0.574322111, 0.771054881, 0.275006333, 0.93847817], [0.565423192, -0.130698104, -0.814379899, -0.36935905], [-0...
true
true
f7277b8d58f1c9891a3e5c1152697cdc9322e98f
2,719
py
Python
hdfscm/tests/test_hdfsmanager_api.py
szhem/hdfscm
427e8c85fc70073d9a980e4371804523773545fb
[ "BSD-3-Clause" ]
15
2019-01-14T13:52:02.000Z
2022-02-27T13:40:38.000Z
hdfscm/tests/test_hdfsmanager_api.py
szhem/hdfscm
427e8c85fc70073d9a980e4371804523773545fb
[ "BSD-3-Clause" ]
5
2019-04-09T15:44:38.000Z
2021-04-02T07:01:11.000Z
hdfscm/tests/test_hdfsmanager_api.py
szhem/hdfscm
427e8c85fc70073d9a980e4371804523773545fb
[ "BSD-3-Clause" ]
6
2019-04-15T03:41:08.000Z
2022-03-07T22:48:50.000Z
import nbformat from notebook.services.contents.tests.test_contents_api import ( APITest, assert_http_error ) from traitlets.config import Config from hdfscm import HDFSContentsManager from hdfscm.utils import to_fs_path from .conftest import random_root_dir class HDFSContentsAPITest(APITest): hidden_dirs =...
29.554348
80
0.681868
import nbformat from notebook.services.contents.tests.test_contents_api import ( APITest, assert_http_error ) from traitlets.config import Config from hdfscm import HDFSContentsManager from hdfscm.utils import to_fs_path from .conftest import random_root_dir class HDFSContentsAPITest(APITest): hidden_dirs =...
true
true
f7277cc36cfb1076bc786e7c041456ee46c61223
379
py
Python
setup.py
CesarCaballeroGaudes/phys2denoise
a86baefb62a45721eaa132b1d47fe6c4a0979f35
[ "Apache-2.0" ]
7
2020-06-18T04:31:18.000Z
2022-03-01T14:54:18.000Z
setup.py
CesarCaballeroGaudes/phys2denoise
a86baefb62a45721eaa132b1d47fe6c4a0979f35
[ "Apache-2.0" ]
32
2020-05-01T18:56:11.000Z
2021-08-18T15:09:22.000Z
setup.py
CesarCaballeroGaudes/phys2denoise
a86baefb62a45721eaa132b1d47fe6c4a0979f35
[ "Apache-2.0" ]
10
2020-03-23T11:24:40.000Z
2021-11-22T12:55:06.000Z
#!/usr/bin/env python import sys from setuptools import setup import versioneer SETUP_REQUIRES = ['setuptools >= 30.3.0'] SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else [] if __name__ == "__main__": setup(name='phys2denoise', setup_requires=SETUP_REQUIRES, version=versioneer.ge...
25.266667
64
0.693931
import sys from setuptools import setup import versioneer SETUP_REQUIRES = ['setuptools >= 30.3.0'] SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else [] if __name__ == "__main__": setup(name='phys2denoise', setup_requires=SETUP_REQUIRES, version=versioneer.get_version(), ...
true
true
f7277cee7021a14d2b5b0b8305bca5e412827cf0
710
py
Python
Timers/timers__.py
nageshnnazare/Python-Advanced-Concepts
cc5aac22799b081abd223c9a7f3c1d5557e3528f
[ "MIT" ]
null
null
null
Timers/timers__.py
nageshnnazare/Python-Advanced-Concepts
cc5aac22799b081abd223c9a7f3c1d5557e3528f
[ "MIT" ]
null
null
null
Timers/timers__.py
nageshnnazare/Python-Advanced-Concepts
cc5aac22799b081abd223c9a7f3c1d5557e3528f
[ "MIT" ]
null
null
null
#Timers # Execute code at timed intervals import time from threading import Timer def display(msg): print(msg + ' ' + time.strftime('%H:%M:%S')) #Basic timer def run_once(): display('Run Once : ') t = Timer(5, display, ['Timeout:']) t.start() run_once() print('Waiting ...') #Inter...
20.882353
53
0.622535
import time from threading import Timer def display(msg): print(msg + ' ' + time.strftime('%H:%M:%S')) def run_once(): display('Run Once : ') t = Timer(5, display, ['Timeout:']) t.start() run_once() print('Waiting ...') class RepeatTimer(Timer): def run(self): wh...
true
true
f7277e3b484818974b6db28812e583f2b833d7dd
605
py
Python
tests/mock_generator.py
jcheminform/guacamol
dd7f7b12e1ab59151394aba5f4a95ee204fd0203
[ "MIT" ]
242
2018-11-29T13:34:13.000Z
2022-03-26T19:35:17.000Z
tests/mock_generator.py
jcheminform/guacamol
dd7f7b12e1ab59151394aba5f4a95ee204fd0203
[ "MIT" ]
13
2019-01-31T03:33:36.000Z
2022-01-03T07:03:19.000Z
tests/mock_generator.py
jcheminform/guacamol
dd7f7b12e1ab59151394aba5f4a95ee204fd0203
[ "MIT" ]
68
2018-11-26T10:03:41.000Z
2022-03-28T20:58:20.000Z
from typing import List from guacamol.distribution_matching_generator import DistributionMatchingGenerator class MockGenerator(DistributionMatchingGenerator): """ Mock generator that returns pre-defined molecules, possibly split in several calls """ def __init__(self, molecules: List[str]) -> No...
27.5
82
0.707438
from typing import List from guacamol.distribution_matching_generator import DistributionMatchingGenerator class MockGenerator(DistributionMatchingGenerator): def __init__(self, molecules: List[str]) -> None: self.molecules = molecules self.cursor = 0 def generate(self, number_samples: int)...
true
true
f7277ef92647633965a12e98c00211e924095a71
158
py
Python
03_Estrutura_de_Repeticao/12_gerador_tabuada.py
gabrieldcpadilha/ListaDeExercicios-PythonBrasil
a92d477468bde5eac8987a26ea79af2ffeb6ad81
[ "MIT" ]
null
null
null
03_Estrutura_de_Repeticao/12_gerador_tabuada.py
gabrieldcpadilha/ListaDeExercicios-PythonBrasil
a92d477468bde5eac8987a26ea79af2ffeb6ad81
[ "MIT" ]
10
2020-08-19T04:31:52.000Z
2020-09-21T22:48:29.000Z
03_Estrutura_de_Repeticao/12_gerador_tabuada.py
gabrieldcpadilha/ListaDeExercicios-PythonBrasil
a92d477468bde5eac8987a26ea79af2ffeb6ad81
[ "MIT" ]
null
null
null
num = int(input('Informe o numero que voce deseja ver a tabuada: ')) print(f'Tabuada de {num}') for c in range(0, 11): print(f'{num} X {c} = {num * c}')
26.333333
68
0.607595
num = int(input('Informe o numero que voce deseja ver a tabuada: ')) print(f'Tabuada de {num}') for c in range(0, 11): print(f'{num} X {c} = {num * c}')
true
true
f7277f4bc851f4bcbda0ff622dd70c2d8c114bb2
398
py
Python
tgBCoinBot/wsgi.py
steveyout/bitc
3fb227ba35d0daa8c2337cf8761cf68a752a973d
[ "Apache-2.0" ]
1
2021-01-30T10:25:04.000Z
2021-01-30T10:25:04.000Z
tgBCoinBot/wsgi.py
steveyout/pyth
d7178c76fa1a110c3d95df48bbec555b68dad618
[ "Apache-2.0" ]
2
2020-02-12T01:28:33.000Z
2020-06-05T18:52:39.000Z
tgBCoinBot/wsgi.py
steveyout/bitc
3fb227ba35d0daa8c2337cf8761cf68a752a973d
[ "Apache-2.0" ]
null
null
null
""" WSGI config for tgBCoinBot project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
23.411765
78
0.788945
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tgBCoinBot.settings") application = get_wsgi_application()
true
true
f7277fcf10b974b66303d90351215882cab6362f
3,232
py
Python
venv/lib/python2.7/site-packages/test/test_wsgi.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
venv/lib/python2.7/site-packages/test/test_wsgi.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/test/test_wsgi.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
import cStringIO import sys from netlib import wsgi, odict def tflow(): h = odict.ODictCaseless() h["test"] = ["value"] req = wsgi.Request("http", "GET", "/", h, "") return wsgi.Flow(("127.0.0.1", 8888), req) class TestApp: def __init__(self): self.called = False d...
30.490566
64
0.537438
import cStringIO import sys from netlib import wsgi, odict def tflow(): h = odict.ODictCaseless() h["test"] = ["value"] req = wsgi.Request("http", "GET", "/", h, "") return wsgi.Flow(("127.0.0.1", 8888), req) class TestApp: def __init__(self): self.called = False d...
true
true
f7277fd31391e322ececec43a17017d86e45c1ec
10,296
py
Python
train.py
jojotenya/LAMOL
03c31d9f0c7bf71295bc2d362ddf40a7656956e1
[ "MIT" ]
75
2019-12-22T18:59:05.000Z
2021-09-17T06:30:38.000Z
train.py
chho33/LAMOL
03c31d9f0c7bf71295bc2d362ddf40a7656956e1
[ "MIT" ]
5
2020-05-03T10:00:05.000Z
2021-08-04T05:35:57.000Z
train.py
jojotenya/LAMOL
03c31d9f0c7bf71295bc2d362ddf40a7656956e1
[ "MIT" ]
9
2020-02-14T17:33:58.000Z
2021-06-08T06:02:13.000Z
import torch from torch.utils.data import DataLoader from torch import nn from pytorch_transformers import AdamW, WEIGHTS_NAME, WarmupLinearSchedule import csv import numpy as np import os import logging from fp16 import FP16_Module, FP16_Optimizer from parallel import DataParallelModel, DataParallelCriterion from coll...
49.263158
166
0.668512
import torch from torch.utils.data import DataLoader from torch import nn from pytorch_transformers import AdamW, WEIGHTS_NAME, WarmupLinearSchedule import csv import numpy as np import os import logging from fp16 import FP16_Module, FP16_Optimizer from parallel import DataParallelModel, DataParallelCriterion from coll...
true
true
f7278004acfca10614fa1c33b678146eff3e8f86
1,850
py
Python
scikit-learn-weighted_kde/examples/svm/plot_separating_hyperplane_unbalanced.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
1
2021-11-26T12:22:13.000Z
2021-11-26T12:22:13.000Z
scikit-learn-weighted_kde/examples/svm/plot_separating_hyperplane_unbalanced.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
null
null
null
scikit-learn-weighted_kde/examples/svm/plot_separating_hyperplane_unbalanced.py
RTHMaK/git-squash-master
76c4c8437dd18114968e69a698f4581927fcdabf
[ "BSD-2-Clause" ]
null
null
null
""" ================================================= SVM: Separating hyperplane for unbalanced classes ================================================= Find the optimal separating hyperplane using an SVC for classes that are unbalanced. We first find the separating plane with a plain SVC and then plot (dashed) the ...
27.205882
73
0.651351
print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm rng = np.random.RandomState(0) n_samples_1 = 1000 n_samples_2 = 100 X = np.r_[1.5 * rng.randn(n_samples_1, 2), 0.5 * rng.randn(n_samples_2, 2) + [2, 2]] y = [0] * (n_samples_1) + [1] * (n_samples_2) clf = svm.SVC(k...
true
true
f727802bb39ec646082acbc4f4eca9a79e31fb09
1,827
py
Python
base.py
thiagosouzalink/Python_Projeto-CRUD_Using_File
20bc87568f1edd69aacc3af7b493b5b2337c6544
[ "MIT" ]
null
null
null
base.py
thiagosouzalink/Python_Projeto-CRUD_Using_File
20bc87568f1edd69aacc3af7b493b5b2337c6544
[ "MIT" ]
null
null
null
base.py
thiagosouzalink/Python_Projeto-CRUD_Using_File
20bc87568f1edd69aacc3af7b493b5b2337c6544
[ "MIT" ]
null
null
null
""" FUNÇÕES BÁSICAS PARA O PROGRAMA """ from time import sleep # Imprimir caracter especial def linha(tam=40): print(f"{'='*tam}") # Recebe e valida um nome def ler_nome(txt): stop = True while stop: stop = False nome = input(txt).strip() lista_nome = nome.split() ...
21.75
71
0.523262
from time import sleep def linha(tam=40): print(f"{'='*tam}") def ler_nome(txt): stop = True while stop: stop = False nome = input(txt).strip() lista_nome = nome.split() if len(lista_nome) == 0: print("ERRO! Você digitou um nome vazio...") ...
true
true
f727809dfe02a4b21995583a93752cc365af2e33
162
py
Python
plugins/baiaozhi_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
22
2016-09-01T08:27:07.000Z
2021-01-11T13:32:59.000Z
plugins/baiaozhi_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
null
null
null
plugins/baiaozhi_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
20
2015-11-07T19:09:48.000Z
2018-05-02T03:10:41.000Z
#!/usr/bin/env python # encoding: utf-8 def run(whatweb, pluginname): whatweb.recog_from_file(pluginname, "portal/dbportal/popup/popupdiv.js", "'mozilla'")
23.142857
89
0.728395
def run(whatweb, pluginname): whatweb.recog_from_file(pluginname, "portal/dbportal/popup/popupdiv.js", "'mozilla'")
true
true
f72780a93d732aedce510f6fc8674fcf936b13b5
2,221
py
Python
test_compare_gw.py
namedyangfan/compare_gw
93d8ed205962c92c32d2cf669ee32eef18577d0e
[ "MIT" ]
null
null
null
test_compare_gw.py
namedyangfan/compare_gw
93d8ed205962c92c32d2cf669ee32eef18577d0e
[ "MIT" ]
null
null
null
test_compare_gw.py
namedyangfan/compare_gw
93d8ed205962c92c32d2cf669ee32eef18577d0e
[ "MIT" ]
null
null
null
from compare_data.compare_gw import Obs_well_hgs import unittest import os file_directory = os.path.join(os.getcwd(), 'test_data') output_folder = os.path.join(file_directory, "output") if not os.path.exists(output_folder): os.mkdir(output_folder) class TestStringMethods(unittest.TestCase): def te...
49.355556
107
0.693381
from compare_data.compare_gw import Obs_well_hgs import unittest import os file_directory = os.path.join(os.getcwd(), 'test_data') output_folder = os.path.join(file_directory, "output") if not os.path.exists(output_folder): os.mkdir(output_folder) class TestStringMethods(unittest.TestCase): def te...
true
true
f72783a0dd98fa8f7f24db93479956beeb8365a7
9,714
py
Python
operators/s3_to_mysql_operator.py
edbizarro/mysql_plugin
ce0175cec20319b996590e4d3e0ca36cf4331c10
[ "Apache-2.0" ]
15
2017-11-29T15:51:12.000Z
2022-02-09T13:19:33.000Z
operators/s3_to_mysql_operator.py
edbizarro/mysql_plugin
ce0175cec20319b996590e4d3e0ca36cf4331c10
[ "Apache-2.0" ]
5
2018-03-22T04:12:25.000Z
2019-04-30T21:14:00.000Z
operators/s3_to_mysql_operator.py
edbizarro/mysql_plugin
ce0175cec20319b996590e4d3e0ca36cf4331c10
[ "Apache-2.0" ]
20
2018-04-11T07:14:03.000Z
2021-09-14T01:17:20.000Z
from airflow.models import BaseOperator from airflow.hooks.S3_hook import S3Hook from airflow.hooks.mysql_hook import MySqlHook import dateutil.parser import json import logging class S3ToMySQLOperator(BaseOperator): """ NOTE: To avoid invalid characters, it is recommended to specify the character encodi...
40.475
109
0.50628
from airflow.models import BaseOperator from airflow.hooks.S3_hook import S3Hook from airflow.hooks.mysql_hook import MySqlHook import dateutil.parser import json import logging class S3ToMySQLOperator(BaseOperator): template_fields = ('s3_key',) def __init__(self, s3_conn_id, ...
true
true
f72783f41e43e7a6ced69380671e393ee8c3f52c
4,382
py
Python
contrib/seeds/generate-seeds.py
glemercier/Core-Smart
4ccc12a1b2a55cbad79ddee07449a5fdadf3082b
[ "MIT" ]
67
2018-05-17T21:54:01.000Z
2022-02-04T09:45:03.000Z
contrib/seeds/generate-seeds.py
glemercier/Core-Smart
4ccc12a1b2a55cbad79ddee07449a5fdadf3082b
[ "MIT" ]
11
2018-06-23T11:27:51.000Z
2021-02-20T17:54:18.000Z
contrib/seeds/generate-seeds.py
glemercier/Core-Smart
4ccc12a1b2a55cbad79ddee07449a5fdadf3082b
[ "MIT" ]
43
2018-05-09T07:27:58.000Z
2021-12-14T15:21:51.000Z
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
31.52518
98
0.582611
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith...
true
true
f72785479e692aec1709c88b02e8f2700f756609
1,030
py
Python
userbot/plugins/alive.py
KING-USER1/BLACK-GHOULS-USERBOT-
3db2b42e2f27ce2b4d1fce3e8f016b269e872d05
[ "MIT" ]
null
null
null
userbot/plugins/alive.py
KING-USER1/BLACK-GHOULS-USERBOT-
3db2b42e2f27ce2b4d1fce3e8f016b269e872d05
[ "MIT" ]
null
null
null
userbot/plugins/alive.py
KING-USER1/BLACK-GHOULS-USERBOT-
3db2b42e2f27ce2b4d1fce3e8f016b269e872d05
[ "MIT" ]
null
null
null
"""Check if userbot alive. If you change these, you become the gayest gay such that even the gay world will disown you.""" import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from platform import uname from userbot import ALIVE_NAME from userbot.utils import admin_cmd DE...
46.818182
122
0.683495
import asyncio from telethon import events from telethon.tl.types import ChannelParticipantsAdmins from platform import uname from userbot import ALIVE_NAME from userbot.utils import admin_cmd DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Set ALIVE_NAME in config vars in Heroku" @borg.on(admin_cmd(pattern=r"ali...
true
true
f727859e96eaa14fd00273ab0b71ffa22bdf4fcf
2,065
py
Python
web/src/contacto/views.py
DelegacionCienciasUSAL/delcien.usal.es
fbf445c05a13eaa9726b0d8823c3aa34c9334dd3
[ "Apache-2.0" ]
1
2018-12-06T19:34:12.000Z
2018-12-06T19:34:12.000Z
web/src/contacto/views.py
DelegacionCienciasUSAL/delcien.usal.es
fbf445c05a13eaa9726b0d8823c3aa34c9334dd3
[ "Apache-2.0" ]
6
2018-12-08T08:45:52.000Z
2018-12-08T08:56:19.000Z
web/src/contacto/views.py
DelegacionCienciasUSAL/delcien.usal.es
fbf445c05a13eaa9726b0d8823c3aa34c9334dd3
[ "Apache-2.0" ]
null
null
null
from django.core.mail import send_mail from django.conf import settings from django.shortcuts import render from django.http import Http404 from django.http import HttpResponseRedirect # Create your views here. def main( request): return( render( request, 'contacto/main.html', {'Titulo' : 'Contacto'})) def get_duda(...
43.020833
87
0.62954
from django.core.mail import send_mail from django.conf import settings from django.shortcuts import render from django.http import Http404 from django.http import HttpResponseRedirect def main( request): return( render( request, 'contacto/main.html', {'Titulo' : 'Contacto'})) def get_duda(request): referer = r...
true
true
f72785f26964192007bad38595a7da8e4e0b7024
629
py
Python
manage.py
BuildForSDG/frontend90
35b7297341f048b08a5ff02c7a96dad968004010
[ "MIT" ]
1
2020-11-16T11:54:29.000Z
2020-11-16T11:54:29.000Z
manage.py
BuildForSDG/frontend90
35b7297341f048b08a5ff02c7a96dad968004010
[ "MIT" ]
11
2020-05-17T18:39:21.000Z
2021-09-22T19:14:28.000Z
manage.py
BuildForSDG/frontend90
35b7297341f048b08a5ff02c7a96dad968004010
[ "MIT" ]
5
2020-05-18T11:19:44.000Z
2020-11-12T14:46:31.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcity.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Impo...
28.590909
73
0.683625
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcity.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f72786710d226ad55e4560292df4916f0c08622e
21,421
py
Python
gupb/controller/tup_tup.py
syforcee/GUPB
f916acf94efe61c54fa7b4cc33d3f94821fdb3d7
[ "MIT" ]
null
null
null
gupb/controller/tup_tup.py
syforcee/GUPB
f916acf94efe61c54fa7b4cc33d3f94821fdb3d7
[ "MIT" ]
null
null
null
gupb/controller/tup_tup.py
syforcee/GUPB
f916acf94efe61c54fa7b4cc33d3f94821fdb3d7
[ "MIT" ]
null
null
null
import random from itertools import product from queue import SimpleQueue from typing import Dict, Type, Optional, Tuple, List, Set from gupb.controller.tup_tup_resources.trained_model import QuartersRelation, MenhirToCentreDistance, Actions, MODEL from gupb.model import arenas, coordinates, weapons, tiles, characters...
46.770742
130
0.6221
import random from itertools import product from queue import SimpleQueue from typing import Dict, Type, Optional, Tuple, List, Set from gupb.controller.tup_tup_resources.trained_model import QuartersRelation, MenhirToCentreDistance, Actions, MODEL from gupb.model import arenas, coordinates, weapons, tiles, characters...
true
true
f72786a183d595e15dd09c998f2bd8b55855c064
314
py
Python
singletask_cli/context.py
lenaKuznetsova/singletask-cli
fb7910c090ddfc8ec9a721536808396abb20bfc3
[ "MIT" ]
null
null
null
singletask_cli/context.py
lenaKuznetsova/singletask-cli
fb7910c090ddfc8ec9a721536808396abb20bfc3
[ "MIT" ]
null
null
null
singletask_cli/context.py
lenaKuznetsova/singletask-cli
fb7910c090ddfc8ec9a721536808396abb20bfc3
[ "MIT" ]
null
null
null
from singletask_sql.settings import BASE_DIR, dotenv_values from singletask_sql.engine import create_engine # todo - config after auth env_path = [ f'{BASE_DIR}/../.env', f'{BASE_DIR}/../.env.local' ] conf = {} for path in env_path: conf.update(dotenv_values(path)) sql_engine = create_engine(conf)
20.933333
59
0.72293
from singletask_sql.settings import BASE_DIR, dotenv_values from singletask_sql.engine import create_engine env_path = [ f'{BASE_DIR}/../.env', f'{BASE_DIR}/../.env.local' ] conf = {} for path in env_path: conf.update(dotenv_values(path)) sql_engine = create_engine(conf)
true
true
f7278700e1134610692fcc8ae7f5634a20a9f268
560
py
Python
tasks/migrations/0009_alter_task_org.py
jordanm88/Django-CRM
5faf22acb30aeb32f5830898fd5d8ecd1ac0bbd8
[ "MIT" ]
1,334
2017-06-04T07:47:14.000Z
2022-03-30T17:12:37.000Z
tasks/migrations/0009_alter_task_org.py
AhmedDoudou/Django-CRM-1
5faf22acb30aeb32f5830898fd5d8ecd1ac0bbd8
[ "MIT" ]
317
2017-06-04T07:48:13.000Z
2022-03-29T19:24:26.000Z
tasks/migrations/0009_alter_task_org.py
AhmedDoudou/Django-CRM-1
5faf22acb30aeb32f5830898fd5d8ecd1ac0bbd8
[ "MIT" ]
786
2017-06-06T09:18:48.000Z
2022-03-29T01:29:29.000Z
# Generated by Django 3.2.7 on 2021-10-06 07:21 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('common', '0037_alter_profile_org'), ('tasks', '0008_rename_company_task_org'), ] operations = [ mig...
26.666667
147
0.644643
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('common', '0037_alter_profile_org'), ('tasks', '0008_rename_company_task_org'), ] operations = [ migrations.AlterField( model_name='tas...
true
true
f72788069b5b787b60c74366778c57c504270b5a
14,226
py
Python
mmtbx/cablam/cablam_res.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/cablam/cablam_res.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/cablam/cablam_res.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division # (jEdit options) :folding=explicit:collapseFolds=1: #This module contains the linked_residue class and the functions needed to build # and access instances of it. #2012-09-05: # prunerestype() moved to this module from cablam_training # linked_residue.id_with_resname() changed to ret...
43.638037
135
0.659145
from __future__ import division import sys from mmtbx.cablam.cablam_math import veclen, vectorize #The class does not deal with alts well, however, as an rg may contain several # ag's. The firstalt() function provides some relief, but is really a dodge class linked_residue(obj...
true
true
f7278954301c90c618734d8aadfe80011bdfffd8
1,640
py
Python
Community/ServiceNow CMDB/cmdb_switches/cmdb_switches_logic.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
43
2017-12-04T17:38:24.000Z
2021-12-29T09:17:17.000Z
Community/ServiceNow CMDB/cmdb_switches/cmdb_switches_logic.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
49
2017-12-07T21:02:29.000Z
2022-02-04T22:27:16.000Z
Community/ServiceNow CMDB/cmdb_switches/cmdb_switches_logic.py
spenney-bc/gateway-workflows
0311a9224b2d53c01689eb6a9a0a593177abed63
[ "Apache-2.0" ]
82
2017-12-04T17:56:00.000Z
2021-12-29T09:17:21.000Z
""" Component logic """ from bluecat.util import get_password_from_file from ..cmdb_configuration import cmdb_config import requests def raw_table_data(*args, **kwargs): # pylint: disable=redefined-outer-name data = {'columns': [{'title': 'Name'}, {'title': 'IP Address'}, ...
35.652174
168
0.64878
from bluecat.util import get_password_from_file from ..cmdb_configuration import cmdb_config import requests def raw_table_data(*args, **kwargs): data = {'columns': [{'title': 'Name'}, {'title': 'IP Address'}, {'title': 'Serial Number'}, ...
true
true
f727899ef981f97f2b9272fee3b9581691701dbe
7,848
py
Python
src/pymor/bindings/ngsolve.py
meretp/pymor
0965a5c3d0725466103efae5190493fceb2bf441
[ "Unlicense" ]
null
null
null
src/pymor/bindings/ngsolve.py
meretp/pymor
0965a5c3d0725466103efae5190493fceb2bf441
[ "Unlicense" ]
null
null
null
src/pymor/bindings/ngsolve.py
meretp/pymor
0965a5c3d0725466103efae5190493fceb2bf441
[ "Unlicense" ]
null
null
null
# This file is part of the pyMOR project (https://www.pymor.org). # Copyright 2013-2021 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) from pathlib import Path from pymor.core.config import config from pymor.core.defaults import de...
38.660099
120
0.599261
from pathlib import Path from pymor.core.config import config from pymor.core.defaults import defaults from pymor.tools.io import change_to_directory if config.HAVE_NGSOLVE: import ngsolve as ngs import numpy as np from pymor.core.base import ImmutableObject from pymor.operators.list import Linear...
true
true
f72789d0e4c9455e928dc2d9cfcad8d7f2a69dd2
6,167
py
Python
video_pipeline.py
josehoras/Advanced-Lane-Finding
e6b83d602eb89661d3bf0f4d257ed5af0f6a58bb
[ "MIT" ]
null
null
null
video_pipeline.py
josehoras/Advanced-Lane-Finding
e6b83d602eb89661d3bf0f4d257ed5af0f6a58bb
[ "MIT" ]
null
null
null
video_pipeline.py
josehoras/Advanced-Lane-Finding
e6b83d602eb89661d3bf0f4d257ed5af0f6a58bb
[ "MIT" ]
null
null
null
import numpy as np import pickle import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg from moviepy.editor import VideoFileClip from image_thresholding import * from plotting_helpers import * from line_fit import * from Line import * # *** PIPELINE *** def pipeline(img): global error_im, ski...
40.572368
113
0.65364
import numpy as np import pickle import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg from moviepy.editor import VideoFileClip from image_thresholding import * from plotting_helpers import * from line_fit import * from Line import * def pipeline(img): global error_im, skipped_frames ...
true
true
f7278a13c9265e6e8a34e3ea72f574bcebb85a0d
4,861
py
Python
src/Network/SR4DFlowNet.py
EdwardFerdian/4DFlowNet
e9c8bf72660b41ef5c7b6c677a71283ead32bbab
[ "MIT" ]
14
2020-06-17T04:28:39.000Z
2022-02-24T07:21:51.000Z
src/Network/SR4DFlowNet.py
EdwardFerdian/4DFlowNet
e9c8bf72660b41ef5c7b6c677a71283ead32bbab
[ "MIT" ]
null
null
null
src/Network/SR4DFlowNet.py
EdwardFerdian/4DFlowNet
e9c8bf72660b41ef5c7b6c677a71283ead32bbab
[ "MIT" ]
7
2020-08-13T03:21:31.000Z
2022-02-15T13:01:18.000Z
import tensorflow as tf class SR4DFlowNet(): def __init__(self, res_increase): self.res_increase = res_increase def build_network(self, u, v, w, u_mag, v_mag, w_mag, low_resblock=8, hi_resblock=4, channel_nr=64): channel_nr = 64 speed = (u ** 2 + v ** 2 + w ** 2) ** 0.5 mag = ...
40.173554
163
0.649866
import tensorflow as tf class SR4DFlowNet(): def __init__(self, res_increase): self.res_increase = res_increase def build_network(self, u, v, w, u_mag, v_mag, w_mag, low_resblock=8, hi_resblock=4, channel_nr=64): channel_nr = 64 speed = (u ** 2 + v ** 2 + w ** 2) ** 0.5 mag = ...
true
true
f7278a52cbb84e8828f86b3c9b2a793ccd2f5400
419
py
Python
clientes/forms.py
Etxea/gestion_eide_web
8a59be1ddb59a4713cb3346534fd01f643d8f924
[ "MIT" ]
null
null
null
clientes/forms.py
Etxea/gestion_eide_web
8a59be1ddb59a4713cb3346534fd01f643d8f924
[ "MIT" ]
null
null
null
clientes/forms.py
Etxea/gestion_eide_web
8a59be1ddb59a4713cb3346534fd01f643d8f924
[ "MIT" ]
null
null
null
from django import forms from django.forms import ModelForm from models import * from django.forms.models import inlineformset_factory class ClienteForm(forms.ModelForm): class Meta: model = Cliente class ClienteContactoForm(forms.ModelForm): class Meta: model = ClienteContacto exclude...
24.647059
73
0.74463
from django import forms from django.forms import ModelForm from models import * from django.forms.models import inlineformset_factory class ClienteForm(forms.ModelForm): class Meta: model = Cliente class ClienteContactoForm(forms.ModelForm): class Meta: model = ClienteContacto exclude...
true
true
f7278a76375e3a6c0657a5bf9351de27906e9406
92,087
py
Python
xalpha/universal.py
kingmoon3/xalpha
dd877c6bce1b85a4facd38de9dc35a7bf0acf1c6
[ "MIT" ]
3
2021-08-15T10:00:14.000Z
2022-02-12T22:30:01.000Z
xalpha/universal.py
kingmoon3/xalpha
dd877c6bce1b85a4facd38de9dc35a7bf0acf1c6
[ "MIT" ]
null
null
null
xalpha/universal.py
kingmoon3/xalpha
dd877c6bce1b85a4facd38de9dc35a7bf0acf1c6
[ "MIT" ]
1
2021-10-01T13:12:10.000Z
2021-10-01T13:12:10.000Z
# -*- coding: utf-8 -*- """ modules for universal fetcher that gives historical daily data and realtime data for almost everything in the market """ import os import sys import time import datetime as dt import numpy as np import pandas as pd import logging import inspect from bs4 import BeautifulSoup from functools i...
33.522752
277
0.544876
import os import sys import time import datetime as dt import numpy as np import pandas as pd import logging import inspect from bs4 import BeautifulSoup from functools import wraps, lru_cache from uuid import uuid4 from sqlalchemy import exc from dateutil.relativedelta import relativedelta try: from jqdatasdk i...
true
true
f7278b3f78adb6b6654bc60e19101d05927cea4c
1,039
py
Python
modules/denoise/config.py
gw2cc/godot
addaa48039fff0795b99cf998a11a75a9e280850
[ "MIT", "Apache-2.0", "CC-BY-4.0", "Unlicense" ]
1
2022-02-26T05:16:25.000Z
2022-02-26T05:16:25.000Z
modules/denoise/config.py
gw2cc/godot
addaa48039fff0795b99cf998a11a75a9e280850
[ "MIT", "Apache-2.0", "CC-BY-4.0", "Unlicense" ]
2
2021-12-10T04:07:19.000Z
2021-12-27T20:00:03.000Z
modules/denoise/config.py
gw2cc/godot
addaa48039fff0795b99cf998a11a75a9e280850
[ "MIT", "Apache-2.0", "CC-BY-4.0", "Unlicense" ]
null
null
null
def can_build(env, platform): # Thirdparty dependency OpenImage Denoise includes oneDNN library # and the version we use only supports x86_64. # It's also only relevant for tools build and desktop platforms, # as doing lightmap generation and denoising on Android or HTML5 # would be a bit far-fetche...
41.56
88
0.704524
def can_build(env, platform): # as doing lightmap generation and denoising on Android or HTML5 # would be a bit far-fetched. # Note: oneDNN doesn't support ARM64, OIDN needs updating to the latest version supported_platform = platform in ["x11", "osx", "windows", "server"] supported_b...
true
true
f7278bb2aaab500d948340fdddc1c5f836645f0b
97,520
py
Python
wordlist.py
Finoozer/pypassgen
37a129f0917871f8ea6680e7820a110df779f5f2
[ "MIT" ]
null
null
null
wordlist.py
Finoozer/pypassgen
37a129f0917871f8ea6680e7820a110df779f5f2
[ "MIT" ]
null
null
null
wordlist.py
Finoozer/pypassgen
37a129f0917871f8ea6680e7820a110df779f5f2
[ "MIT" ]
null
null
null
wl = ["aah", "aaron", "aba", "ababa", "aback", "abase", "abash", "abate", "abbas", "abbe", "abbey", "abbot", "abbott", "abc", "abe", "abed", "abel", "abet", "abide", "abject", "ablaze", "able", ...
14.535698
15
0.312151
wl = ["aah", "aaron", "aba", "ababa", "aback", "abase", "abash", "abate", "abbas", "abbe", "abbey", "abbot", "abbott", "abc", "abe", "abed", "abel", "abet", "abide", "abject", "ablaze", "able", ...
true
true
f7278c9a625b2d1059e2cfccec2d387b369c5723
3,269
py
Python
test_src/Tests/test07_scroll_list/test_TC09.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
test_src/Tests/test07_scroll_list/test_TC09.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
test_src/Tests/test07_scroll_list/test_TC09.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
from test_src.Tests.test07_scroll_list.conftest import PyFix from test_src.Pages.HomePage import HomePage from test_src.Pages.LoginPage import LoginPage from test_src.Pages.MainPage import MainPage from test_src.Data.test_data import TestData import time class TestScrollList(PyFix): """this used to check the tit...
44.780822
86
0.674824
from test_src.Tests.test07_scroll_list.conftest import PyFix from test_src.Pages.HomePage import HomePage from test_src.Pages.LoginPage import LoginPage from test_src.Pages.MainPage import MainPage from test_src.Data.test_data import TestData import time class TestScrollList(PyFix): def test_homepage(self): ...
true
true
f7278cd33f1012970fa1eafccf108f1db2ee92aa
1,387
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/kubernetes/apis/SetAutoRepairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/kubernetes/apis/SetAutoRepairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/kubernetes/apis/SetAutoRepairRequest.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
30.152174
98
0.708724
from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest class SetAutoRepairRequest(JDCloudRequest): def __init__(self, parameters, header=None, version="v1"): super(SetAutoRepairRequest, self).__init__( '/regions/{regionId}/nodeGroups/{nodeGroupId}:setAutoRepair', 'POST',...
true
true
f7278d74a416cfce5eaf0b1a81d51c2651746a7a
5,101
py
Python
logicmonitor_sdk/models/data_source_update_reasons_pagination_response.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/data_source_update_reasons_pagination_response.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/data_source_update_reasons_pagination_response.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
30.005882
304
0.612625
import pprint import re import six from logicmonitor_sdk.models.update_reason import UpdateReason class DataSourceUpdateReasonsPaginationResponse(object): swagger_types = { 'total': 'int', 'search_id': 'str', 'items': 'list[UpdateReason]' } attribute_map = { 'to...
true
true
f7278d910a0798fa44f63254194a56095117de1f
3,950
py
Python
superset/embedded/api.py
7vikpeculiar/superset
800ced5e257d5d83d6dbe4ced0e7318ac40d026f
[ "Apache-2.0" ]
null
null
null
superset/embedded/api.py
7vikpeculiar/superset
800ced5e257d5d83d6dbe4ced0e7318ac40d026f
[ "Apache-2.0" ]
null
null
null
superset/embedded/api.py
7vikpeculiar/superset
800ced5e257d5d83d6dbe4ced0e7318ac40d026f
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.264151
87
0.704051
import logging from typing import Optional from flask import Response from flask_appbuilder.api import expose, protect, safe from flask_appbuilder.hooks import before_request from flask_appbuilder.models.sqla.interface import SQLAInterface from superset import is_feature_enabled from superset.constant...
true
true
f7278e0192857e4135b5b9ed6748496b57e99211
1,132
py
Python
udemy/01_walkthrough/practice_1.py
inderpal2406/python
7bd7d03a6b3cd09ff16a4447ff495a2393a87a33
[ "MIT" ]
null
null
null
udemy/01_walkthrough/practice_1.py
inderpal2406/python
7bd7d03a6b3cd09ff16a4447ff495a2393a87a33
[ "MIT" ]
null
null
null
udemy/01_walkthrough/practice_1.py
inderpal2406/python
7bd7d03a6b3cd09ff16a4447ff495a2393a87a33
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This script will accept user input as a string. # Then display this string in left, right, center of a line in title format. string=input("Enter the string: ") # read input string string=string.title() # convert string to title format ''' # in windows cmd, mode command tells us width of a ...
37.733333
123
0.736749
string=input("Enter the string: ") string=string.title() import os width=os.get_terminal_size().columns print(f"{string.ljust(width)}") print(f"{string.center(width)}") print(f"{string.rjust(width)}") # or instead of converting the string to title format separately, # print(f"{string.ljust(width).title()...
true
true
f7278f1e85d824afdd21dc3d53f33b966aca7692
5,600
py
Python
copulas/multivariate/base.py
DAI-Lab/Copulas
d634437aeac02f46615398463038455260b3de25
[ "MIT" ]
71
2018-06-20T12:07:34.000Z
2020-01-03T21:43:01.000Z
copulas/multivariate/base.py
DAI-Lab/Copulas
d634437aeac02f46615398463038455260b3de25
[ "MIT" ]
75
2018-06-20T09:46:07.000Z
2019-12-23T15:04:19.000Z
copulas/multivariate/base.py
DAI-Lab/Copulas
d634437aeac02f46615398463038455260b3de25
[ "MIT" ]
25
2018-06-24T18:01:11.000Z
2020-01-02T14:30:09.000Z
"""Base Multivariate class.""" import pickle import numpy as np from copulas import NotFittedError, get_instance, validate_random_state class Multivariate(object): """Abstract class for a multi-variate copula object.""" fitted = False def __init__(self, random_state=None): self.random_state =...
28
83
0.574821
import pickle import numpy as np from copulas import NotFittedError, get_instance, validate_random_state class Multivariate(object): fitted = False def __init__(self, random_state=None): self.random_state = validate_random_state(random_state) def fit(self, X): raise NotImplementedErr...
true
true
f7278fb2e4cecf1623625e589a46c10c6f0fc89f
2,209
py
Python
lowder/__init__.py
jabernardo/lowder
d7ddc7d2217ba4ab3f2a4f00314b600af9cf0e70
[ "MIT" ]
1
2020-03-02T05:02:33.000Z
2020-03-02T05:02:33.000Z
lowder/__init__.py
jabernardo/lowder
d7ddc7d2217ba4ab3f2a4f00314b600af9cf0e70
[ "MIT" ]
null
null
null
lowder/__init__.py
jabernardo/lowder
d7ddc7d2217ba4ab3f2a4f00314b600af9cf0e70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import time import threading LOADERS = { 'default': { 'interval': 0.1, 'frames': ('/', '-', '|', '\\', '-') }, 'dots': { 'interval': 0.2, 'frames': ('⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏') }, 'dot...
28.320513
79
0.383884
import time import threading LOADERS = { 'default': { 'interval': 0.1, 'frames': ('/', '-', '|', '\\', '-') }, 'dots': { 'interval': 0.2, 'frames': ('⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏') }, 'dots-bar': { '...
true
true
f72790e1400c04034e99a0a996957a5a2bd3bdfa
14,106
py
Python
giung2/modeling/backbone/resnet.py
cs-giung/giung2
c8560fd1b56f20eb1f3cf57202975d8325b591f5
[ "MIT" ]
4
2021-10-18T05:15:59.000Z
2022-03-09T04:29:05.000Z
giung2/modeling/backbone/resnet.py
cs-giung/giung2
c8560fd1b56f20eb1f3cf57202975d8325b591f5
[ "MIT" ]
null
null
null
giung2/modeling/backbone/resnet.py
cs-giung/giung2
c8560fd1b56f20eb1f3cf57202975d8325b591f5
[ "MIT" ]
3
2022-01-12T11:47:51.000Z
2022-03-18T06:28:22.000Z
import torch import torch.nn as nn from typing import Dict, List from functools import partial from fvcore.common.config import CfgNode from giung2.layers import * __all__ = [ "build_resnet_backbone", ] class IdentityShortcut(nn.Module): def __init__( self, in_planes: int, ...
36.638961
112
0.59223
import torch import torch.nn as nn from typing import Dict, List from functools import partial from fvcore.common.config import CfgNode from giung2.layers import * __all__ = [ "build_resnet_backbone", ] class IdentityShortcut(nn.Module): def __init__( self, in_planes: int, ...
true
true
f727917d0f068e8d6007ff3141a9580153e749e9
4,756
py
Python
dipy/data/tests/test_fetcher.py
nasimanousheh/dipy
d737a6af80a184322e30de4760e8c205291dbed0
[ "MIT" ]
2
2018-07-25T14:04:20.000Z
2021-02-10T07:10:10.000Z
dipy/data/tests/test_fetcher.py
aarya22/dipy-reco1
9d20c911b4afe83e52ded698eff9ba0f0fafeca8
[ "MIT" ]
null
null
null
dipy/data/tests/test_fetcher.py
aarya22/dipy-reco1
9d20c911b4afe83e52ded698eff9ba0f0fafeca8
[ "MIT" ]
2
2018-07-24T21:20:54.000Z
2018-08-27T04:08:24.000Z
import tempfile import os.path as op import sys import os import numpy.testing as npt from nibabel.tmpdirs import TemporaryDirectory import dipy.data.fetcher as fetcher from dipy.data import SPHERE_FILES from threading import Thread if sys.version_info[0] < 3: from SimpleHTTPServer import SimpleHTTPRequestHandler ...
37.448819
79
0.634567
import tempfile import os.path as op import sys import os import numpy.testing as npt from nibabel.tmpdirs import TemporaryDirectory import dipy.data.fetcher as fetcher from dipy.data import SPHERE_FILES from threading import Thread if sys.version_info[0] < 3: from SimpleHTTPServer import SimpleHTTPRequestHandler ...
true
true
f727925dfeb5359a5f6f7116be96d12c7354d32c
4,577
py
Python
jarviscli/plugins/bmr.py
jronzo99/Jarvis
d63b51a1a7cb5bbff36e6e7dc3c63201ae1470b2
[ "MIT" ]
1
2021-05-25T11:29:25.000Z
2021-05-25T11:29:25.000Z
jarviscli/plugins/bmr.py
nikiboura/Jarvis
eb22f7c84a345e9ae5925b4b98adbc4f2e4a93f3
[ "MIT" ]
null
null
null
jarviscli/plugins/bmr.py
nikiboura/Jarvis
eb22f7c84a345e9ae5925b4b98adbc4f2e4a93f3
[ "MIT" ]
null
null
null
from colorama import Fore from plugin import plugin @plugin("bmr") def bmr(jarvis, s): """A Jarvis plugin to calculate your Basal Metabolic Rate (BMR) and your Active Metabolic Rate(AMR)""" jarvis.say("Hello there! Ready to count your BMR? \n") jarvis.say("1. Yes, let's start! \n2. Sorry," ...
35.757813
76
0.537688
from colorama import Fore from plugin import plugin @plugin("bmr") def bmr(jarvis, s): jarvis.say("Hello there! Ready to count your BMR? \n") jarvis.say("1. Yes, let's start! \n2. Sorry," " I don't know what BMR is :( \n ") jarvis.say("Please enter your choice: ") choice = jarvis....
true
true
f7279315c269b9d8ccac798e0d91c3ab9cba61d7
3,834
py
Python
Project/_visualize.py
BendeguzToth/NeuralLanguageModel
f4bb60375019acd57c7396768d62ad0f3166391c
[ "MIT" ]
1
2021-05-18T04:04:31.000Z
2021-05-18T04:04:31.000Z
Project/_visualize.py
BendeguzToth/NeuralLanguageModel
f4bb60375019acd57c7396768d62ad0f3166391c
[ "MIT" ]
null
null
null
Project/_visualize.py
BendeguzToth/NeuralLanguageModel
f4bb60375019acd57c7396768d62ad0f3166391c
[ "MIT" ]
null
null
null
""" In this file we visualize the activations of particular neurons, at different positions of a provided sample text. """ # Standard libraries import json import tkinter as tk # Third-party libraries import numpy as np # Project files from layers import LSTM # SETUP MODEL = "saves/ShakespeareNet.json" LOOKUP_FILE ...
30.188976
108
0.628326
import json import tkinter as tk import numpy as np from layers import LSTM MODEL = "saves/ShakespeareNet.json" LOOKUP_FILE = "saves/ShakespeareLookup.json" TEXT_FILE = "saves/sample.txt" def main(): with open(LOOKUP_FILE, 'r') as file: chars = json.load(file) char_to_int = dic...
true
true
f72793d54ac528bc12e6cc394f04adc65956cb34
21,296
py
Python
gen_data_fin.py
vjaguilera/BERT4Rec
8c460676af224c90c9cc89f1ba837b38f04e4210
[ "Apache-2.0" ]
null
null
null
gen_data_fin.py
vjaguilera/BERT4Rec
8c460676af224c90c9cc89f1ba837b38f04e4210
[ "Apache-2.0" ]
null
null
null
gen_data_fin.py
vjaguilera/BERT4Rec
8c460676af224c90c9cc89f1ba837b38f04e4210
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- import os import codecs import collections import random import sys import tensorflow as tf import six from util import * from vocab import * import pickle import multiprocessing import time random_seed = 12345 short_seq_prob = 0 # Probability of creating sequences which are shorter than...
32.864198
158
0.609739
import os import codecs import collections import random import sys import tensorflow as tf import six from util import * from vocab import * import pickle import multiprocessing import time random_seed = 12345 short_seq_prob = 0 flags = tf.flags FLAGS = flags.FLAGS flags.DEFINE_string("signature", 'default...
true
true
f727954b000151483380835b1aa72d1c1ac5eccb
2,275
py
Python
src/scheduler/migrations/0004_scheduledemailaction.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
3
2018-08-24T10:48:40.000Z
2020-05-29T06:33:23.000Z
src/scheduler/migrations/0004_scheduledemailaction.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
null
null
null
src/scheduler/migrations/0004_scheduledemailaction.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-16 08:54 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('workfl...
51.704545
187
0.648352
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('workflow', '0013_auto_20171209_0809'), migrations.swappable_dependenc...
true
true
f72795aa0c613268a934fa6fe9d3601b7683d86e
20,230
py
Python
sdk/core/azure-core/azure/core/polling/base_polling.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/core/azure-core/azure/core/polling/base_polling.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/core/azure-core/azure/core/polling/base_polling.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
1
2020-10-11T06:05:00.000Z
2020-10-11T06:05:00.000Z
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
34.057239
118
0.659219
import abc import base64 import json from typing import TYPE_CHECKING, Optional, Any, Union from ..exceptions import HttpResponseError, DecodeError from . import PollingMethod from ..pipeline.policies._utils import get_retry_after if TYPE_CHECKING: from azure.core.pipeline import Pipeline...
true
true
f72796cfdb731f2805f402a224271fe7a843f908
3,858
py
Python
tests/test_similarity.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
397
2015-05-30T11:02:28.000Z
2022-03-09T01:39:31.000Z
tests/test_similarity.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
32
2015-04-27T21:26:29.000Z
2021-08-19T10:20:45.000Z
tests/test_similarity.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
110
2015-11-06T17:01:48.000Z
2022-02-17T05:09:02.000Z
# -*- coding: utf-8 -*- def test_word_similarity(): from sematch.semantic.similarity import WordNetSimilarity wns = WordNetSimilarity() dog = wns.word2synset('dog') cat = wns.word2synset('cat') # Measuring semantic similarity between concepts using Path method assert wns.similarity(dog[0], cat[...
52.849315
126
0.736133
def test_word_similarity(): from sematch.semantic.similarity import WordNetSimilarity wns = WordNetSimilarity() dog = wns.word2synset('dog') cat = wns.word2synset('cat') assert wns.similarity(dog[0], cat[0], 'path') is not None assert wns.word_similarity('dog', 'cat', 'li') is not N...
true
true
f72797852f54a7b4a109a290c7e4ff3ec4e2193c
3,676
py
Python
src/chaospizza/orders/migrations/0001_initial.py
chaosdorf/chaospizza
6f0895f28095260d04b41a8b86edf07a87bcccb8
[ "MIT" ]
9
2017-05-19T23:32:19.000Z
2020-06-28T20:40:13.000Z
src/chaospizza/orders/migrations/0001_initial.py
step21/chaospizza
8011ebb5fd021bf74897099cedd1869bcfbd031f
[ "MIT" ]
31
2017-05-19T21:27:30.000Z
2022-01-25T21:38:13.000Z
src/chaospizza/orders/migrations/0001_initial.py
step21/chaospizza
8011ebb5fd021bf74897099cedd1869bcfbd031f
[ "MIT" ]
4
2017-05-19T23:32:05.000Z
2019-02-26T03:41:51.000Z
# Generated by Django 1.11.3 on 2017-07-07 19:21 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): # noqa initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Order', fields=[ ...
59.290323
392
0.612078
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Order', fields=[ ('id', models.AutoField(auto_created=Tr...
true
true
f7279801d19e14d38461c4393e790d31ce9d5df4
479
py
Python
accounting/root.py
michellab/BioSimSpaceCloud
456b146a2131565e354352872d3e75a08c3652d1
[ "Apache-2.0" ]
2
2019-02-15T16:04:19.000Z
2019-02-19T15:42:27.000Z
accounting/root.py
michellab/BioSimSpaceCloud
456b146a2131565e354352872d3e75a08c3652d1
[ "Apache-2.0" ]
null
null
null
accounting/root.py
michellab/BioSimSpaceCloud
456b146a2131565e354352872d3e75a08c3652d1
[ "Apache-2.0" ]
null
null
null
from Acquire.Service import create_return_value from Acquire.Service import get_service_info, get_service_private_key def run(args): """This function return the status and service info""" status = 0 message = None service = None service = get_service_info() status = 0 message = "Succes...
19.958333
69
0.707724
from Acquire.Service import create_return_value from Acquire.Service import get_service_info, get_service_private_key def run(args): status = 0 message = None service = None service = get_service_info() status = 0 message = "Success" return_value = create_return_value(status, message)...
true
true
f72798a96967ad3fd309ebf1baee8b1a120bae4d
13,803
py
Python
layers.py
richardsfc/neural_rerendering_plus
f5b2bd2ebe7e9657e3584612818eb0d137714276
[ "Apache-2.0" ]
2
2020-06-09T01:48:13.000Z
2021-07-06T11:53:51.000Z
layers.py
richardsfc/neural_rerendering_plus
f5b2bd2ebe7e9657e3584612818eb0d137714276
[ "Apache-2.0" ]
7
2020-09-26T01:11:45.000Z
2022-03-12T00:34:09.000Z
layers.py
richardsfc/neural_rerendering_plus
f5b2bd2ebe7e9657e3584612818eb0d137714276
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #     https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.658257
110
0.626096
import functools from options import FLAGS as opts import numpy as np import tensorflow as tf from plyfile import PlyData, PlyElement class LayerDescriptor(object): def __init__(self, name, m): with tf.variable_scope(name): plydata = PlyData.read(opts.descriptor_folder + '/fused.ply') ...
true
true
f7279945818ccb74868b87f76d1ec78f62a9ecf6
536
py
Python
pysql/__init__.py
fossabot/PySQL
3cd46130ce12bcd7636d4715176d6610b1dcf279
[ "MIT" ]
12
2021-03-12T12:12:02.000Z
2021-10-04T18:30:19.000Z
pysql/__init__.py
fossabot/PySQL
3cd46130ce12bcd7636d4715176d6610b1dcf279
[ "MIT" ]
28
2021-03-14T05:52:36.000Z
2022-03-17T04:16:28.000Z
pysql/__init__.py
fossabot/PySQL
3cd46130ce12bcd7636d4715176d6610b1dcf279
[ "MIT" ]
8
2021-03-31T14:31:49.000Z
2022-03-13T09:43:31.000Z
""" module for PySQL wrapper functions, for using as a library """ __author__ = "Devansh Singh" __email__ = "devanshamity@gmail.com" __license__ = "MIT" from pysql import * """ classes for functions for initializing object instances, use (username, password) of local MySQL server """ from pysql.packages.auth impor...
17.290323
50
0.772388
__author__ = "Devansh Singh" __email__ = "devanshamity@gmail.com" __license__ = "MIT" from pysql import * from pysql.packages.auth import Database from pysql.packages.ddl_commands import DDL, Alter from pysql.packages.dml_commands import DML from pysql.data.export import Export from pysql.data.imports import Import...
true
true
f72799e9e1cbfc52c99b8a8ba84b5bcb51232a74
982
py
Python
setup.py
AndreJambersi/Project_hours
3f99566e0b1e54aa4e2f848ad34dbe9988f75591
[ "MIT" ]
1
2019-10-23T17:38:07.000Z
2019-10-23T17:38:07.000Z
setup.py
AndreJambersi/TimeBetweenBusinessHours
3f99566e0b1e54aa4e2f848ad34dbe9988f75591
[ "MIT" ]
null
null
null
setup.py
AndreJambersi/TimeBetweenBusinessHours
3f99566e0b1e54aa4e2f848ad34dbe9988f75591
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name = 'TimeBetweenBusinessHours', packages = ['TimeBetweenBusinessHours'], version = '0.1', license='MIT', description = 'Get the Time Between Business Hours', author = 'AndreJambersi', author_email = 'andrejambersi@gmail.com', url = 'https://github.com/...
35.071429
98
0.645621
from distutils.core import setup setup( name = 'TimeBetweenBusinessHours', packages = ['TimeBetweenBusinessHours'], version = '0.1', license='MIT', description = 'Get the Time Between Business Hours', author = 'AndreJambersi', author_email = 'andrejambersi@gmail.com', url = 'https://github.com/...
true
true
f7279c891026d6d9c304e4c395e6d04dfac0fd5f
44,050
py
Python
TexSoup/data.py
pablo-angulo/TexSoup
bfd09bcfc8e020f26939a7166d9316bac51515f0
[ "BSD-2-Clause" ]
190
2016-09-26T08:38:31.000Z
2022-02-10T23:18:00.000Z
TexSoup/data.py
pablo-angulo/TexSoup
bfd09bcfc8e020f26939a7166d9316bac51515f0
[ "BSD-2-Clause" ]
127
2016-05-20T07:31:06.000Z
2022-02-16T14:48:09.000Z
TexSoup/data.py
pablo-angulo/TexSoup
bfd09bcfc8e020f26939a7166d9316bac51515f0
[ "BSD-2-Clause" ]
44
2017-07-23T19:58:00.000Z
2021-12-03T12:57:48.000Z
"""TexSoup transforms a LaTeX document into a complex tree of various Python objects, but all objects fall into one of the following three categories: ``TexNode``, ``TexExpr`` (environments and commands), and ``TexGroup`` s. """ import itertools import re from TexSoup.utils import CharToLineOffset, Token, TC, to_list...
30.274914
91
0.545358
import itertools import re from TexSoup.utils import CharToLineOffset, Token, TC, to_list __all__ = ['TexNode', 'TexCmd', 'TexEnv', 'TexGroup', 'BracketGroup', 'BraceGroup', 'TexArgs', 'TexText', 'TexMathEnv', 'TexDisplayMathEnv', 'TexNamedEnv', 'TexMathModeEnv', 'TexDisplayMathModeEn...
true
true
f7279d2a0928d92d1790424e41fa2a880cbb1be9
138
py
Python
multiples_list.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
multiples_list.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
multiples_list.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
factor = int(input()) count = int(input()) new_list = [] for num in range (1, count+1): new_list.append(factor * num) print(new_list)
19.714286
33
0.65942
factor = int(input()) count = int(input()) new_list = [] for num in range (1, count+1): new_list.append(factor * num) print(new_list)
true
true
f7279d86e14fb0fc3c957ab9728d907bc9972e34
712
py
Python
sdk/test/test_user_location.py
aqualinkorg/aqualink-sdk
dad972d1dd5b74e8216bdc30521a8b76f7844733
[ "MIT" ]
1
2022-02-06T23:05:37.000Z
2022-02-06T23:05:37.000Z
sdk/test/test_user_location.py
aqualinkorg/aqualink-sdk
dad972d1dd5b74e8216bdc30521a8b76f7844733
[ "MIT" ]
3
2022-02-07T06:13:31.000Z
2022-03-11T12:43:39.000Z
sdk/test/test_user_location.py
aqualinkorg/aqualink-sdk
dad972d1dd5b74e8216bdc30521a8b76f7844733
[ "MIT" ]
null
null
null
""" Aqualink API documentation The Aqualink public API documentation # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import sys import unittest import aqualink_sdk from aqualink_sdk.model.user_location import UserLocation class TestUserLoc...
19.777778
79
0.676966
import sys import unittest import aqualink_sdk from aqualink_sdk.model.user_location import UserLocation class TestUserLocation(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testUserLocation(self): s if __name__ == '__main__': unittest....
true
true
f7279df45c4b42335c35e8630786466cee4cd860
698
py
Python
models/final_model.py
Abxhor/Coldairarrow
3735beec8a6fa7ad9356375081229c68f0e83f3d
[ "MIT" ]
null
null
null
models/final_model.py
Abxhor/Coldairarrow
3735beec8a6fa7ad9356375081229c68f0e83f3d
[ "MIT" ]
null
null
null
models/final_model.py
Abxhor/Coldairarrow
3735beec8a6fa7ad9356375081229c68f0e83f3d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Stacking of some good solutions. IMPORTANT: To run this model you need run before the differents models. """ import pandas as pd import numpy as np df1 = pd.read_csv('submission40.csv') # 0.309812 (public leaderboard) df2 = pd.read_csv('submission41.csv') # 0.305985 (public leaderboard) df...
33.238095
85
0.690544
import pandas as pd import numpy as np df1 = pd.read_csv('submission40.csv') df2 = pd.read_csv('submission41.csv') df3 = pd.read_csv('submission42.csv') df4 = pd.read_csv('submission45.csv') df5 = pd.read_csv('submission47.csv') df = pd.DataFrame() df['y'] = 0.2*df1['y'] + 0.23*df2['y'] + 0.2*df3['y'] + 0.15...
true
true
f7279e1c3124420e19cf7b1c5a2e96104f93c057
19,081
py
Python
777_all_in_one_v1.py
vlbthambawita/singan-polyp-aug-exp
b4ec5155f5c36a931fad022aec04dda6b3180b55
[ "MIT" ]
null
null
null
777_all_in_one_v1.py
vlbthambawita/singan-polyp-aug-exp
b4ec5155f5c36a931fad022aec04dda6b3180b55
[ "MIT" ]
null
null
null
777_all_in_one_v1.py
vlbthambawita/singan-polyp-aug-exp
b4ec5155f5c36a931fad022aec04dda6b3180b55
[ "MIT" ]
null
null
null
#========================================================= # Developer: Vajira Thambawita # Reference: https://github.com/meetshah1995/pytorch-semseg #========================================================= import argparse from datetime import datetime import os import copy from tqdm import tqdm import matplotlib....
32.728988
133
0.639432
import argparse from datetime import datetime import os import copy from tqdm import tqdm import matplotlib.pyplot as plt import numpy as np import torch import torch.optim as optim from torch.optim import lr_scheduler import torch.nn as nn from torch.utils.data import DataLoader from torchvision import model...
true
true
f7279ecc02853cb1115ebc5b8d75e8798d77b6ea
5,301
py
Python
tests/app/models/test_webauthn_credential.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
null
null
null
tests/app/models/test_webauthn_credential.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
1
2021-10-19T13:34:15.000Z
2021-10-19T13:34:15.000Z
tests/app/models/test_webauthn_credential.py
TechforgoodCAST/notifications-admin
0a9e06aafd79d0fbe50c26a85bf757aaeaa59340
[ "MIT" ]
1
2021-03-05T13:18:44.000Z
2021-03-05T13:18:44.000Z
import base64 import pytest from fido2 import cbor from fido2.cose import ES256 from app.models.webauthn_credential import RegistrationError, WebAuthnCredential # noqa adapted from https://github.com/duo-labs/py_webauthn/blob/90e3d97e0182899a35a70fc510280b4082cce19b/tests/test_webauthn.py#L14-L24 SESSION_STATE = {'c...
73.625
1,274
0.873986
import base64 import pytest from fido2 import cbor from fido2.cose import ES256 from app.models.webauthn_credential import RegistrationError, WebAuthnCredential _STATE = {'challenge': 'bPzpX3hHQtsp9evyKYkaZtVc9UN07PUdJ22vZUdDp94', 'user_verification': 'discouraged'} CLIENT_DATA_JSON = b'{"type": "webauthn.create", "...
true
true
f727a030df092bb2e0060f668a84075527b879dd
913
py
Python
src/dicom_parser/utils/bids/utils.py
open-dicom/dicom_parser
acc82f6f989a335fd3cf30e716334081ab9ac43b
[ "MIT" ]
6
2021-08-01T17:48:57.000Z
2022-03-07T15:41:26.000Z
src/dicom_parser/utils/bids/utils.py
open-dicom/dicom_parser
acc82f6f989a335fd3cf30e716334081ab9ac43b
[ "MIT" ]
33
2021-08-08T16:09:21.000Z
2022-03-15T15:17:37.000Z
src/dicom_parser/utils/bids/utils.py
open-dicom/dicom_parser
acc82f6f989a335fd3cf30e716334081ab9ac43b
[ "MIT" ]
6
2021-10-19T09:19:22.000Z
2022-03-13T19:26:10.000Z
""" Utilities for the :mod:`dicom_parser.utils.bids` module. """ from typing import Dict, List # A summary of the unique parts (key/value) pairs that make up the appropriate # BIDS-compatible file name by data type. ANATOMICAL_NAME_PARTS: List[str] = ["acq", "ce", "rec", "inv", "run", "part"] DWI_NAME_PARTS: List[str]...
27.666667
78
0.637459
from typing import Dict, List ANATOMICAL_NAME_PARTS: List[str] = ["acq", "ce", "rec", "inv", "run", "part"] DWI_NAME_PARTS: List[str] = ["acq", "dir", "run", "part"] FIELDMAP_NAME_PARTS: List[str] = ["acq", "ce", "dir", "run"] FUNCTIONAL_NAME_PARTS: List[str] = [ "task", "acq", "ce", "rec", "dir"...
true
true
f727a06b1b074152cadb873d888a24a742788ecb
761
py
Python
cride/users/admin.py
valot3/Cride-API
a9e201942e6eecd479f575733e93ff73e6df573d
[ "MIT" ]
null
null
null
cride/users/admin.py
valot3/Cride-API
a9e201942e6eecd479f575733e93ff73e6df573d
[ "MIT" ]
null
null
null
cride/users/admin.py
valot3/Cride-API
a9e201942e6eecd479f575733e93ff73e6df573d
[ "MIT" ]
null
null
null
"""User models admin""" #Django from django.contrib import admin from django.contrib.auth.admin import UserAdmin #Project from cride.users.models import User, Profile class CustomUserAdmin(UserAdmin): """User model admin.""" list_display = ('email', 'username', 'first_name', 'last_name', 'is_staff', 'is_c...
27.178571
92
0.720105
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from cride.users.models import User, Profile class CustomUserAdmin(UserAdmin): list_display = ('email', 'username', 'first_name', 'last_name', 'is_staff', 'is_client') list_filter = ('is_client', 'is_staff', 'created_at', '...
true
true
f727a107c1b6bc630f2298f8758fa301408ca175
105
py
Python
wrapcord/__init__.py
nsde/wrapcord
d9a6225085a658a630a9527edb4fa7b991657856
[ "MIT" ]
null
null
null
wrapcord/__init__.py
nsde/wrapcord
d9a6225085a658a630a9527edb4fa7b991657856
[ "MIT" ]
null
null
null
wrapcord/__init__.py
nsde/wrapcord
d9a6225085a658a630a9527edb4fa7b991657856
[ "MIT" ]
null
null
null
from .channel import Channel from .guild import Guild from .message import Message from .user import User
26.25
28
0.819048
from .channel import Channel from .guild import Guild from .message import Message from .user import User
true
true
f727a133e51c2b5e804c815e0c981bdfa6b73676
3,793
py
Python
pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot15/Gen_PWSlot15.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot15/Gen_PWSlot15.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot15/Gen_PWSlot15.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- """File generated according to PWSlot15/gen_list.json WARNING! All changes made in this file will be lost! """ from pyleecan.GUI.Dialog.DMachineSetup.SWSlot.PWSlot15.Ui_PWSlot15 import Ui_PWSlot15 class Gen_PWSlot15(Ui_PWSlot15): def setupUi(self, PWSlot15): """Abstract class to up...
30.837398
85
0.594516
from pyleecan.GUI.Dialog.DMachineSetup.SWSlot.PWSlot15.Ui_PWSlot15 import Ui_PWSlot15 class Gen_PWSlot15(Ui_PWSlot15): def setupUi(self, PWSlot15): Ui_PWSlot15.setupUi(self, PWSlot15) txt = self.tr(u"""Slot isthmus width.""") self.in_W0.setWhatsThis(txt) self.in_W0.setToo...
true
true
f727a15310a842d4dcb36ff94d72138869d2a3dc
40,610
py
Python
pytorch_lightning/trainer/training_loop.py
MasaYan24/pytorch-lightning
046ac714f6955ed14b831657ea1b7b16bc28ac93
[ "Apache-2.0" ]
1
2021-08-05T01:45:26.000Z
2021-08-05T01:45:26.000Z
pytorch_lightning/trainer/training_loop.py
MasaYan24/pytorch-lightning
046ac714f6955ed14b831657ea1b7b16bc28ac93
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_loop.py
MasaYan24/pytorch-lightning
046ac714f6955ed14b831657ea1b7b16bc28ac93
[ "Apache-2.0" ]
1
2021-02-16T00:47:46.000Z
2021-02-16T00:47:46.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
42.747368
119
0.661241
from contextlib import contextmanager, suppress from copy import copy, deepcopy import numpy as np import torch from pytorch_lightning.callbacks import EarlyStopping from pytorch_lightning.core.memory import ModelSummary from pytorch_lightning.core.optimizer import LightningOptimizer from pytorch_lightn...
true
true
f727a25388ee496e5f885a90c81f3d667b3f2d2c
478
py
Python
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/llvmlite/binding/options.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/llvmlite/binding/options.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/llvmlite/binding/options.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
from . import ffi from .common import _encode_string from ctypes import c_char_p def set_option(name, option): """ Set the given LLVM "command-line" option. For example set_option("test", "-debug-pass=Structure") would display all optimization passes when generating code. """ ffi.lib.LLVMPY_S...
26.555556
73
0.692469
from . import ffi from .common import _encode_string from ctypes import c_char_p def set_option(name, option): ffi.lib.LLVMPY_SetCommandLine(_encode_string(name), _encode_string(option)) ffi.lib.LLVMPY_SetCommandLine.argtypes = [c_char_p, c_char_p]
true
true
f727a288f380466a672dfe1936fa261ebf099560
2,761
py
Python
utils.py
gurbaaz27/fb-ai3
8c294845594ea3e3dce3922385de34b77d8e3dad
[ "MIT" ]
null
null
null
utils.py
gurbaaz27/fb-ai3
8c294845594ea3e3dce3922385de34b77d8e3dad
[ "MIT" ]
null
null
null
utils.py
gurbaaz27/fb-ai3
8c294845594ea3e3dce3922385de34b77d8e3dad
[ "MIT" ]
null
null
null
import pyaudio import wave from wit import Wit class Speech2Intent: def __init__(self, access_token): self.client = Wit(access_token) self.headers = {'authorization': 'Bearer '+ access_token, 'Content-Type': 'audio/wav'} def recognize_speech(self, AUDIO_FILENAME, num_seconds ...
33.26506
114
0.532054
import pyaudio import wave from wit import Wit class Speech2Intent: def __init__(self, access_token): self.client = Wit(access_token) self.headers = {'authorization': 'Bearer '+ access_token, 'Content-Type': 'audio/wav'} def recognize_speech(self, AUDIO_FILENAME, num_seconds ...
true
true
f727a2fc3479a82a78afc6c257c0409a5c9b4b20
330
py
Python
Hello_Python/class_electricalcar.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
5
2021-09-06T04:27:56.000Z
2021-12-14T14:50:27.000Z
Hello_Python/class_electricalcar.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
null
null
null
Hello_Python/class_electricalcar.py
JaydenYL/Projects
b51c0476f7be80f0b0d6aa84592966ecb4343d76
[ "MIT" ]
null
null
null
from class_car import car class electrical_car(car): def __init__(self, make, model,year): super().__init__(make, model, year) self.battery_volume = 70 # KWh def describe_battery(self): description = 'This car has a '+str(self.battery_volume)+' KWh battery . ' return descripti...
33
82
0.663636
from class_car import car class electrical_car(car): def __init__(self, make, model,year): super().__init__(make, model, year) self.battery_volume = 70 def describe_battery(self): description = 'This car has a '+str(self.battery_volume)+' KWh battery . ' return description.ti...
true
true
f727a38e124401ba01468b18ed046aa832af9abd
1,461
py
Python
backend/berkeleytime/config/semesters/fall2017.py
Boomaa23/berkeleytime
f4c3f41025576056953fb944f5e978df43fa9cdc
[ "MIT" ]
21
2021-03-01T00:31:23.000Z
2022-03-12T06:11:46.000Z
backend/berkeleytime/config/semesters/fall2017.py
Boomaa23/berkeleytime
f4c3f41025576056953fb944f5e978df43fa9cdc
[ "MIT" ]
28
2021-04-07T19:02:37.000Z
2022-03-27T19:11:21.000Z
backend/berkeleytime/config/semesters/fall2017.py
Boomaa23/berkeleytime
f4c3f41025576056953fb944f5e978df43fa9cdc
[ "MIT" ]
4
2021-04-19T00:42:00.000Z
2021-11-30T06:29:59.000Z
"""Configurations for Fall 2016.""" from berkeleytime.config.finals.semesters.fall2017 import * import datetime CURRENT_SEMESTER = 'fall' CURRENT_YEAR = '2017' CURRENT_SEMESTER_DISPLAY = 'Fall 2017' # SIS API Keys SIS_TERM_ID = 2178 TELEBEARS = { 'phase1_start': datetime.datetime(2017, 4, 18), 'phase2_start...
40.583333
89
0.687885
from berkeleytime.config.finals.semesters.fall2017 import * import datetime CURRENT_SEMESTER = 'fall' CURRENT_YEAR = '2017' CURRENT_SEMESTER_DISPLAY = 'Fall 2017' SIS_TERM_ID = 2178 TELEBEARS = { 'phase1_start': datetime.datetime(2017, 4, 18), 'phase2_start': datetime.datetime(2017, 7, 18), 'phase1_end...
true
true
f727a3cd29e902d31223aa1b5f1bbe02c67a9180
4,804
py
Python
features/command_handler.py
DAgostinateur/Woh-Bot-2.0
4e99d97218a59156bacb1669cc1cb6c8807dd5b1
[ "MIT" ]
null
null
null
features/command_handler.py
DAgostinateur/Woh-Bot-2.0
4e99d97218a59156bacb1669cc1cb6c8807dd5b1
[ "MIT" ]
null
null
null
features/command_handler.py
DAgostinateur/Woh-Bot-2.0
4e99d97218a59156bacb1669cc1cb6c8807dd5b1
[ "MIT" ]
null
null
null
import re import discord from commands import set_presence, avatar, erp from commands.admin import list_user_admin, add_user_admin, rm_user_admin from commands.birthday import (set_channel_bd, show_channel_bd, set_user_bd, set_notif_time, list_user_bd, manual_bd_check, show_message_bd, ...
42.513274
113
0.648626
import re import discord from commands import set_presence, avatar, erp from commands.admin import list_user_admin, add_user_admin, rm_user_admin from commands.birthday import (set_channel_bd, show_channel_bd, set_user_bd, set_notif_time, list_user_bd, manual_bd_check, show_message_bd, ...
true
true
f727a444defc0c229318bcae59c50a66a901568f
737
py
Python
handcoding/fire.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
null
null
null
handcoding/fire.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
null
null
null
handcoding/fire.py
everyevery/programming_study
ff35e97e13953e4d7a26591f7cdb301d3e8e36c6
[ "MIT" ]
1
2017-04-01T21:34:23.000Z
2017-04-01T21:34:23.000Z
import itertools as it def fire(manager_list, salary_list, productivity_list): acc_list = [val[0] - val[1] for val in it.chain([(0,0)], zip(productivity_list, salary_list))][-1::-1] for i, e in it.takewhile(lambda v: v[0] != 0, zip(range(len(acc_list)-1, -1, -1), acc_list)): acc_list[-...
40.944444
97
0.617368
import itertools as it def fire(manager_list, salary_list, productivity_list): acc_list = [val[0] - val[1] for val in it.chain([(0,0)], zip(productivity_list, salary_list))][-1::-1] for i, e in it.takewhile(lambda v: v[0] != 0, zip(range(len(acc_list)-1, -1, -1), acc_list)): acc_list[-...
true
true