hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f0a488a35920cdbebd8f857c2582f4896626dd
863
py
Python
torchsparse/nn/functional/activation.py
ashawkey/torchsparse
775120df77e8daea2011ff16580cbaa2c103540b
[ "MIT" ]
1
2021-11-01T16:57:22.000Z
2021-11-01T16:57:22.000Z
torchsparse/nn/functional/activation.py
ashawkey/torchsparse
775120df77e8daea2011ff16580cbaa2c103540b
[ "MIT" ]
null
null
null
torchsparse/nn/functional/activation.py
ashawkey/torchsparse
775120df77e8daea2011ff16580cbaa2c103540b
[ "MIT" ]
null
null
null
import functools from torch.nn import functional as F from torchsparse.sparse_tensor import * __all__ = ['spact', 'sprelu', 'spleaky_relu'] def spact(inputs, act_funct=F.relu): features = inputs.F coords = inputs.C cur_stride = inputs.s output_features = act_funct(features) output...
27.83871
70
0.673233
import functools from torch.nn import functional as F from torchsparse.sparse_tensor import * __all__ = ['spact', 'sprelu', 'spleaky_relu'] def spact(inputs, act_funct=F.relu): features = inputs.F coords = inputs.C cur_stride = inputs.s output_features = act_funct(features) output...
true
true
f7f0a86872852cf4d1ada8a984661699ea15ff70
2,491
py
Python
setup.py
rishikesh67/django-shared-schema-tenants
ed3bcddf80a7838979fe1be2045dfa16b545beed
[ "MIT" ]
20
2017-08-29T02:36:32.000Z
2021-12-06T21:29:46.000Z
setup.py
rishikesh67/django-shared-schema-tenants
ed3bcddf80a7838979fe1be2045dfa16b545beed
[ "MIT" ]
35
2017-08-18T06:28:31.000Z
2021-09-02T01:53:09.000Z
setup.py
rishikesh67/django-shared-schema-tenants
ed3bcddf80a7838979fe1be2045dfa16b545beed
[ "MIT" ]
9
2018-06-17T22:04:13.000Z
2022-03-18T09:27:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): """Retrieves the version from shared_schema_tenants/__init__.py""" filename = os.path.join(os.path.dirname(...
31.531646
114
0.628262
import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): filename = os.path.join(os.path.dirname(__file__), *file_paths) version_file = open(filename).read() version_match = re.search(r"^__version__ = ['\...
true
true
f7f0a8a0e588ddfeb7788a6f8201e4cb3a58252d
19,361
py
Python
cogs/general_information.py
AlexP55/CyraBot
ed58e2ef474e180e2f8f02991780406ad63bcb5b
[ "MIT" ]
null
null
null
cogs/general_information.py
AlexP55/CyraBot
ed58e2ef474e180e2f8f02991780406ad63bcb5b
[ "MIT" ]
null
null
null
cogs/general_information.py
AlexP55/CyraBot
ed58e2ef474e180e2f8f02991780406ad63bcb5b
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import random import modules.custom_exceptions as custom_exceptions import typing from modules.cyra_converter import find_hero, toLevelWorld, toWorld, toMode, find_achievement, numberComparisonConverter, find_farmable_achievement from modules.cyra_constants import f...
51.219577
756
0.662724
import discord from discord.ext import commands import random import modules.custom_exceptions as custom_exceptions import typing from modules.cyra_converter import find_hero, toLevelWorld, toWorld, toMode, find_achievement, numberComparisonConverter, find_farmable_achievement from modules.cyra_constants import f...
true
true
f7f0a8dca53300c37e50f5da644e8ac188059b37
5,294
py
Python
clip.py
VladimirGl/CLIP
539a1e5b05defc1139f0e52105d5ed29ce94960b
[ "MIT" ]
null
null
null
clip.py
VladimirGl/CLIP
539a1e5b05defc1139f0e52105d5ed29ce94960b
[ "MIT" ]
null
null
null
clip.py
VladimirGl/CLIP
539a1e5b05defc1139f0e52105d5ed29ce94960b
[ "MIT" ]
null
null
null
import hashlib import os import urllib import warnings from typing import Union, List import torch from PIL import Image from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, Normalize from tqdm import tqdm from .model import build_model from .simple_tokenizer import SimpleTokenizer as _Tokenizer ...
37.814286
142
0.655081
import hashlib import os import urllib import warnings from typing import Union, List import torch from PIL import Image from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, Normalize from tqdm import tqdm from .model import build_model from .simple_tokenizer import SimpleTokenizer as _Tokenizer ...
true
true
f7f0a92ae25810a74be778e4f6589c45e75f3a2e
75,914
py
Python
ansible/roles/openshift_client_python/library/openshift_client_python.py
pehala/openshift-client-python
39fcf605f0e6774c13e2219d8051db87d90f51f6
[ "Apache-2.0" ]
41
2019-04-12T21:07:02.000Z
2022-02-21T20:01:18.000Z
ansible/roles/openshift_client_python/library/openshift_client_python.py
pehala/openshift-client-python
39fcf605f0e6774c13e2219d8051db87d90f51f6
[ "Apache-2.0" ]
27
2019-07-11T21:26:27.000Z
2021-11-29T17:28:42.000Z
ansible/roles/openshift_client_python/library/openshift_client_python.py
pehala/openshift-client-python
39fcf605f0e6774c13e2219d8051db87d90f51f6
[ "Apache-2.0" ]
33
2019-04-10T17:37:01.000Z
2022-03-08T01:05:45.000Z
#!/usr/bin/env python # THIS IS A GENERATED FILE. DO NOT MODIFY IT # Modify: openshift_client_python.template.py and then run rebuild_module.sh to affect this file from __future__ import print_function from __future__ import absolute_import from ansible.module_utils.basic import AnsibleModule import os import six im...
722.990476
71,563
0.948784
from __future__ import print_function from __future__ import absolute_import from ansible.module_utils.basic import AnsibleModule import os import six import tempfile import shutil import tarfile import base64 import sys import pprint def error(msg, **kwargs): import openshift as oc raise oc.OpenShiftP...
true
true
f7f0aa4cb869bc70b635bc62bfa8f3a6b9012529
23,425
py
Python
mayan/apps/documents/migrations/0020_auto_20150714_2233.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
2,743
2017-12-18T07:12:30.000Z
2022-03-27T17:21:25.000Z
mayan/apps/documents/migrations/0020_auto_20150714_2233.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
15
2020-06-06T00:00:48.000Z
2022-03-12T00:03:54.000Z
mayan/apps/documents/migrations/0020_auto_20150714_2233.py
eshbeata/open-paperless
6b9ed1f21908116ad2795b3785b2dbd66713d66e
[ "Apache-2.0" ]
257
2017-12-18T03:12:58.000Z
2022-03-25T08:59:10.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('documents', '0019_auto_20150714_2232'), ] operations = [ migrations.AlterField( model_name='document', ...
42.74635
77
0.312572
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('documents', '0019_auto_20150714_2232'), ] operations = [ migrations.AlterField( model_name='document', name='description', ...
true
true
f7f0aa85b69dac8cab67a45a04e8000589e5e735
30,004
py
Python
backend/apps/datamodel/models.py
gabrielmbmb/intry4.0-backend
1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24
[ "MIT" ]
null
null
null
backend/apps/datamodel/models.py
gabrielmbmb/intry4.0-backend
1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24
[ "MIT" ]
5
2021-03-30T15:05:05.000Z
2021-09-22T19:41:51.000Z
backend/apps/datamodel/models.py
gabrielmbmb/intry4.0-backend
1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24
[ "MIT" ]
null
null
null
import io import uuid import pytz import json import logging import pandas as pd from constance import config from django.db import models from django.contrib.postgres.fields import ArrayField, JSONField from django.core.validators import ( int_list_validator, MinValueValidator, ) from django.db.models.signals ...
33.116998
105
0.582822
import io import uuid import pytz import json import logging import pandas as pd from constance import config from django.db import models from django.contrib.postgres.fields import ArrayField, JSONField from django.core.validators import ( int_list_validator, MinValueValidator, ) from django.db.models.signals ...
true
true
f7f0ab0a33acb171e8e34d69dcbd370f18b48528
6,673
py
Python
custom_components/hubitat/light.py
ryanmellish/hacs-hubitat
44275e1256fa05ecf979ef38e803a6a34c64094a
[ "MIT" ]
null
null
null
custom_components/hubitat/light.py
ryanmellish/hacs-hubitat
44275e1256fa05ecf979ef38e803a6a34c64094a
[ "MIT" ]
null
null
null
custom_components/hubitat/light.py
ryanmellish/hacs-hubitat
44275e1256fa05ecf979ef38e803a6a34c64094a
[ "MIT" ]
null
null
null
"""Support for Hubitat lights.""" import json from logging import getLogger import re from typing import Any, Dict, List, Optional, Union from hubitatmaker import ( CAP_COLOR_CONTROL, CAP_COLOR_TEMP, CAP_LIGHT, CAP_SWITCH, CAP_SWITCH_LEVEL, CMD_ON, CMD_SET_COLOR, CMD_SET_COLOR_TEMP, ...
30.751152
92
0.623108
import json from logging import getLogger import re from typing import Any, Dict, List, Optional, Union from hubitatmaker import ( CAP_COLOR_CONTROL, CAP_COLOR_TEMP, CAP_LIGHT, CAP_SWITCH, CAP_SWITCH_LEVEL, CMD_ON, CMD_SET_COLOR, CMD_SET_COLOR_TEMP, CMD_SET_LEVEL, COLOR_MODE_CT...
true
true
f7f0ae50f2a335c6612f8cfdd5e8333dc9f2ca4d
4,743
py
Python
accounting/accounting/doctype/purchase_invoice/purchase_invoice.py
18alantom/ideal-fiesta
86f86cb69b0328ba3f6d6b1a5e6e3493ce416128
[ "MIT" ]
null
null
null
accounting/accounting/doctype/purchase_invoice/purchase_invoice.py
18alantom/ideal-fiesta
86f86cb69b0328ba3f6d6b1a5e6e3493ce416128
[ "MIT" ]
null
null
null
accounting/accounting/doctype/purchase_invoice/purchase_invoice.py
18alantom/ideal-fiesta
86f86cb69b0328ba3f6d6b1a5e6e3493ce416128
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Lin To and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class PurchaseInvoice(Document): def validate(self): self.validate_account_types() ...
36.484615
85
0.636517
from __future__ import unicode_literals import frappe from frappe.model.document import Document class PurchaseInvoice(Document): def validate(self): self.validate_account_types() self.validate_item_quantities() def before_save(self): self.set_item_entry_values() self.s...
true
true
f7f0ae70c790f1e63f0d255be639c9286100c788
8,554
py
Python
tests/catalyst/metrics/functional/test_cmc_metric.py
gr33n-made/catalyst
bd413abc908ef7cbdeab42b0e805277a791e3ddb
[ "Apache-2.0" ]
1
2021-09-29T20:30:50.000Z
2021-09-29T20:30:50.000Z
tests/catalyst/metrics/functional/test_cmc_metric.py
gr33n-made/catalyst
bd413abc908ef7cbdeab42b0e805277a791e3ddb
[ "Apache-2.0" ]
null
null
null
tests/catalyst/metrics/functional/test_cmc_metric.py
gr33n-made/catalyst
bd413abc908ef7cbdeab42b0e805277a791e3ddb
[ "Apache-2.0" ]
1
2021-06-11T16:33:30.000Z
2021-06-11T16:33:30.000Z
# flake8: noqa from typing import List, Tuple from itertools import chain import numpy as np import pytest import torch from catalyst.metrics.functional._cmc_score import cmc_score, cmc_score_count, masked_cmc_score EPS = 1e-4 TEST_DATA_SIMPLE = ( # (distance_matrix, conformity_matrix, topk, expected_value) ...
32.524715
99
0.581833
from typing import List, Tuple from itertools import chain import numpy as np import pytest import torch from catalyst.metrics.functional._cmc_score import cmc_score, cmc_score_count, masked_cmc_score EPS = 1e-4 TEST_DATA_SIMPLE = ( (torch.tensor([[1, 2], [2, 1]]), torch.tensor([[0, 1], [1, 0]]), 1, 0.0),...
true
true
f7f0aefde33c8c94705e330433325671bd4ced05
4,908
py
Python
python3/koans/about_classes.py
jguitar/python-koans
5fbce6587cc10ee6a002becd4c557d635c535ec5
[ "MIT" ]
null
null
null
python3/koans/about_classes.py
jguitar/python-koans
5fbce6587cc10ee6a002becd4c557d635c535ec5
[ "MIT" ]
null
null
null
python3/koans/about_classes.py
jguitar/python-koans
5fbce6587cc10ee6a002becd4c557d635c535ec5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutClasses(Koan): class Dog: "Dogs need regular walkies. Never, ever let them drive." def test_instances_of_classes_can_be_created_adding_parentheses(self): # NOTE: The .__name__ attribute will convert the class ...
29.04142
79
0.570293
from runner.koan import * class AboutClasses(Koan): class Dog: def test_instances_of_classes_can_be_created_adding_parentheses(self): fido = self.Dog() self.assertEqual('Dog', fido.__class__.__name__) def test_classes_have_docstrings(self): self.assertRegex(s...
true
true
f7f0b08c222caa44dd042bd783f69e8d7aaef915
1,870
py
Python
app/models/Username.py
haryobagus/haryo_ig
1ad160b422d2c6d5b9b3016e312eb77a576ff9b1
[ "MIT" ]
null
null
null
app/models/Username.py
haryobagus/haryo_ig
1ad160b422d2c6d5b9b3016e312eb77a576ff9b1
[ "MIT" ]
null
null
null
app/models/Username.py
haryobagus/haryo_ig
1ad160b422d2c6d5b9b3016e312eb77a576ff9b1
[ "MIT" ]
null
null
null
from app.config import db def get_all(): try: conn = db.conn() with conn.cursor() as cursor: sql = '''SELECT * FROM ig_usernames ORDER BY id DESC''' cursor.execute(sql) conn.commit() conn.close() return cursor.fetchall() except Exception as e: ...
27.910448
73
0.542781
from app.config import db def get_all(): try: conn = db.conn() with conn.cursor() as cursor: sql = '''SELECT * FROM ig_usernames ORDER BY id DESC''' cursor.execute(sql) conn.commit() conn.close() return cursor.fetchall() except Exception as e: ...
true
true
f7f0b0b4f5a36dc739c0b034bd3435cf1900790b
21,673
py
Python
python-client/trustedanalytics/meta/metaprog.py
skavulya/atk
c83f0bee2530282e39bf28d4a15355561b5eca4d
[ "Apache-2.0" ]
1
2016-04-05T21:57:16.000Z
2016-04-05T21:57:16.000Z
python-client/trustedanalytics/meta/metaprog.py
skavulya/atk
c83f0bee2530282e39bf28d4a15355561b5eca4d
[ "Apache-2.0" ]
null
null
null
python-client/trustedanalytics/meta/metaprog.py
skavulya/atk
c83f0bee2530282e39bf28d4a15355561b5eca4d
[ "Apache-2.0" ]
null
null
null
# vim: set encoding=utf-8 # # Copyright (c) 2015 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
40.284387
199
0.702625
import logging logger = logging.getLogger('meta') import sys import inspect from trustedanalytics.core.api import api_globals, api_status from trustedanalytics.core.atktypes import unit from trustedanalytics.meta.installpath import InstallPath from trustedanalytics.meta.context import get_api_cont...
true
true
f7f0b1ad60f6147224e50d8a5df134945fac2b6a
3,204
py
Python
examples/ex_mls.py
ZenulAbidin/zignal
df1526aa687f513f096a6c5f6790a34e794752a4
[ "MIT" ]
1
2020-05-20T16:54:14.000Z
2020-05-20T16:54:14.000Z
examples/ex_mls.py
ZenulAbidin/zignal
df1526aa687f513f096a6c5f6790a34e794752a4
[ "MIT" ]
null
null
null
examples/ex_mls.py
ZenulAbidin/zignal
df1526aa687f513f096a6c5f6790a34e794752a4
[ "MIT" ]
null
null
null
''' Created on 7 Dec 2015 @author: Ronny Andersson (ronny@andersson.tk) @copyright: (c) 2015 Ronny Andersson @license: MIT ''' # standard library import logging # custom libraries import zignal def fake_system(x, fs=None): f1 = zignal.filters.biquads.RBJ(filtertype="peak", gaindb=-30, f0=10, Q=0.707*10, fs=fs...
36
94
0.691948
import logging import zignal def fake_system(x, fs=None): f1 = zignal.filters.biquads.RBJ(filtertype="peak", gaindb=-30, f0=10, Q=0.707*10, fs=fs) f2 = zignal.filters.biquads.RBJ(filtertype="peak", gaindb=50, f0=100, Q=0.707*10, fs=fs) f3 = zignal.filters.biquads.RBJ(filtertype="peak", gaindb=-60, ...
true
true
f7f0b1f9bbf77e280b2d0ad043fef9119e3534ee
125
py
Python
tests/test_augassign/output.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
null
null
null
tests/test_augassign/output.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
19
2020-12-28T17:17:12.000Z
2021-12-22T20:44:42.000Z
tests/test_augassign/output.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
1
2021-03-20T17:41:14.000Z
2021-03-20T17:41:14.000Z
a = b = c = d = mat = 0 a += 2 a -= b c *= d mat @= mat d /= d a %= 2 a **= 2 b <<= 2 c >>= 2 a |= 0 a &= 1 a ^= 0 a //= 2.5
8.333333
23
0.312
a = b = c = d = mat = 0 a += 2 a -= b c *= d mat @= mat d /= d a %= 2 a **= 2 b <<= 2 c >>= 2 a |= 0 a &= 1 a ^= 0 a //= 2.5
true
true
f7f0b22df71bde0c7f96b0aa3931f7e48cbb9a0c
3,460
py
Python
graalpython/benchmarks/src/benchmarks/interop/python_r_image_demo.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
1
2019-05-28T13:04:32.000Z
2019-05-28T13:04:32.000Z
graalpython/benchmarks/src/benchmarks/interop/python_r_image_demo.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
graalpython/benchmarks/src/benchmarks/interop/python_r_image_demo.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this software, a...
36.808511
108
0.741908
import polyglot import sys import os working_dir_parts = __file__.split(os.sep)[:-1] sys.path.insert(0, os.sep.join(working_dir_parts[:-1])) from image_magix import Image load_jpeg = polyglot.eval(string="""function(file.name) { jimg <- read.csv(gzfile(file.name)) retu...
true
true
f7f0b3ba23e35cd8301ce92ead7ae2b2d86178fc
9,417
py
Python
json_parser_train.py
rosivagyok/Attention
a4cd90dc5f992ae2fe5a7874628d04f531d4aebc
[ "MIT" ]
null
null
null
json_parser_train.py
rosivagyok/Attention
a4cd90dc5f992ae2fe5a7874628d04f531d4aebc
[ "MIT" ]
null
null
null
json_parser_train.py
rosivagyok/Attention
a4cd90dc5f992ae2fe5a7874628d04f531d4aebc
[ "MIT" ]
1
2019-01-18T12:59:04.000Z
2019-01-18T12:59:04.000Z
import json import os import numpy as np, h5py import scipy.io as sp import pandas as pd from depth import depthlist from feature_smooth import feature_smooth from utils import angle_between, cross_validation def parse_feats(f_in,f_out,f_in_d,depth,oversample): """ Load """ json_files = os.listdir(f_in) ...
53.505682
198
0.641606
import json import os import numpy as np, h5py import scipy.io as sp import pandas as pd from depth import depthlist from feature_smooth import feature_smooth from utils import angle_between, cross_validation def parse_feats(f_in,f_out,f_in_d,depth,oversample): json_files = os.listdir(f_in) face_feats_al...
true
true
f7f0b3c0f302e0257d3ba22a8dff5a31db1abcea
7,538
py
Python
textrank4zh/util.py
HeJinHub/text-rank
0829ba6e8a05264f80144435c595c7233cfce103
[ "MIT" ]
25
2018-06-30T01:38:35.000Z
2022-03-02T01:30:43.000Z
textrank4zh/util.py
HeJinHub/text-rank
0829ba6e8a05264f80144435c595c7233cfce103
[ "MIT" ]
1
2019-09-25T08:13:37.000Z
2019-09-25T08:13:37.000Z
textrank4zh/util.py
HeJinHub/text-rank
0829ba6e8a05264f80144435c595c7233cfce103
[ "MIT" ]
13
2018-06-14T02:59:33.000Z
2021-04-12T16:18:14.000Z
#-*- encoding:utf-8 -*- """ @author: letian @homepage: http://www.letiantian.me @github: https://github.com/someus/ """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os import math import networkx as nx import numpy as np import sys from . impor...
30.395161
123
0.577341
from __future__ import (absolute_import, division, print_function, unicode_literals) import os import math import networkx as nx import numpy as np import sys from . import compute_yingda try: reload(sys) sys.setdefaultencoding('utf-8') except: pass sentence_delimiters = ['?'...
true
true
f7f0b593aea492704993cc2b2461da886e9086ab
3,701
py
Python
model_zoo/official/cv/resnet/eval.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
model_zoo/official/cv/resnet/eval.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
model_zoo/official/cv/resnet/eval.py
Joejiong/mindspore
083fd6565cab1aa1d3114feeacccf1cba0d55e80
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
39.795699
116
0.719805
import os import random import argparse import numpy as np from mindspore import context from mindspore import dataset as de from mindspore.nn.loss import SoftmaxCrossEntropyWithLogits from mindspore.train.model import Model from mindspore.train.serialization import load_checkpoint, load_param_into_net p...
true
true
f7f0b5bcb4e2dde8c5f30b39e4c9ef460968b7eb
84,084
py
Python
tests/keras/backend/backend_test.py
IndigenousEngineering/keras_docker_with_NLTK
075958831a3f74763ad1e094b3642f5174c7f817
[ "MIT" ]
1
2018-11-19T03:53:01.000Z
2018-11-19T03:53:01.000Z
tests/keras/backend/backend_test.py
IndigenousEngineering/keras_docker_with_NLTK
075958831a3f74763ad1e094b3642f5174c7f817
[ "MIT" ]
null
null
null
tests/keras/backend/backend_test.py
IndigenousEngineering/keras_docker_with_NLTK
075958831a3f74763ad1e094b3642f5174c7f817
[ "MIT" ]
1
2019-03-07T21:52:26.000Z
2019-03-07T21:52:26.000Z
import pytest from numpy.testing import assert_allclose import numpy as np import scipy.sparse as sparse import warnings from keras import backend as K from keras.backend import floatx, set_floatx, variable from keras.utils.conv_utils import convert_kernel from keras.backend import numpy_backend as KNP try: from...
42.79084
85
0.544456
import pytest from numpy.testing import assert_allclose import numpy as np import scipy.sparse as sparse import warnings from keras import backend as K from keras.backend import floatx, set_floatx, variable from keras.utils.conv_utils import convert_kernel from keras.backend import numpy_backend as KNP try: from...
true
true
f7f0b5c930fb9d2cbaa701b659c96d75ae6e566e
342
py
Python
build/lib/scratch_py/colour.py
Gordon003/Scratch-To-Python
ae67d01b667c2fddf5028fd27484692409f17795
[ "MIT" ]
4
2020-04-04T01:22:46.000Z
2021-03-24T03:32:27.000Z
build/lib/scratch_py/colour.py
Gordon003/Scratch-To-Python
ae67d01b667c2fddf5028fd27484692409f17795
[ "MIT" ]
null
null
null
build/lib/scratch_py/colour.py
Gordon003/Scratch-To-Python
ae67d01b667c2fddf5028fd27484692409f17795
[ "MIT" ]
null
null
null
BLACK = (0, 0, 0) BLUE = (0, 0, 255) CYAN = (0, 255, 255) GRAY = (128, 128, 128) GREEN = (0, 128, 0) LIME = (0, 255, 0) MAGNETA = (255, 0, 255) MAROON = (128, 0, 0) NAVY = (0, 0, 128) OLIVE = (128, 128, 0) ORANGE = (255, 165, 0) PURPLE = (128, 0, 128) RED = (255, 0 , 0) SILVER = (192, 192, 192) WHITE = (255, 255, 255) ...
21.375
24
0.532164
BLACK = (0, 0, 0) BLUE = (0, 0, 255) CYAN = (0, 255, 255) GRAY = (128, 128, 128) GREEN = (0, 128, 0) LIME = (0, 255, 0) MAGNETA = (255, 0, 255) MAROON = (128, 0, 0) NAVY = (0, 0, 128) OLIVE = (128, 128, 0) ORANGE = (255, 165, 0) PURPLE = (128, 0, 128) RED = (255, 0 , 0) SILVER = (192, 192, 192) WHITE = (255, 255, 255) ...
true
true
f7f0b62d5c86ede1edea695294499a6b0e62d72b
3,995
py
Python
google/ads/google_ads/v0/proto/enums/parental_status_type_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/enums/parental_status_type_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v0/proto/enums/parental_status_type_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v0/proto/enums/parental_status_type.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message...
38.786408
658
0.784731
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db =...
true
true
f7f0b7d3a39ad5bce39d45678f21e858b5490475
3,999
py
Python
src/kuka_iiwa/kuka_iiwa_utilities/scripts/iiwa_joint_ee_data_collection.py
alessandrocuda/Iiwa_vision_reaching_object
63c42109f8aaff56734ba2071121e97cc45d0b84
[ "MIT" ]
null
null
null
src/kuka_iiwa/kuka_iiwa_utilities/scripts/iiwa_joint_ee_data_collection.py
alessandrocuda/Iiwa_vision_reaching_object
63c42109f8aaff56734ba2071121e97cc45d0b84
[ "MIT" ]
null
null
null
src/kuka_iiwa/kuka_iiwa_utilities/scripts/iiwa_joint_ee_data_collection.py
alessandrocuda/Iiwa_vision_reaching_object
63c42109f8aaff56734ba2071121e97cc45d0b84
[ "MIT" ]
2
2021-07-29T21:52:52.000Z
2022-03-17T03:12:59.000Z
#!/usr/bin/python3 import rospy import rospkg import random import numpy as np import pickle from itertools import product from gazebo_msgs.srv import GetLinkState from gazebo_msgs.msg import LinkState from std_msgs.msg import Float64MultiArray from sensor_msgs.msg import JointState def save_object(obj): try: ...
33.605042
193
0.686172
import rospy import rospkg import random import numpy as np import pickle from itertools import product from gazebo_msgs.srv import GetLinkState from gazebo_msgs.msg import LinkState from std_msgs.msg import Float64MultiArray from sensor_msgs.msg import JointState def save_object(obj): try: with open("...
true
true
f7f0b8ad97a3c19d1b3b1dea3a6dbd3c2c5de19f
7,672
py
Python
apk_builder/apk_builder.py
gameFace22/appmon
53a214dc60059923f1cfa7dd94b18b123e0db0d3
[ "Apache-2.0" ]
null
null
null
apk_builder/apk_builder.py
gameFace22/appmon
53a214dc60059923f1cfa7dd94b18b123e0db0d3
[ "Apache-2.0" ]
null
null
null
apk_builder/apk_builder.py
gameFace22/appmon
53a214dc60059923f1cfa7dd94b18b123e0db0d3
[ "Apache-2.0" ]
1
2019-12-31T05:30:25.000Z
2019-12-31T05:30:25.000Z
#!/usr/bin/python ### # Copyright (c) 2016 Nishant Das Patnaik. # # 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 b...
35.354839
137
0.671011
mport os, sys, re, argparse, codecs import subprocess, pwd, glob, shutil import time, zipfile, traceback from termcolor import colored parser = argparse.ArgumentParser() parser.add_argument('--apk', action='store', dest='apk_path', default='', help='''(absolute) path to APK''') parser.add_arg...
false
true
f7f0b8fe2a216c0c0fd97e5c518720e40b0abb4f
2,816
py
Python
sphere/sphere_symtest.py
TaskeHAMANO/SPHERE
22a6b7f18fa1a9cb2d50d9ce210b2d9a21f7541c
[ "BSD-3-Clause" ]
2
2019-01-08T23:53:06.000Z
2020-03-27T13:35:55.000Z
sphere/sphere_symtest.py
TaskeHAMANO/SPHERE
22a6b7f18fa1a9cb2d50d9ce210b2d9a21f7541c
[ "BSD-3-Clause" ]
null
null
null
sphere/sphere_symtest.py
TaskeHAMANO/SPHERE
22a6b7f18fa1a9cb2d50d9ce210b2d9a21f7541c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # vim:fileencoding=utf-8 # Author: Shinya Suzuki # Created: 2018-04-26 from collections import namedtuple from sphere.sphere_utils import load_depth_file from sphere.sphere_cstats import (mean_resultant_length, mean_direction, si...
28.16
76
0.553977
from collections import namedtuple from sphere.sphere_utils import load_depth_file from sphere.sphere_cstats import (mean_resultant_length, mean_direction, sin_moment, cos_moment) from scipy.stats import norm impo...
true
true
f7f0ba467279b3f654bdbdca1e4fbdcc9d85dd0b
4,216
py
Python
rl_coach/architectures/tensorflow_components/heads/rainbow_q_head.py
Lpallett4/coach
801cf573cc4033940dce64651ffcddf391e6ded9
[ "Apache-2.0" ]
1,960
2017-10-19T10:31:24.000Z
2020-11-07T18:19:23.000Z
rl_coach/architectures/tensorflow_components/heads/rainbow_q_head.py
Lpallett4/coach
801cf573cc4033940dce64651ffcddf391e6ded9
[ "Apache-2.0" ]
349
2017-10-21T17:17:18.000Z
2020-10-17T13:39:56.000Z
rl_coach/architectures/tensorflow_components/heads/rainbow_q_head.py
Lpallett4/coach
801cf573cc4033940dce64651ffcddf391e6ded9
[ "Apache-2.0" ]
428
2017-10-21T01:32:58.000Z
2020-11-07T13:49:49.000Z
# # Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
49.023256
118
0.661528
import tensorflow as tf import numpy as np from rl_coach.architectures.tensorflow_components.heads import QHead from rl_coach.architectures.tensorflow_components.layers import Dense from rl_coach.base_parameters import AgentParameters from rl_coach.spaces import SpacesDefinition class RainbowQHead(QHe...
true
true
f7f0bb3251fd72bfed84e9ce920a7e0cc14d1308
4,834
py
Python
src/programy/parser/pattern/nodes/regex.py
ItsPhant/program-y
c2b211fcaf8cedc7d6d95a8ea9470a913efa1622
[ "MIT" ]
null
null
null
src/programy/parser/pattern/nodes/regex.py
ItsPhant/program-y
c2b211fcaf8cedc7d6d95a8ea9470a913efa1622
[ "MIT" ]
null
null
null
src/programy/parser/pattern/nodes/regex.py
ItsPhant/program-y
c2b211fcaf8cedc7d6d95a8ea9470a913efa1622
[ "MIT" ]
1
2020-02-21T17:58:05.000Z
2020-02-21T17:58:05.000Z
""" Copyright (c) 2016-17 Keith Sterling http://www.keithsterling.com 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...
41.672414
120
0.643566
import logging import re from programy.parser.pattern.nodes.base import PatternNode from programy.parser.pattern.matcher import EqualsMatch from programy.parser.exceptions import ParserException class PatternRegexNode(PatternNode): def __init__(self, attribs, text): PatternNode.__init__(self) s...
true
true
f7f0bb41eb2a9d2823f57f2dafbaf2969e8dcedf
373
py
Python
.history/my_classes/FirstClassFunctions/reducing_functions_20210707134804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707134804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/FirstClassFunctions/reducing_functions_20210707134804.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
"""Reducing Functions in Python These are functions that recombine an iterable recursively, ending up with a single return value Also called accumulators, aggregators, or folding functions Example: Finding the maximum value in an iterable a0, a1, a2, ...,, aN-1 max(a, b) _> maximum of a and b result =a0 r...
21.941176
96
0.72118
true
true
f7f0bb7337cb5f74106ff34ddee267a8ab8ca897
6,011
py
Python
configs/representation/ssst/ssst_r18_gt_a3_nc_sgd_cos_50e_r2_2x1x2_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/ssst/ssst_r18_gt_a3_nc_sgd_cos_50e_r2_2x1x2_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/ssst/ssst_r18_gt_a3_nc_sgd_cos_50e_r2_2x1x2_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
# model settings temperature = 0.2 with_norm = True query_dim = 128 model = dict( type='SimSiamBaseSTSNTracker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), # strides=(1, 2, 1, 1), norm_cfg=dict(type='SyncBN', requires_grad=True), ...
30.51269
79
0.618699
temperature = 0.2 with_norm = True query_dim = 128 model = dict( type='SimSiamBaseSTSNTracker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), norm_cfg=dict(type='SyncBN', requires_grad=True), norm_eval=False, zero_in...
true
true
f7f0bc03fc1b47e58cdd9e34db87172fb19b8cd7
2,458
py
Python
Programa/persistencia/persucursal.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
Programa/persistencia/persucursal.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
Programa/persistencia/persucursal.py
gabofer82/taller_programacion_2017
f876a1711374b97824f06a216a14481f3d8b75f1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .basededatos import BaseDeDatos class PerSucursal(BaseDeDatos): def obtener_uno(self, id_): """ Obtiene y retorna un objeto según el id dado. :param id_: int >= 0 :return: object """ if id_ >= 0: id_ = (id_,) sql...
32.342105
79
0.535801
from .basededatos import BaseDeDatos class PerSucursal(BaseDeDatos): def obtener_uno(self, id_): """ Obtiene y retorna un objeto según el id dado. :param id_: int >= 0 :return: object """ if id_ >= 0: id_ = (id_,) sql = 'SELECT * FROM sucur...
false
true
f7f0bca8ee3e8492923e5641837db434ea762827
611
py
Python
website/webapp/json_api/tests/test_serializers.py
ultimatecoder/dockerapi
0ae0a97aac5218b8eb07d589cd90b63c8fc2ea74
[ "MIT" ]
null
null
null
website/webapp/json_api/tests/test_serializers.py
ultimatecoder/dockerapi
0ae0a97aac5218b8eb07d589cd90b63c8fc2ea74
[ "MIT" ]
null
null
null
website/webapp/json_api/tests/test_serializers.py
ultimatecoder/dockerapi
0ae0a97aac5218b8eb07d589cd90b63c8fc2ea74
[ "MIT" ]
null
null
null
import unittest from unittest.mock import Mock from .. import serializers class TestDictSerializer(unittest.TestCase): def setUp(self): self.obj = Mock( attr_1="Attribute 1", attr_2="Attribute 2", attr_3="Attribute 3" ) def test_object_serialize_appropria...
24.44
57
0.597381
import unittest from unittest.mock import Mock from .. import serializers class TestDictSerializer(unittest.TestCase): def setUp(self): self.obj = Mock( attr_1="Attribute 1", attr_2="Attribute 2", attr_3="Attribute 3" ) def test_object_serialize_appropria...
true
true
f7f0bced9174bbfb557174019bbc2627c6628e9f
960
py
Python
logger.py
xmacex/easy-faster-rcnn.pytorch
2c30c6d4ea57402c813294a499181b6ad710f858
[ "MIT" ]
174
2018-09-04T06:03:23.000Z
2022-03-22T07:24:14.000Z
logger.py
xmacex/easy-faster-rcnn.pytorch
2c30c6d4ea57402c813294a499181b6ad710f858
[ "MIT" ]
32
2018-11-29T11:20:23.000Z
2022-03-01T05:19:17.000Z
logger.py
xmacex/easy-faster-rcnn.pytorch
2c30c6d4ea57402c813294a499181b6ad710f858
[ "MIT" ]
76
2018-11-08T05:47:59.000Z
2022-03-22T07:22:12.000Z
import logging class Logger(object): Initialized = False @staticmethod def initialize(path_to_log_file): logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', ...
26.666667
77
0.580208
import logging class Logger(object): Initialized = False @staticmethod def initialize(path_to_log_file): logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', ...
true
true
f7f0bd7e0096675f03597dc033211fc866ad3374
111
py
Python
functional_tests/test_client.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
153
2021-02-06T13:41:11.000Z
2022-03-19T17:51:01.000Z
functional_tests/test_client.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
29
2021-01-15T12:54:37.000Z
2022-02-07T07:45:32.000Z
functional_tests/test_client.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
17
2021-01-29T15:20:04.000Z
2022-01-30T07:21:03.000Z
def test_token(token): assert token def test_authentification(client): assert client.get_requester()
15.857143
34
0.756757
def test_token(token): assert token def test_authentification(client): assert client.get_requester()
true
true
f7f0bfa65d0d8d326b1c011d54762a29c723c128
7,257
py
Python
snekcord/ws/shardws.py
NovaTohsaka/snekcord
8811e6cf41a4561d051715a56f00dd1f38ab002e
[ "MIT" ]
null
null
null
snekcord/ws/shardws.py
NovaTohsaka/snekcord
8811e6cf41a4561d051715a56f00dd1f38ab002e
[ "MIT" ]
null
null
null
snekcord/ws/shardws.py
NovaTohsaka/snekcord
8811e6cf41a4561d051715a56f00dd1f38ab002e
[ "MIT" ]
null
null
null
import enum import json import platform import time from wsaio import taskify from .basews import BaseWebSocket, WebSocketResponse from ..utils import Snowflake class ShardOpcode(enum.IntEnum): DISPATCH = 0 # Discord -> Shard HEARTBEAT = 1 # Discord <-> Shard IDENTIFY = 2 # Discord <- Shard PRESE...
30.75
76
0.537688
import enum import json import platform import time from wsaio import taskify from .basews import BaseWebSocket, WebSocketResponse from ..utils import Snowflake class ShardOpcode(enum.IntEnum): DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 PRESENCE_UPDATE = 3 VOICE_STATE_UPDATE = 4 VOICE...
true
true
f7f0c0d42bb6de0d7f339cd11fd852739fd7bce1
982
py
Python
CustomerHome/migrations/0001_initial.py
2000090063/Vehicle_Rental_System-SDP-2-
483d811aa239a226607b4bfb262c99da3be017b4
[ "MIT" ]
3
2022-03-12T08:27:42.000Z
2022-03-17T12:16:16.000Z
CustomerHome/migrations/0001_initial.py
2000090063/Vehicle_Rental_System-SDP-2-
483d811aa239a226607b4bfb262c99da3be017b4
[ "MIT" ]
null
null
null
CustomerHome/migrations/0001_initial.py
2000090063/Vehicle_Rental_System-SDP-2-
483d811aa239a226607b4bfb262c99da3be017b4
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-12-21 07:17 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField...
33.862069
114
0.590631
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize...
true
true
f7f0c18edfd8e98ae1539b978ba97312bfde30cf
716
py
Python
termapp/overlay_event.py
faintcoder/termapp
a73bee4f7cf44caf847ff17cdc83fcdac5bc6daa
[ "MIT" ]
1
2018-08-05T12:30:12.000Z
2018-08-05T12:30:12.000Z
termapp/overlay_event.py
faintcoder/termapp
a73bee4f7cf44caf847ff17cdc83fcdac5bc6daa
[ "MIT" ]
null
null
null
termapp/overlay_event.py
faintcoder/termapp
a73bee4f7cf44caf847ff17cdc83fcdac5bc6daa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import urwid class OverlayEvent(urwid.WidgetWrap): def __init__( self, first_widget, second_widget, width = 15, height = 10, vertical_align = "middle", horizontal_align = "center" ): # Create widget overlay overlay = ur...
20.457143
45
0.557263
import urwid class OverlayEvent(urwid.WidgetWrap): def __init__( self, first_widget, second_widget, width = 15, height = 10, vertical_align = "middle", horizontal_align = "center" ): overlay = urwid.Overlay( first_widget, second_widge...
true
true
f7f0c2124e743608a4d356ca905d7d9d9ee3a8a4
3,382
py
Python
ultracart/models/coupon_free_shipping_specific_items.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
1
2018-03-15T16:56:23.000Z
2018-03-15T16:56:23.000Z
ultracart/models/coupon_free_shipping_specific_items.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
ultracart/models/coupon_free_shipping_specific_items.py
UltraCart/rest_api_v2_sdk_python
d734ea13fabc7a57872ff68bac06861edb8fd882
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class CouponFreeShippingSpecif...
28.661017
101
0.574808
import pprint import re import six class CouponFreeShippingSpecificItems(object): swagger_types = { 'items': 'list[str]' } attribute_map = { 'items': 'items' } def __init__(self, items=None): self._items = None self.discriminator = None if item...
true
true
f7f0c227dcdf1ee4f74131728353bb2fe2400a3c
3,669
py
Python
python/test/feature_assembler_test.py
Vectorly/vmaf
d21cdef1d3d87b3b5f99545816bfb65ae1a08102
[ "BSD-2-Clause-Patent" ]
2
2020-08-16T14:37:28.000Z
2020-08-16T15:50:23.000Z
python/test/feature_assembler_test.py
Vectorly/vmaf
d21cdef1d3d87b3b5f99545816bfb65ae1a08102
[ "BSD-2-Clause-Patent" ]
null
null
null
python/test/feature_assembler_test.py
Vectorly/vmaf
d21cdef1d3d87b3b5f99545816bfb65ae1a08102
[ "BSD-2-Clause-Patent" ]
null
null
null
from __future__ import absolute_import __copyright__ = "Copyright 2016-2020, Netflix, Inc." __license__ = "BSD+Patent" import unittest from vmaf.core.feature_assembler import FeatureAssembler from vmaf.core.feature_extractor import VmafFeatureExtractor, FeatureExtractor, \ MomentFeatureExtractor from test.testu...
37.824742
101
0.69583
from __future__ import absolute_import __copyright__ = "Copyright 2016-2020, Netflix, Inc." __license__ = "BSD+Patent" import unittest from vmaf.core.feature_assembler import FeatureAssembler from vmaf.core.feature_extractor import VmafFeatureExtractor, FeatureExtractor, \ MomentFeatureExtractor from test.testu...
true
true
f7f0c26ee83cce0e8079b12ec61d3dfd6cd23727
5,941
py
Python
pyabc/populationstrategy.py
wdwang/pyABC
65f85d97f20ac47df6a6d95cb373adba35738f57
[ "BSD-3-Clause" ]
null
null
null
pyabc/populationstrategy.py
wdwang/pyABC
65f85d97f20ac47df6a6d95cb373adba35738f57
[ "BSD-3-Clause" ]
null
null
null
pyabc/populationstrategy.py
wdwang/pyABC
65f85d97f20ac47df6a6d95cb373adba35738f57
[ "BSD-3-Clause" ]
null
null
null
""" Population strategy =================== Strategies to choose the population size. The population size can be constant or can change over the course of the generations. """ import json import logging import numpy as np from typing import List from pyabc.cv.bootstrap import calc_cv from .transition import Transi...
30.623711
79
0.63895
import json import logging import numpy as np from typing import List from pyabc.cv.bootstrap import calc_cv from .transition import Transition from .transition.predict_population_size import predict_population_size adaptation_logger = logging.getLogger("Adaptation") class PopulationStrategy: def __init__(se...
true
true
f7f0c3b3609f49a8dd7e2be15873977fa94eacc3
1,543
py
Python
adb/sign_cryptography.py
4oo4/python-adb
498b74bd628273823ad5393b290421ef66c1a90d
[ "Apache-2.0" ]
1
2020-08-19T16:09:40.000Z
2020-08-19T16:09:40.000Z
adb/sign_cryptography.py
4oo4/python-adb
498b74bd628273823ad5393b290421ef66c1a90d
[ "Apache-2.0" ]
null
null
null
adb/sign_cryptography.py
4oo4/python-adb
498b74bd628273823ad5393b290421ef66c1a90d
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.634146
81
0.741413
from adb import adb_protocol from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives.asymmetric imp...
true
true
f7f0c43215587fdd79b88f9480663ed87a4dcd7d
65
py
Python
mayan/apps/sources/exceptions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/sources/exceptions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/sources/exceptions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
class SourceException(Exception): """Base sources warning"""
21.666667
33
0.723077
class SourceException(Exception):
true
true
f7f0c53a6988a8936a4952346a927a2520916c89
7,714
py
Python
homeassistant/components/binary_sensor/device_trigger.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
6
2016-11-25T06:36:27.000Z
2021-11-16T11:20:23.000Z
homeassistant/components/binary_sensor/device_trigger.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
56
2020-08-03T07:30:54.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/binary_sensor/device_trigger.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Provides device triggers for binary sensors.""" import voluptuous as vol from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.device_automation.const import ( CONF_TURNED_OFF, CONF_TURNED_ON, ) from homeassistant.components.homeassistant.triggers import st...
30.132813
88
0.715323
import voluptuous as vol from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.device_automation.const import ( CONF_TURNED_OFF, CONF_TURNED_ON, ) from homeassistant.components.homeassistant.triggers import state as state_trigger from homeassistant.const impor...
true
true
f7f0c6a224a0060eefa3b9c5212457a9f3d23f22
10,251
py
Python
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
import random import numpy as np import torch.nn as nn import rlkit.misc.hyperparameter as hyp import rlkit.torch.pytorch_util as ptu from rlkit.data_management.her_replay_buffer import HerReplayBuffer from rlkit.envs.multitask.ant_env import GoalXYPosAnt, GoalXYPosAndVelAnt # from rlkit.envs.multitask.half_cheetah i...
32.235849
97
0.591162
import random import numpy as np import torch.nn as nn import rlkit.misc.hyperparameter as hyp import rlkit.torch.pytorch_util as ptu from rlkit.data_management.her_replay_buffer import HerReplayBuffer from rlkit.envs.multitask.ant_env import GoalXYPosAnt, GoalXYPosAndVelAnt from rlkit.envs.multitask.half_cheetah im...
true
true
f7f0c7776c43e9afc5b6a8dddcef1d11f826cd4a
294,588
py
Python
gpu/command_buffer/build_gles2_cmd_buffer.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-11-28T10:46:52.000Z
2019-11-28T10:46:52.000Z
gpu/command_buffer/build_gles2_cmd_buffer.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
gpu/command_buffer/build_gles2_cmd_buffer.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """code generator for GLES2 command buffers.""" import itertools import os import os.path import sys import re import platform fro...
31.751239
91
0.616091
"""code generator for GLES2 command buffers.""" import itertools import os import os.path import sys import re import platform from optparse import OptionParser from subprocess import call _SIZE_OF_UINT32 = 4 _SIZE_OF_COMMAND_HEADER = 4 _FIRST_SPECIFIC_COMMAND_ID = 256 _LICENSE = """// Copyright 2014 The Chromi...
false
true
f7f0c7b043211830d616310b0f2b6b52adf21144
3,148
py
Python
scripts/map_SNP_positions.py
kkarolis/seqcluster
774e23add8cd4fdc83d626cea3bd1f458e7d060d
[ "MIT" ]
33
2015-01-26T23:18:01.000Z
2022-01-07T21:40:49.000Z
scripts/map_SNP_positions.py
kkarolis/seqcluster
774e23add8cd4fdc83d626cea3bd1f458e7d060d
[ "MIT" ]
44
2015-01-21T17:43:42.000Z
2021-08-25T15:49:18.000Z
scripts/map_SNP_positions.py
kkarolis/seqcluster
774e23add8cd4fdc83d626cea3bd1f458e7d060d
[ "MIT" ]
18
2015-05-18T15:34:32.000Z
2021-02-10T17:58:24.000Z
from __future__ import print_function from argparse import ArgumentParser import os import gzip import pybedtools def _open_file(in_file): """From bcbio code""" _, ext = os.path.splitext(in_file) if ext == ".gz": return gzip.open(in_file, 'rb') if ext in [".fastq", ".fq"]: return open(...
35.370787
92
0.572109
from __future__ import print_function from argparse import ArgumentParser import os import gzip import pybedtools def _open_file(in_file): _, ext = os.path.splitext(in_file) if ext == ".gz": return gzip.open(in_file, 'rb') if ext in [".fastq", ".fq"]: return open(in_file, 'r') ret...
true
true
f7f0c876b00567be27d5aa8697b356326b3a816d
2,377
py
Python
color.py
const39/shell-prompt
46b0e57b55b6ab95af59d14ec4ba87355391cb0a
[ "MIT" ]
1
2020-11-10T12:03:42.000Z
2020-11-10T12:03:42.000Z
color.py
const39/shell-prompt
46b0e57b55b6ab95af59d14ec4ba87355391cb0a
[ "MIT" ]
null
null
null
color.py
const39/shell-prompt
46b0e57b55b6ab95af59d14ec4ba87355391cb0a
[ "MIT" ]
3
2020-10-29T12:44:45.000Z
2020-11-05T04:57:27.000Z
# Sets the color encoding which will be used: # - True : use Truecolors (24 bits encoding) - default # - False: use 256-colors (8 bits encoding) TrueColorsEnabled = True def _asTruecolorString(rgb): """ Encode the given color as a Truecolor string Parameters: rgb (tuple): a tuple containing Re...
29.7125
97
0.630206
TrueColorsEnabled = True def _asTruecolorString(rgb): return "2;{};{};{}".format(rgb[0], rgb[1], rgb[2]) def _as256String(rgb): redRatio = (0 if rgb[0] < 75 else (rgb[0] - 35) / 40) * 6 * 6 greenRatio = (0 if rgb[1] < 75 else (rgb[1] - 35) / 40) * 6 blueRatio = (0 if rgb[2] < 75 else (rgb[2] - 35...
true
true
f7f0c90766122ecae2d9b5c13f37de13bffd207f
511
py
Python
astr-119-hw-2/data_types.py
Swissler5/astr-119
2af96862bb6560cbfab74178936e13c794a91eda
[ "MIT" ]
null
null
null
astr-119-hw-2/data_types.py
Swissler5/astr-119
2af96862bb6560cbfab74178936e13c794a91eda
[ "MIT" ]
7
2021-09-28T16:50:31.000Z
2021-12-09T04:55:07.000Z
astr-119-hw-2/data_types.py
Swissler5/astr-119
2af96862bb6560cbfab74178936e13c794a91eda
[ "MIT" ]
null
null
null
#Shea Wissler import numpy as np #integers i = 10 #integer print(type(i)) #print the data type of i a_i = np.zeros(i,dtype=int) #declare an array of integers print(type(a_i)) #returns ndarray print(type(a_i[0])) #returns int64 #floats x = 119.0 #floating point number print(type(x)) #print the data type of x ...
23.227273
57
0.700587
import numpy as np i = 10 print(type(i)) a_i = np.zeros(i,dtype=int) print(type(a_i)) print(type(a_i[0])) x = 119.0 print(type(x)) y = 1.19e2 print(type(y)) z = np.zeros(i,dtype=float) print(type(z)) ))
true
true
f7f0ca12e7970a75f46fec3e144e1237256a6d78
2,264
py
Python
http-rest-srv/app.py
sourceperl/docker.grafana_feeders
389e24b3eab581629bebf95f24ef2d593eeb3ba1
[ "MIT" ]
null
null
null
http-rest-srv/app.py
sourceperl/docker.grafana_feeders
389e24b3eab581629bebf95f24ef2d593eeb3ba1
[ "MIT" ]
null
null
null
http-rest-srv/app.py
sourceperl/docker.grafana_feeders
389e24b3eab581629bebf95f24ef2d593eeb3ba1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # simple http api server to add tag to influxdb time series import re from flask import Flask, jsonify, request from influxdb import InfluxDBClient # some consts TAG_REGEX = '^[a-zA-Z0-9_]*$' # Flask app app = Flask(__name__) @app.route('/') def hello(): return '...
26.952381
102
0.52871
import re from flask import Flask, jsonify, request from influxdb import InfluxDBClient TAG_REGEX = '^[a-zA-Z0-9_]*$' app = Flask(__name__) @app.route('/') def hello(): return 'Hello World !' @app.route('/api/set_tag/<tag>', methods=['GET', 'POST']) def set_tag(tag): if not re.match(TAG_REGEX,...
true
true
f7f0cb1f1b7b2c63422305a436034e3af924e69e
1,014
py
Python
cogs/sample.py
SourSpoon/Discord.py-Template
9f7df487b1825a05704f02cd3333d4cc8db41d2e
[ "MIT" ]
25
2017-11-11T19:06:02.000Z
2021-06-20T06:45:50.000Z
cogs/sample.py
SourSpoon/Discord.py-Template
9f7df487b1825a05704f02cd3333d4cc8db41d2e
[ "MIT" ]
null
null
null
cogs/sample.py
SourSpoon/Discord.py-Template
9f7df487b1825a05704f02cd3333d4cc8db41d2e
[ "MIT" ]
27
2018-01-21T19:55:53.000Z
2021-09-10T19:43:27.000Z
import discord from discord.ext import commands class Sample(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_guild_join(self, guild): """ This event receives the the guild when the bot joins. """ print(f'Joined {guild.n...
24.731707
85
0.595661
import discord from discord.ext import commands class Sample(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_guild_join(self, guild): print(f'Joined {guild.name} with {guild.member_count} users!') @commands.command() async def test(se...
true
true
f7f0cb87e920f05c1ba84759ab288340fd025ab5
1,930
py
Python
pythonwarrior/tests/abilities/test_base.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
46
2015-02-02T19:32:05.000Z
2022-03-16T16:24:14.000Z
pythonwarrior/tests/abilities/test_base.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
5
2015-07-06T15:26:43.000Z
2020-04-21T08:12:04.000Z
pythonwarrior/tests/abilities/test_base.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
10
2015-02-10T02:56:22.000Z
2021-05-15T22:37:38.000Z
import unittest import mock from pythonwarrior.abilities.base import AbilityBase class TestAbilityBase(unittest.TestCase): def setUp(self): unit = mock.Mock() self.ability = AbilityBase(unit) def test_should_have_offset_for_directions(self): self.assertEqual(self.ability.offset('forwa...
42.888889
77
0.592228
import unittest import mock from pythonwarrior.abilities.base import AbilityBase class TestAbilityBase(unittest.TestCase): def setUp(self): unit = mock.Mock() self.ability = AbilityBase(unit) def test_should_have_offset_for_directions(self): self.assertEqual(self.ability.offset('forwa...
true
true
f7f0cbb97d377ac7945efcd905b51327df71d41b
547
py
Python
sites/migrations/0004_auto_20190320_1126.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
sites/migrations/0004_auto_20190320_1126.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
sites/migrations/0004_auto_20190320_1126.py
tc-mwangi/tuzwa-app
88875bfc11fb9637ff22f881257d4971cb523b06
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2019-03-20 08:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sites', '0003_auto_20190320_1024'), ] operations ...
24.863636
112
0.650823
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sites', '0003_auto_20190320_1024'), ] operations = [ migrations.AlterField( model_name='profile', ...
true
true
f7f0cbf0c1f33ad9b352d173cd39e74973125402
2,033
py
Python
shipper/auto.py
obukhov-sergey/shipper
574b30b2b76087d6ebb8ccf9824e175bd1c9d123
[ "Apache-2.0" ]
1
2021-11-27T14:40:26.000Z
2021-11-27T14:40:26.000Z
shipper/auto.py
obukhov-sergey/shipper
574b30b2b76087d6ebb8ccf9824e175bd1c9d123
[ "Apache-2.0" ]
null
null
null
shipper/auto.py
obukhov-sergey/shipper
574b30b2b76087d6ebb8ccf9824e175bd1c9d123
[ "Apache-2.0" ]
1
2021-11-27T14:40:27.000Z
2021-11-27T14:40:27.000Z
""" Copyright [2013] [Rackspace] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
32.269841
77
0.641909
import inspect from collections import namedtuple Arg = namedtuple("Arg", "name default") NoDefault = object() def generate(parser, *fn): subparsers = parser.add_subparsers(help="Yo") for fn in fn: _from_function(subparsers, fn) def _from_function(subparsers, fn): arguments = _inspect_arguments(...
true
true
f7f0cbf3af44e64f7d064033edaadef4d437ad29
649
py
Python
target/migrations/0007_auto_20190426_2124.py
groundupnews/gu
c7179ee3d058c8749d250d681032a76dc8d599d5
[ "BSD-3-Clause" ]
19
2018-01-28T14:35:40.000Z
2020-12-04T03:04:02.000Z
target/migrations/0007_auto_20190426_2124.py
groundupnews/gu
c7179ee3d058c8749d250d681032a76dc8d599d5
[ "BSD-3-Clause" ]
8
2018-06-02T14:28:28.000Z
2021-08-06T10:22:37.000Z
target/migrations/0007_auto_20190426_2124.py
groundupnews/gu
c7179ee3d058c8749d250d681032a76dc8d599d5
[ "BSD-3-Clause" ]
21
2018-02-25T14:07:48.000Z
2020-05-28T23:10:52.000Z
# Generated by Django 2.1.7 on 2019-04-26 19:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('target', '0006_target_rules'), ] operations = [ migrations.AlterField( model_name='target', name='rules', ...
34.157895
321
0.671803
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('target', '0006_target_rules'), ] operations = [ migrations.AlterField( model_name='target', name='rules', field=models.TextField(blank=True, default="M...
true
true
f7f0ccd58a264bcefce548aac0671caf7671f474
16,165
py
Python
dashboard/main.py
rudyn2/nhl-analysis
a427ae9fee48f8800d30b8ef4633cf1cc701b9e8
[ "MIT" ]
null
null
null
dashboard/main.py
rudyn2/nhl-analysis
a427ae9fee48f8800d30b8ef4633cf1cc701b9e8
[ "MIT" ]
null
null
null
dashboard/main.py
rudyn2/nhl-analysis
a427ae9fee48f8800d30b8ef4633cf1cc701b9e8
[ "MIT" ]
null
null
null
# Import required libraries import argparse import pathlib import dash import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd import plotly.express as px import psycopg2 from dash.dash import no_update from dash.dependencies import Input, Output from dash.exception...
41.132316
105
0.426663
import argparse import pathlib import dash import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd import plotly.express as px import psycopg2 from dash.dash import no_update from dash.dependencies import Input, Output from dash.exceptions import PreventUpdate fro...
true
true
f7f0cd37e8aaa0ae3bfe9d160c9f69a201bbe380
1,070
py
Python
src/social_auth/decorators.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
4
2019-05-27T13:55:07.000Z
2021-03-30T07:05:09.000Z
src/social_auth/decorators.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
196
2019-06-10T08:34:10.000Z
2022-02-22T01:26:13.000Z
src/social_auth/decorators.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
2
2021-01-26T09:53:39.000Z
2022-03-22T09:01:47.000Z
from __future__ import absolute_import from functools import wraps from django.core.urlresolvers import reverse from social_auth.backends import get_backend from social_auth.exceptions import WrongBackend def dsa_view(redirect_name=None): """Decorate djangos-social-auth views. Will check and retrieve backend ...
34.516129
78
0.651402
from __future__ import absolute_import from functools import wraps from django.core.urlresolvers import reverse from social_auth.backends import get_backend from social_auth.exceptions import WrongBackend def dsa_view(redirect_name=None): def dec(func): @wraps(func) def wrapper(request, backend...
true
true
f7f0cd762a07d7cc8910f79be47629e87799a209
929
py
Python
sqlite/sqll.py
Elia1996/GestionaleVendite
b6dd21ef4919880095d93d4056ab1715afe1db7e
[ "MIT" ]
null
null
null
sqlite/sqll.py
Elia1996/GestionaleVendite
b6dd21ef4919880095d93d4056ab1715afe1db7e
[ "MIT" ]
null
null
null
sqlite/sqll.py
Elia1996/GestionaleVendite
b6dd21ef4919880095d93d4056ab1715afe1db7e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sqlite3 # create if don't exist conn = sqlite3.connect("database.db") print(conn.total_changes) cursor = conn.cursor() #cursor.execute("CREATE TABLE if not exists Pippo ( id TEXT , n_operazione INTEGER, data TEXT, prezzo_totale FLOAT)") #cursor.execute("INSERT INTO Pippo VALUES ('c0', ...
32.034483
117
0.681378
import sqlite3 conn = sqlite3.connect("database.db") print(conn.total_changes) cursor = conn.cursor() #cursor.execute("CREATE TABLE if not exists Pippo ( id TEXT , n_operazione INTEGER, data TEXT, prezzo_totale FLOAT)") #cursor.execute("INSERT INTO Pippo VALUES ('c0', 10, 'daafa', 78.00)") #cursor.execute("INSERT...
true
true
f7f0ce32b4ad98cf59070f366e78c352ef61fedd
1,776
py
Python
index/migrations/0003_auto_20210311_2325.py
csy0x1/Online_Education_Resouce_Platform
3cb24d0a8eea01e4311744839c2211bdeb6daa36
[ "MIT" ]
1
2022-03-03T09:06:43.000Z
2022-03-03T09:06:43.000Z
index/migrations/0003_auto_20210311_2325.py
csy0x1/Online_Education_Resouce_Platform
3cb24d0a8eea01e4311744839c2211bdeb6daa36
[ "MIT" ]
null
null
null
index/migrations/0003_auto_20210311_2325.py
csy0x1/Online_Education_Resouce_Platform
3cb24d0a8eea01e4311744839c2211bdeb6daa36
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-11 15:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('index', '0002_auto_20210311_2323'), ] operations = [ migrations.AlterField( model_name='users', name='create_time', ...
32.888889
125
0.566441
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('index', '0002_auto_20210311_2323'), ] operations = [ migrations.AlterField( model_name='users', name='create_time', field=models.DateTimeField(auto_now...
true
true
f7f0ce4b7749f1148e61232bea27940e8c578a38
666
py
Python
micropython/examples/picosystem/test.py
Fordi/picosystem
6b91ad198b00507a7ff780a86ce5a2be2f650a07
[ "MIT" ]
41
2021-10-06T20:29:27.000Z
2022-03-28T10:45:46.000Z
micropython/examples/picosystem/test.py
Fordi/picosystem
6b91ad198b00507a7ff780a86ce5a2be2f650a07
[ "MIT" ]
21
2021-10-08T05:41:54.000Z
2022-02-16T11:25:37.000Z
micropython/examples/picosystem/test.py
Fordi/picosystem
6b91ad198b00507a7ff780a86ce5a2be2f650a07
[ "MIT" ]
15
2021-10-03T13:52:31.000Z
2022-03-13T06:30:42.000Z
fh = 0 col = 0 def update(tick): global h global col print("UP: ", button(UP), end=", ") print("DOWN: ", button(DOWN), end=", ") print("LEFT: ", button(LEFT), end=", ") print("RIGHT: ", button(RIGHT)) r = 0 g = 0 b = 0 if button(A): r = 100 if button(B): g =...
15.136364
43
0.453453
fh = 0 col = 0 def update(tick): global h global col print("UP: ", button(UP), end=", ") print("DOWN: ", button(DOWN), end=", ") print("LEFT: ", button(LEFT), end=", ") print("RIGHT: ", button(RIGHT)) r = 0 g = 0 b = 0 if button(A): r = 100 if button(B): g =...
true
true
f7f0cf39919fc892728da4fbe7be7d432907ed3d
868
py
Python
devind_notifications/permissions/notice_permissions.py
devind-team/devind-django-notifications
cf74bb0fdc9308f87a563b46c25d9a239da20841
[ "MIT" ]
null
null
null
devind_notifications/permissions/notice_permissions.py
devind-team/devind-django-notifications
cf74bb0fdc9308f87a563b46c25d9a239da20841
[ "MIT" ]
4
2022-03-01T08:11:57.000Z
2022-03-31T14:10:58.000Z
devind_notifications/permissions/notice_permissions.py
devind-team/devind-django-notifications
cf74bb0fdc9308f87a563b46c25d9a239da20841
[ "MIT" ]
null
null
null
from devind_helpers.permissions import BasePermission, ModelPermission from devind_notifications.models import Notice AddNotice = ModelPermission('devind_notifications.add_notice') class ChangeNotice(BasePermission): """Пропускает пользователей, которые могут изменять уведомление.""" @staticmethod def ...
36.166667
105
0.770737
from devind_helpers.permissions import BasePermission, ModelPermission from devind_notifications.models import Notice AddNotice = ModelPermission('devind_notifications.add_notice') class ChangeNotice(BasePermission): @staticmethod def has_object_permission(context, notice: Notice): return context.u...
true
true
f7f0cf39b01aa0c2804f2f087dd3c17c5e82f32a
1,697
py
Python
grr/lib/flows/general/dump_process_memory.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
5
2017-03-17T08:25:09.000Z
2022-02-22T05:28:14.000Z
grr/lib/flows/general/dump_process_memory.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
null
null
null
grr/lib/flows/general/dump_process_memory.py
StanislavParovoy/GRR
7cdf490f9be2ccc0a8160c9b8ae23b73922049d5
[ "Apache-2.0" ]
3
2018-12-07T07:04:37.000Z
2022-02-22T05:28:16.000Z
#!/usr/bin/env python """These are processes memory dump related flows.""" from grr.client.client_actions import standard as standard_actions from grr.client.client_actions import tempfiles as tempfiles_actions from grr.lib import flow from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import...
30.303571
79
0.733648
from grr.client.client_actions import standard as standard_actions from grr.client.client_actions import tempfiles as tempfiles_actions from grr.lib import flow from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import structs as rdf_structs from grr.proto import flows_pb2 class DumpProce...
true
true
f7f0cf92aab235b4f23af8d894b0d00f90e7fe77
3,106
py
Python
pytube/mixins.py
wizardcode/pytube
0b8c25ac4c8b62d896d0b7c2b4d5a9b50abb3e0e
[ "MIT-0" ]
2
2019-06-23T03:29:44.000Z
2019-08-22T07:01:25.000Z
pytube/mixins.py
wizardcode/pytube
0b8c25ac4c8b62d896d0b7c2b4d5a9b50abb3e0e
[ "MIT-0" ]
null
null
null
pytube/mixins.py
wizardcode/pytube
0b8c25ac4c8b62d896d0b7c2b4d5a9b50abb3e0e
[ "MIT-0" ]
null
null
null
# -*- coding: utf-8 -*- """Applies in-place data mutations.""" from __future__ import absolute_import import json import logging import pprint from pytube import cipher from pytube.compat import parse_qsl from pytube.compat import unquote from pytube.exceptions import LiveStreamError logger = logging.getLogger(__nam...
32.354167
79
0.604636
from __future__ import absolute_import import json import logging import pprint from pytube import cipher from pytube.compat import parse_qsl from pytube.compat import unquote from pytube.exceptions import LiveStreamError logger = logging.getLogger(__name__) def apply_signature(config_args, fmt, js): stream_m...
true
true
f7f0d1399ffb6acc88ffed04d837b39dc39b1322
11,930
py
Python
src/third_party/wiredtiger/test/suite/run.py
LightBitsLabs/mongo
9480ef00a8df2464457ab0f31c7a336f882e8ec1
[ "Apache-2.0" ]
25
2016-12-07T09:39:51.000Z
2021-12-16T11:17:37.000Z
src/third_party/wiredtiger/test/suite/run.py
LightBitsLabs/mongo
9480ef00a8df2464457ab0f31c7a336f882e8ec1
[ "Apache-2.0" ]
null
null
null
src/third_party/wiredtiger/test/suite/run.py
LightBitsLabs/mongo
9480ef00a8df2464457ab0f31c7a336f882e8ec1
[ "Apache-2.0" ]
23
2017-01-22T03:35:26.000Z
2021-12-16T11:17:39.000Z
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
37.049689
79
0.594468
import glob, json, os, re, sys suitedir = sys.path[0] wt_disttop = os.path.dirname(os.path.dirname(suitedir)) wt_3rdpartydir = os.path.join(wt_disttop, 'test', '3rdparty') # could pick the wrong one. if os.path.isfile(os.path.join(os.getcwd(), 'wt')): wt_builddir = os.getcwd() ...
false
true
f7f0d17aa881deed5803741bb589044bbd10fb2d
1,712
py
Python
tests/test_misc.py
Justice4Joffrey/pytest-snapshot-pickle
7b529b88d496999702b7023ec0c750a84d13138a
[ "MIT" ]
null
null
null
tests/test_misc.py
Justice4Joffrey/pytest-snapshot-pickle
7b529b88d496999702b7023ec0c750a84d13138a
[ "MIT" ]
null
null
null
tests/test_misc.py
Justice4Joffrey/pytest-snapshot-pickle
7b529b88d496999702b7023ec0c750a84d13138a
[ "MIT" ]
1
2021-04-03T23:43:06.000Z
2021-04-03T23:43:06.000Z
from pytest_snapshot.plugin import shorten_path from tests.utils import assert_pytest_passes try: from pathlib import Path except ImportError: from pathlib2 import Path def test_help_message(testdir): result = testdir.runpytest('--help') result.stdout.fnmatch_lines([ 'snapshot:', '*--...
28.533333
113
0.660631
from pytest_snapshot.plugin import shorten_path from tests.utils import assert_pytest_passes try: from pathlib import Path except ImportError: from pathlib2 import Path def test_help_message(testdir): result = testdir.runpytest('--help') result.stdout.fnmatch_lines([ 'snapshot:', '*--...
true
true
f7f0d1f2d60d19576bf83ddd6916fd965db7a32a
843
py
Python
HPC/parameter_sweep/generate_parameters.py
CogComNeuroSci/parallel_computing
cd995f783169f4df4753cb35bac49bb805903d83
[ "CC0-1.0" ]
null
null
null
HPC/parameter_sweep/generate_parameters.py
CogComNeuroSci/parallel_computing
cd995f783169f4df4753cb35bac49bb805903d83
[ "CC0-1.0" ]
null
null
null
HPC/parameter_sweep/generate_parameters.py
CogComNeuroSci/parallel_computing
cd995f783169f4df4753cb35bac49bb805903d83
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Pieter Huycke email: pieter.huycke@ugent.be GitHub: phuycke """ #%% from itertools import product import csv import numpy as np import os #%% # some parameter values p1 = np.arange(.2, .7, .1).round(2) p2 = [0, 1] p3 = np.arange(1, 31) # all possible...
21.075
64
0.679715
from itertools import product import csv import numpy as np import os p1 = np.arange(.2, .7, .1).round(2) p2 = [0, 1] p3 = np.arange(1, 31) combinations = list(product(*[p1 ,p2, p3])) assert len(combinations) == (len(p1) * len(p2) * len(p3)) os.chdir(r"/user/gent/435/vsc43506/parameter_sweep") header =...
true
true
f7f0d289bd5eeb95b7446781ffbcc360904520e6
524
py
Python
setup.py
Doraemonzzz/Bilibili-Subtitle-Batch-Uploader
4a45d38d81dfb4f019fe1b6ad43e1b44032157e4
[ "Apache-2.0" ]
2
2021-05-28T07:02:28.000Z
2021-12-12T18:58:50.000Z
setup.py
Doraemonzzz/Bilibili-Subtitle-Batch-Uploader
4a45d38d81dfb4f019fe1b6ad43e1b44032157e4
[ "Apache-2.0" ]
null
null
null
setup.py
Doraemonzzz/Bilibili-Subtitle-Batch-Uploader
4a45d38d81dfb4f019fe1b6ad43e1b44032157e4
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from distutils.core import setup setup( name='bisbu', version='0.0.2', description='Bilibili subtitle batch uploader', author='Doraemonzzz', author_email='doraemon_zzz@163.com', url='https://github.com/Doraemonzzz/Bilibili-Subtitle-Batch-Uploader', packages=['bisbu'], e...
22.782609
74
0.582061
from distutils.core import setup setup( name='bisbu', version='0.0.2', description='Bilibili subtitle batch uploader', author='Doraemonzzz', author_email='doraemon_zzz@163.com', url='https://github.com/Doraemonzzz/Bilibili-Subtitle-Batch-Uploader', packages=['bisbu'], entry_points={ ...
true
true
f7f0d28b9852ae28b6e7f42c8291355e24b526e7
707
py
Python
modules/grepfwd.py
xfix/BBot
429b13e6b033c132b77c771581d0de7b73b77d64
[ "MIT" ]
1
2019-06-27T08:29:18.000Z
2019-06-27T08:29:18.000Z
modules/grepfwd.py
xfix/BBot
429b13e6b033c132b77c771581d0de7b73b77d64
[ "MIT" ]
null
null
null
modules/grepfwd.py
xfix/BBot
429b13e6b033c132b77c771581d0de7b73b77d64
[ "MIT" ]
null
null
null
import re import api class Module(api.Module): '''A module for matching regular expressions and forwarding the data to a nick or channel''' def __init__(self, server): super(Module, self).__init__(server) api.hook_command('grepfwd', self.grepfwd, server, su = True) self.fwds = {} ...
29.458333
68
0.594059
import re import api class Module(api.Module): def __init__(self, server): super(Module, self).__init__(server) api.hook_command('grepfwd', self.grepfwd, server, su = True) self.fwds = {} def privmsg(self, nick, data, channel): for each in self.fwds: if re.search(ea...
true
true
f7f0d59574847dda211cb93b8e230ae73a594701
293
py
Python
national_debt/national_debt/items.py
Fakhar38/Scrapers
d5639070c33e76c54bdd4eb26e2d58640b3d7027
[ "MIT" ]
null
null
null
national_debt/national_debt/items.py
Fakhar38/Scrapers
d5639070c33e76c54bdd4eb26e2d58640b3d7027
[ "MIT" ]
2
2021-03-31T19:41:00.000Z
2021-12-13T20:39:27.000Z
national_debt/national_debt/items.py
Fakhar38/Scrapers
d5639070c33e76c54bdd4eb26e2d58640b3d7027
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class NationalDebtItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.533333
53
0.692833
import scrapy class NationalDebtItem(scrapy.Item): pass
true
true
f7f0d66248c3ce4016d4744d9b093c0c679af8a4
6,723
py
Python
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
# inconsistently raises this problem # pylint: disable=relative-beyond-top-level from .expr import Assign, Grouping, Binary, Unary, Call, Variable, QuotedName, Literal from .token import Token from .utils import listify class ParseError(Exception): pass class Parser: # pylint: disable=too-many-public-methods ...
32.322115
93
0.559869
from .expr import Assign, Grouping, Binary, Unary, Call, Variable, QuotedName, Literal from .token import Token from .utils import listify class ParseError(Exception): pass class Parser: def __init__(self, tokens): self.current = 0 self.tokens = tokens def at_end(self): ...
true
true
f7f0d7654f06c8b115f7b9428f7b7c9f40d728f9
1,583
py
Python
py3k-sympy/sympy/physics/quantum/__init__.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
py3k-sympy/sympy/physics/quantum/__init__.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
py3k-sympy/sympy/physics/quantum/__init__.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
__all__ = [] # The following pattern is used below for importing sub-modules: # # 1. "from foo import *". This imports all the names from foo.__all__ into # this module. But, this does not put those names into the __all__ of # this module. This enables "from sympy.physics.quantum import State" to # work. # 2...
25.95082
75
0.769425
__all__ = [] from . import anticommutator from .anticommutator import * __all__.extend(anticommutator.__all__) from . import qapply as qapmod from .qapply import * __all__.extend(qapmod.__all__) from . import commutator from .commutator import * __all__.extend(commutator.__all__) from . import dagger fro...
true
true
f7f0d8daeb7d1cf5f4a9d3d9a66d1a0ac12065cb
1,506
py
Python
meiduo_mall/meiduo_mall/utils/response_code.py
sleeper99/meiduo_mall
ece3cf51468fb807c12f7411e0ffb0a9fc5b12d4
[ "Apache-2.0" ]
2
2019-07-03T11:05:31.000Z
2019-07-03T11:13:34.000Z
BeautyMarket/BeautyMarket/utils/response_code.py
four-leaf-clover1/BeautyMarket
55050195a040b41ab791509bbd8e272594a4992e
[ "MIT" ]
1
2019-12-28T12:46:55.000Z
2019-12-28T12:49:51.000Z
BeautyMarket/BeautyMarket/utils/response_code.py
four-leaf-clover1/BeautyMarket
55050195a040b41ab791509bbd8e272594a4992e
[ "MIT" ]
null
null
null
class RETCODE: OK = "0" IMAGECODEERR = "4001" THROTTLINGERR = "4002" NECESSARYPARAMERR = "4003" USERERR = "4004" PWDERR = "4005" CPWDERR = "4006" MOBILEERR = "4007" SMSCODERR = "4008" ALLOWER...
32.042553
46
0.449535
class RETCODE: OK = "0" IMAGECODEERR = "4001" THROTTLINGERR = "4002" NECESSARYPARAMERR = "4003" USERERR = "4004" PWDERR = "4005" CPWDERR = "4006" MOBILEERR = "4007" SMSCODERR = "4008" ALLOWER...
true
true
f7f0d93c7a968ce396bf1dd4024fd3014d7f6174
13,562
py
Python
tensorflow/python/autograph/core/converter.py
PhotoLabDevelopment/tensorflow
735642ee1cd8d7f21ddd94f851ee753c17c23019
[ "Apache-2.0" ]
2
2019-08-04T20:28:14.000Z
2019-10-27T23:26:42.000Z
tensorflow/python/autograph/core/converter.py
PhotoLabDevelopment/tensorflow
735642ee1cd8d7f21ddd94f851ee753c17c23019
[ "Apache-2.0" ]
1
2019-08-19T08:03:52.000Z
2019-08-19T08:03:52.000Z
tensorflow/python/autograph/core/converter.py
PhotoLabDevelopment/tensorflow
735642ee1cd8d7f21ddd94f851ee753c17c23019
[ "Apache-2.0" ]
1
2021-05-05T05:17:34.000Z
2021-05-05T05:17:34.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.158924
81
0.720616
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import enum from tensorflow.python.autograph.pyct import anno from tensorflow.python.autograph.pyct import ast_util from tensorflow.python.autograph.pyct import cfg from tenso...
true
true
f7f0d97fa5b52fdcc8dc9a2115fe0392e1708bff
10,142
py
Python
spyder_mod/Spyder 5.1.5/site-packages/spyder/app/utils.py
sys-bio/tellurium
aa241da8206e8614085398d86cd8a8daae7468c2
[ "Apache-2.0" ]
73
2016-06-13T12:44:28.000Z
2021-12-31T14:44:39.000Z
spyder_mod/Spyder 5.1.5/site-packages/spyder/app/utils.py
sys-bio/tellurium
aa241da8206e8614085398d86cd8a8daae7468c2
[ "Apache-2.0" ]
461
2015-03-26T00:05:16.000Z
2022-03-16T17:24:35.000Z
spyder_mod/Spyder 5.1.5/site-packages/spyder/app/utils.py
sys-bio/tellurium
aa241da8206e8614085398d86cd8a8daae7468c2
[ "Apache-2.0" ]
30
2016-01-18T16:50:54.000Z
2021-07-06T09:29:53.000Z
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """Utility functions for the Spyder application.""" # Standard library imports import glob import logging import os import os.path as osp import re import sys # Thi...
30.920732
76
0.657858
import glob import logging import os import os.path as osp import re import sys import psutil from qtpy.QtCore import QCoreApplication, Qt from qtpy.QtGui import QColor, QIcon, QPalette, QPixmap, QPainter, QImage from qtpy.QtWidgets import QApplication, QSplashScreen from qtpy.QtSvg import QSvgRenderer from...
true
true
f7f0d9b8ec6dd6663d4e1ad60de94d702c08c7bd
3,629
py
Python
examples/digits_dann_lightn/main.py
pz-white/pykale
de40d1e8a88aa824ffbd1e072b02fe92b57b7c69
[ "MIT" ]
1
2021-03-12T13:42:21.000Z
2021-03-12T13:42:21.000Z
examples/digits_dann_lightn/main.py
pz-white/pykale
de40d1e8a88aa824ffbd1e072b02fe92b57b7c69
[ "MIT" ]
null
null
null
examples/digits_dann_lightn/main.py
pz-white/pykale
de40d1e8a88aa824ffbd1e072b02fe92b57b7c69
[ "MIT" ]
null
null
null
"""This example is about domain adaptation for digit image datasets, using PyTorch Lightning. Reference: https://github.com/thuml/CDAN/blob/master/pytorch/train_image.py """ import argparse import logging import os import pytorch_lightning as pl from config import get_cfg_defaults from model import get_model from k...
37.802083
107
0.59741
import argparse import logging import os import pytorch_lightning as pl from config import get_cfg_defaults from model import get_model from kale.loaddata.digits_access import DigitDataset from kale.loaddata.multi_domain import MultiDomainDatasets from kale.utils.csv_logger import setup_logger from kale.utils.seed i...
true
true
f7f0db05cca7cc51b6eeac224ae684930bec6462
1,670
py
Python
kharon/auth/forms.py
tommmmi/Universal-Mapper
ed0052edf4741ce86e3fbbeb15e79e275f222d0d
[ "Apache-2.0" ]
1
2020-02-12T18:08:35.000Z
2020-02-12T18:08:35.000Z
kharon/auth/forms.py
tommmmi/Universal-Mapper
ed0052edf4741ce86e3fbbeb15e79e275f222d0d
[ "Apache-2.0" ]
2
2019-10-22T07:09:31.000Z
2019-10-22T07:14:32.000Z
kharon/auth/forms.py
tommmmi/Universal-Mapper
ed0052edf4741ce86e3fbbeb15e79e275f222d0d
[ "Apache-2.0" ]
null
null
null
# import custom forms libraries from flask_wtf import FlaskForm # import classes for form field types from wtforms import PasswordField, StringField, SubmitField, ValidationError from wtforms.validators import DataRequired, Email, EqualTo # import db query class to 'user' table from ..models import User # define r...
38.837209
100
0.732934
from flask_wtf import FlaskForm from wtforms import PasswordField, StringField, SubmitField, ValidationError from wtforms.validators import DataRequired, Email, EqualTo from ..models import User class RegistrationForm(FlaskForm): email = StringField('Email', validators = [DataRequired(), Email()]) ...
true
true
f7f0db6a84f267ce7364147b48b2a492819a3642
1,177
py
Python
core/log.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
core/log.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
core/log.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
import logging import logging.config from pathlib import Path import yaml def init_logger(): agent_path = Path(__file__).resolve().parent.parent log_config_path = agent_path / 'log_config.yml' with log_config_path.open('r') as f: log_config = yaml.safe_load(f) configured_loggers = [log_conf...
32.694444
98
0.601529
import logging import logging.config from pathlib import Path import yaml def init_logger(): agent_path = Path(__file__).resolve().parent.parent log_config_path = agent_path / 'log_config.yml' with log_config_path.open('r') as f: log_config = yaml.safe_load(f) configured_loggers = [log_conf...
true
true
f7f0db8daa82c851710627745f7cbcb5bc6041a5
8,271
py
Python
config/settings/production.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
config/settings/production.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
config/settings/production.py
morwen1/hack_your_body
d4156d4fbe2dd4123d5b5bceef451803a50a39f8
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("DJANGO_SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED...
40.743842
89
0.614678
from .base import * from .base import env = env("DJANGO_SECRET_KEY") = env.list("DJANGO_ALLOWED_HOSTS", default=["hykb.com"]) DATABASES["default"] = env.db("DATABASE_URL") DATABASES["default"]["ATOMIC_REQUESTS"] = True DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) CACHES ...
true
true
f7f0dbe0ba2f79ccd8bcd4243d22bb6c8b4644d2
2,450
py
Python
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
from hypothesis import given, settings from hypothesis.strategies import integers from xlcalculator.xlfunctions.engineering import ( DEC2BIN, DEC2OCT, DEC2HEX, BIN2OCT, BIN2DEC, BIN2HEX, OCT2BIN, OCT2DEC, OCT2HEX, HEX2BIN, HEX2OCT, HEX2DEC, ) from tests.conftest import ...
30.246914
89
0.766939
from hypothesis import given, settings from hypothesis.strategies import integers from xlcalculator.xlfunctions.engineering import ( DEC2BIN, DEC2OCT, DEC2HEX, BIN2OCT, BIN2DEC, BIN2HEX, OCT2BIN, OCT2DEC, OCT2HEX, HEX2BIN, HEX2OCT, HEX2DEC, ) from tests.conftest import ...
true
true
f7f0dd0ed83222447afa6d54e0bbf6d66e0234f3
11,702
py
Python
node_manager_fkie/src/node_manager_fkie/run_dialog.py
ahoarau/multimaster_fkie
82bf341423bd3c2a15005c85eca9de5747cb8069
[ "BSD-3-Clause" ]
1
2020-03-10T06:32:51.000Z
2020-03-10T06:32:51.000Z
node_manager_fkie/src/node_manager_fkie/run_dialog.py
ahoarau/multimaster_fkie
82bf341423bd3c2a15005c85eca9de5747cb8069
[ "BSD-3-Clause" ]
1
2018-04-20T13:03:34.000Z
2018-04-20T13:03:34.000Z
node_manager_fkie/src/node_manager_fkie/run_dialog.py
ahoarau/multimaster_fkie
82bf341423bd3c2a15005c85eca9de5747cb8069
[ "BSD-3-Clause" ]
1
2018-11-07T03:37:23.000Z
2018-11-07T03:37:23.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code mus...
47.376518
186
0.696548
from python_qt_binding.QtCore import Qt, QMetaObject try: from python_qt_binding.QtGui import QComboBox, QDialog, QDialogButtonBox, QLabel, QLineEdit, QWidget from python_qt_binding.QtGui import QFormLayout, QHBoxLayout, QVBoxLayout, QSizePolicy except: from python_qt_binding...
true
true
f7f0de0a25da3b550852e5bb030d13edc473cf46
1,949
py
Python
it/list_test.py
ankitkala/opensearch-benchmark
ad608cc3c0f1c3ea77d65bd780dc7b56fd6efc41
[ "Apache-2.0" ]
1
2022-01-11T17:46:54.000Z
2022-01-11T17:46:54.000Z
it/list_test.py
ankitkala/opensearch-benchmark
ad608cc3c0f1c3ea77d65bd780dc7b56fd6efc41
[ "Apache-2.0" ]
null
null
null
it/list_test.py
ankitkala/opensearch-benchmark
ad608cc3c0f1c3ea77d65bd780dc7b56fd6efc41
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # Modifications Copyright OpenSearch Contributors. See # GitHub history for details. # Licensed to Elasticsearch B.V. under one ...
36.092593
108
0.76706
import it @it.all_benchmark_configs def test_list_test_executions(cfg): assert it.osbenchmark(cfg, "list test_executions") == 0 @it.benchmark_in_mem def test_list_provision_config_instances(cfg): assert it.osbenchmark(cfg, "list provision_config_instances") == 0 assert it.osbench...
true
true
f7f0deb05fe9346d38f415cd6124e4247dbd4b26
1,290
py
Python
examples/phenology-uc2/udf/smooth_savitzky_golay.py
soxofaan/openeo-processes
12565abd810c4cac84c9fccaf00d0fd873b88af0
[ "Apache-2.0" ]
null
null
null
examples/phenology-uc2/udf/smooth_savitzky_golay.py
soxofaan/openeo-processes
12565abd810c4cac84c9fccaf00d0fd873b88af0
[ "Apache-2.0" ]
null
null
null
examples/phenology-uc2/udf/smooth_savitzky_golay.py
soxofaan/openeo-processes
12565abd810c4cac84c9fccaf00d0fd873b88af0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Uncomment the import only for coding support #from openeo_udf.api.base import SpatialExtent, RasterCollectionTile, FeatureCollectionTile, UdfData __license__ = "Apache License, Version 2.0" def rct_savitzky_golay(udf_data): from scipy.signal import savgol_filter import pandas as pd ...
39.090909
127
0.725581
__license__ = "Apache License, Version 2.0" def rct_savitzky_golay(udf_data): from scipy.signal import savgol_filter import pandas as pd for tile in udf_data.raster_collection_tiles: timeseries_array = tile.data array_2d = timeseries_array.reshape((timeseries_ar...
true
true
f7f0df19f1bcce313a516542975790fd45d89a35
2,390
py
Python
examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
pysnmp/pysnmp
f1262dcb741bf1559a301c44bf0b727e8f45837c
[ "BSD-2-Clause" ]
4
2022-03-05T01:09:30.000Z
2022-03-31T15:34:00.000Z
examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
pysnmp/pysnmp
f1262dcb741bf1559a301c44bf0b727e8f45837c
[ "BSD-2-Clause" ]
2
2021-11-24T13:40:47.000Z
2021-11-25T09:48:47.000Z
examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
pysnmp/pysnmp
f1262dcb741bf1559a301c44bf0b727e8f45837c
[ "BSD-2-Clause" ]
1
2022-02-12T09:15:39.000Z
2022-02-12T09:15:39.000Z
""" Fetch two subtrees in parallel ++++++++++++++++++++++++++++++ Send a series of SNMP GETNEXT requests with the following options: * with SNMPv1, community 'public' * over IPv4/UDP * to an Agent at 104.236.166.95:161 * for two OIDs in tuple form * stop on end-of-mib condition for both OIDs This script performs sim...
28.452381
92
0.68954
from pysnmp.entity import engine, config from pysnmp.carrier.asyncore.dgram import udp from pysnmp.entity.rfc3413 import cmdgen snmpEngine = engine.SnmpEngine() config.addV1System(snmpEngine, 'my-area', 'public') config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) config.addTra...
true
true
f7f0df7cfb7f6f3ff24b7eef1aa0c0918039785c
332
py
Python
mama/libjpeg.py
wolfprint3d/AlphaGL
d47ed65b529bfb13775de0599499951c8feabbf1
[ "MIT" ]
2
2018-12-19T11:40:16.000Z
2018-12-19T14:15:12.000Z
mama/libjpeg.py
wolfprint3d/AlphaGL
d47ed65b529bfb13775de0599499951c8feabbf1
[ "MIT" ]
null
null
null
mama/libjpeg.py
wolfprint3d/AlphaGL
d47ed65b529bfb13775de0599499951c8feabbf1
[ "MIT" ]
2
2018-10-18T11:49:04.000Z
2019-12-02T22:35:05.000Z
import mama class libjpeg(mama.BuildTarget): def dependencies(self): pass def configure(self): self.add_cmake_options('BUILD_STATIC=ON', 'BUILD_EXECUTABLES=OFF', 'BUILD_TESTS=OFF') def package(self): self.export_libs('lib', ['.lib', '.a']) self.export_include('include', bui...
30.181818
93
0.659639
import mama class libjpeg(mama.BuildTarget): def dependencies(self): pass def configure(self): self.add_cmake_options('BUILD_STATIC=ON', 'BUILD_EXECUTABLES=OFF', 'BUILD_TESTS=OFF') def package(self): self.export_libs('lib', ['.lib', '.a']) self.export_include('include', bui...
true
true
f7f0e05901a182157df14fe2c039461a20ebd718
423
py
Python
estonian_learner/pyside2_interface.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
estonian_learner/pyside2_interface.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
estonian_learner/pyside2_interface.py
natter1/estonian_learner
da7837f0d64f4c1f6a212a9c473252c4b834699a
[ "MIT" ]
null
null
null
import PySide2.QtCore # Prints PySide2 version # e.g. 5.11.1a1 print(PySide2.__version__) # Gets a tuple with each version component # e.g. (5, 11, 1, 'a', 1) print(PySide2.__version_info__) # Prints the Qt version used to compile PySide2 # e.g. "5.11.2" print(PySide2.QtCore.__version__) # Gets a tuple with each ve...
24.882353
73
0.737589
import PySide2.QtCore print(PySide2.__version__) print(PySide2.__version_info__) print(PySide2.QtCore.__version__) print(PySide2.QtCore.__version_info__)
true
true
f7f0e0b31008cd0971627c8266124ec0f41d8dba
1,764
py
Python
oolearning/transformers/StatelessColumnTransformer.py
shane-kercheval/oo-learning
9e3ebe5f7460179e23f6801bc01f1114bb896dea
[ "MIT" ]
1
2020-10-09T09:11:46.000Z
2020-10-09T09:11:46.000Z
oolearning/transformers/StatelessColumnTransformer.py
shane-kercheval/oo-learning
9e3ebe5f7460179e23f6801bc01f1114bb896dea
[ "MIT" ]
48
2018-04-09T01:30:31.000Z
2021-06-13T03:25:59.000Z
oolearning/transformers/StatelessColumnTransformer.py
shane-kercheval/oo-learning
9e3ebe5f7460179e23f6801bc01f1114bb896dea
[ "MIT" ]
null
null
null
from typing import Callable import pandas as pd from oolearning.transformers.TransformerBase import TransformerBase class StatelessColumnTransformer(TransformerBase): """ Provides a way to pass functions (i.e. custom transformations) that do not need to save any type of state, so transformations are lim...
43.02439
109
0.713152
from typing import Callable import pandas as pd from oolearning.transformers.TransformerBase import TransformerBase class StatelessColumnTransformer(TransformerBase): def __init__(self, columns: list, custom_function: Callable): super().__init__() self._columns = columns self._custom_fun...
true
true
f7f0e330307e89bf8171db00923b409a70721e06
863
py
Python
testcontainer_python_rabbitmq/rabbitmq.py
Serviceware/testcontainer-python-rabbitmq
943105322cae8f51e4bfcc514d9e176dc75629e0
[ "Apache-2.0" ]
null
null
null
testcontainer_python_rabbitmq/rabbitmq.py
Serviceware/testcontainer-python-rabbitmq
943105322cae8f51e4bfcc514d9e176dc75629e0
[ "Apache-2.0" ]
null
null
null
testcontainer_python_rabbitmq/rabbitmq.py
Serviceware/testcontainer-python-rabbitmq
943105322cae8f51e4bfcc514d9e176dc75629e0
[ "Apache-2.0" ]
null
null
null
from testcontainers.core.container import DockerContainer from testcontainers.core.waiting_utils import wait_container_is_ready from requests import get, post, Response import os class RabbitMQContainer(DockerContainer): def __init__(self, image="rabbitmq:3.7.17-management"): super(RabbitMQContainer, self...
27.83871
69
0.680185
from testcontainers.core.container import DockerContainer from testcontainers.core.waiting_utils import wait_container_is_ready from requests import get, post, Response import os class RabbitMQContainer(DockerContainer): def __init__(self, image="rabbitmq:3.7.17-management"): super(RabbitMQContainer, self...
true
true
f7f0e3861a2b9e01c85f6141a3dd2b4e510a0327
6,436
py
Python
src/templatesite/settings.py
hseling/hseling-web-nauchpop
1f5f40340b08f795a966f3fc6bea56f462529e04
[ "MIT" ]
null
null
null
src/templatesite/settings.py
hseling/hseling-web-nauchpop
1f5f40340b08f795a966f3fc6bea56f462529e04
[ "MIT" ]
1
2018-12-23T13:10:13.000Z
2018-12-23T13:10:13.000Z
src/templatesite/settings.py
hseling/hseling-web-nauchpop
1f5f40340b08f795a966f3fc6bea56f462529e04
[ "MIT" ]
4
2018-12-04T15:23:52.000Z
2019-03-28T16:06:01.000Z
""" Django settings for templatesite project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impo...
28.732143
106
0.66128
import os import logging from logging.handlers import SysLogHandler SYSLOG_ADDRESS = ( os.environ.get('SYSLOG_HOST', 'localhost'), int(os.environ.get('SYSLOG_PORT', 514)), ) formatter = logging.Formatter('SETTINGS %(levelname)-8s %(message)s') settings_logger = logging.getLogger('settings') if not os.envi...
true
true
f7f0e3b5d8764124e9dc1c4c732a082e14a9c91c
594
py
Python
configs/__init__.py
moigagoo/configs
666a40eb985d41e525ade930fbdc006adccf1f4d
[ "MIT" ]
null
null
null
configs/__init__.py
moigagoo/configs
666a40eb985d41e525ade930fbdc006adccf1f4d
[ "MIT" ]
null
null
null
configs/__init__.py
moigagoo/configs
666a40eb985d41e525ade930fbdc006adccf1f4d
[ "MIT" ]
null
null
null
""" ******* Configs ******* **Configs** is an INI configuration parsing package, written for humans. Usage ===== Load a config file:: >>> import configs >>> c = configs.load('sample.conf') >>> c['general'] {'foo': 'baz'} See the full documentation at `configs.rtfd.org <http://configs.rtfd.org>`_. T...
19.8
90
0.670034
__title__ = 'configs' __version__ = '3.0.3' __author__ = 'Konstantin Molchanov' __license__ = 'MIT' from .section import Section from .config import Config from .api import load
true
true
f7f0e4f43da8aaac6253ebffb84ff3c58f150bc9
3,383
py
Python
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
2
2020-01-04T23:44:10.000Z
2020-07-12T17:10:09.000Z
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
1
2022-03-16T05:43:33.000Z
2022-03-16T05:43:33.000Z
# level design by Michael Abel # ................................................................................................................. def KikiWireWall( c , p): if world.isUnoccupiedPos(KikiPos (p.x,p.y,p.z)): world.addObjectAtPos (KikiWall() , KikiPos (p.x,p.y,p.z)) world.addObjectAtPos (KikiWire ...
41.256098
115
0.498374
def KikiWireWall( c , p): if world.isUnoccupiedPos(KikiPos (p.x,p.y,p.z)): world.addObjectAtPos (KikiWall() , KikiPos (p.x,p.y,p.z)) world.addObjectAtPos (KikiWire (KikiFace.X, c ), KikiPos (p.x+1,p.y ,p.z )) world.addObjectAtPos (KikiWire (KikiFace.NX, c ), KikiPos (p.x-1,p.y ,p.z )) world.addObjec...
false
true
f7f0e536ab6ce3dbef0555bd55d0416079f7d45e
2,655
py
Python
pyleecan/GUI/Dialog/DMachineSetup/SLamParam/DAVDuct/PVentTrap/Gen_PVentTrap.py
EmileDvs/pyleecan
ad2f5f25c089a981f373557a198da51c62407928
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/GUI/Dialog/DMachineSetup/SLamParam/DAVDuct/PVentTrap/Gen_PVentTrap.py
thalesmaoa/pyleecan
c4fdc6362fdeba3d0766d5d1df3ff9c97c3f9fa3
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/GUI/Dialog/DMachineSetup/SLamParam/DAVDuct/PVentTrap/Gen_PVentTrap.py
thalesmaoa/pyleecan
c4fdc6362fdeba3d0766d5d1df3ff9c97c3f9fa3
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- """File generated according to PVentTrap/gen_list.json WARNING! All changes made in this file will be lost! """ from pyleecan.GUI.Dialog.DMachineSetup.SLamParam.DAVDuct.PVentTrap.Ui_PVentTrap import ( Ui_PVentTrap, ) class Gen_PVentTrap(Ui_PVentTrap): def setupUi(self, PVentTrap): ...
32.777778
88
0.619209
from pyleecan.GUI.Dialog.DMachineSetup.SLamParam.DAVDuct.PVentTrap.Ui_PVentTrap import ( Ui_PVentTrap, ) class Gen_PVentTrap(Ui_PVentTrap): def setupUi(self, PVentTrap): Ui_PVentTrap.setupUi(self, PVentTrap) txt = self.tr(u"""Number of Hole around the circumference""") self.i...
true
true
f7f0e59386603c73169841ab3d1d9fc125d081c5
2,071
py
Python
prototyping/main.py
hoopoe/picsart_hackathon
d65aeb1432890626e778b9b0232ce3c2f6d4906f
[ "MIT" ]
null
null
null
prototyping/main.py
hoopoe/picsart_hackathon
d65aeb1432890626e778b9b0232ce3c2f6d4906f
[ "MIT" ]
null
null
null
prototyping/main.py
hoopoe/picsart_hackathon
d65aeb1432890626e778b9b0232ce3c2f6d4906f
[ "MIT" ]
null
null
null
import os import argparse import cv2 from models import UNet1024 import torch from pathlib import Path from tqdm import tqdm import numpy as np from torchvision import transforms from albumentations import Compose, Normalize from torch.nn import functional as F IMG_HEIGHT = 320 IMG_WIDTH = 256 CROP_WIDTH = 8 def img_...
28.763889
121
0.709802
import os import argparse import cv2 from models import UNet1024 import torch from pathlib import Path from tqdm import tqdm import numpy as np from torchvision import transforms from albumentations import Compose, Normalize from torch.nn import functional as F IMG_HEIGHT = 320 IMG_WIDTH = 256 CROP_WIDTH = 8 def img_...
false
true
f7f0e6150ba33b7e25465fb07eb06eed6f3da630
9,035
py
Python
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
import os import pyqmc import numpy as np import pandas as pd import h5py import pyqmc import pyqmc.optimize_orthogonal os.environ["MKL_NUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" os.environ["OMP_NUM_THREADS"] = "1" def distvmc( wf, coords, accumulators=None, nsteps=100, hdf_file=N...
31.371528
149
0.598893
import os import pyqmc import numpy as np import pandas as pd import h5py import pyqmc import pyqmc.optimize_orthogonal os.environ["MKL_NUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" os.environ["OMP_NUM_THREADS"] = "1" def distvmc( wf, coords, accumulators=None, nsteps=100, hdf_file=N...
true
true
f7f0e658f221808bb391b818d77f2a6febc91b71
12,005
py
Python
tasks/system_probe.py
Viq111/datadog-agent
280fd14d1b394605dc6806e7ea23dfd4d4c35310
[ "Apache-2.0" ]
2
2018-11-12T22:00:56.000Z
2019-11-07T22:14:23.000Z
tasks/system_probe.py
Viq111/datadog-agent
280fd14d1b394605dc6806e7ea23dfd4d4c35310
[ "Apache-2.0" ]
49
2018-10-02T18:14:58.000Z
2022-01-20T21:06:31.000Z
tasks/system_probe.py
Viq111/datadog-agent
280fd14d1b394605dc6806e7ea23dfd4d4c35310
[ "Apache-2.0" ]
3
2019-05-10T13:06:59.000Z
2020-05-21T17:29:33.000Z
import datetime import glob import os import getpass import contextlib import shutil import tempfile from invoke import task from invoke.exceptions import Exit from subprocess import check_output, CalledProcessError from .utils import ( bin_name, get_build_flags, REPO_PATH, get_version, get_git_br...
30.469543
142
0.611329
import datetime import glob import os import getpass import contextlib import shutil import tempfile from invoke import task from invoke.exceptions import Exit from subprocess import check_output, CalledProcessError from .utils import ( bin_name, get_build_flags, REPO_PATH, get_version, get_git_br...
true
true
f7f0e78b4f9698003bf9f48e548a98a3685458eb
37,616
py
Python
apps/paddlefold/alphafold_paddle/data/templates.py
zj-liu/PaddleHelix
6a4bf9835aebf31c8c7ee0f1005ecaa132b916bb
[ "Apache-2.0" ]
null
null
null
apps/paddlefold/alphafold_paddle/data/templates.py
zj-liu/PaddleHelix
6a4bf9835aebf31c8c7ee0f1005ecaa132b916bb
[ "Apache-2.0" ]
null
null
null
apps/paddlefold/alphafold_paddle/data/templates.py
zj-liu/PaddleHelix
6a4bf9835aebf31c8c7ee0f1005ecaa132b916bb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
40.754063
81
0.713207
import dataclasses import datetime import glob import os import re import numpy as np import logging from typing import Any, Dict, Mapping, Optional, Sequence, Tuple from alphafold_paddle.common import residue_constants from alphafold_paddle.data import mmcif_parsing from alphafold_paddle.data import pa...
true
true
f7f0e84f83be152d0ee3f086c0a94ce1d59951a5
798
py
Python
mouse/migrations/0002_repeat_conservation.py
chunjie-sam-liu/LNCediting
24c1bbe5f03117da06d3d2fda492d4d5ad45c473
[ "MIT" ]
null
null
null
mouse/migrations/0002_repeat_conservation.py
chunjie-sam-liu/LNCediting
24c1bbe5f03117da06d3d2fda492d4d5ad45c473
[ "MIT" ]
1
2020-04-14T11:33:29.000Z
2020-04-14T11:33:29.000Z
mouse/migrations/0002_repeat_conservation.py
chunjie-sam-liu/LNCediting
24c1bbe5f03117da06d3d2fda492d4d5ad45c473
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-27 08:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mouse', '0001_initial'), ] operations = [ migrations.CreateModel( ...
30.692308
114
0.591479
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mouse', '0001_initial'), ] operations = [ migrations.CreateModel( name='repeat_conservation', fields=[ ('i...
true
true
f7f0e883cc97cc1c27b8f98beea8d058ff7e08e5
10,933
py
Python
www/wsgi/rest_voter.py
sebbASF/steve
14959c1861e421b642e08463c6ae2240ef3d39a4
[ "Apache-2.0" ]
12
2016-02-06T08:59:56.000Z
2022-03-06T17:25:47.000Z
www/wsgi/rest_voter.py
sebbASF/steve
14959c1861e421b642e08463c6ae2240ef3d39a4
[ "Apache-2.0" ]
1
2021-11-02T12:01:56.000Z
2021-11-02T12:01:56.000Z
www/wsgi/rest_voter.py
isabella232/steve-1
a642241836919199e590cd1b1c2a2f1560d4898a
[ "Apache-2.0" ]
9
2016-03-08T16:17:44.000Z
2022-02-25T00:11:43.000Z
#!/usr/bin/env python ##### # 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 ...
55.217172
339
0.551541
, sys, json, re, time, base64, cgi, subprocess, hashlib, re from os import listdir version = 2 if sys.hexversion < 0x03000000: import ConfigParser as configparser else: import configparser version = 3 path = os.path.abspath(os.getcwd()) sys.path.append(path) sys.path.append(os.path.basename(sys...
true
true
f7f0e889c90aa3f73eb9108d811123a91f7b3a20
150
py
Python
custom_app/outpatient/doctype/patient_appointment/test_patient_appointment.py
benson-tseng/frappe_custom
c7830b1610c7c5a71e81d75f790410b919b2fbf2
[ "MIT" ]
1
2021-09-02T12:44:22.000Z
2021-09-02T12:44:22.000Z
custom_app/outpatient/doctype/patient_appointment/test_patient_appointment.py
benson-tseng/frappe_custom
c7830b1610c7c5a71e81d75f790410b919b2fbf2
[ "MIT" ]
null
null
null
custom_app/outpatient/doctype/patient_appointment/test_patient_appointment.py
benson-tseng/frappe_custom
c7830b1610c7c5a71e81d75f790410b919b2fbf2
[ "MIT" ]
null
null
null
# Copyright (c) 2021, aaa and Contributors # See license.txt # import frappe import unittest class TestPatientAppointment(unittest.TestCase): pass
16.666667
48
0.786667
import unittest class TestPatientAppointment(unittest.TestCase): pass
true
true
f7f0e8ede3142cd5fdea620e1aa5674ed10022e4
1,209
py
Python
01-algorithmic-design-and-techniques/week-2/fibonacci-huge.py
andrewnachtigal/UCSD-Algorithms
25acae36752e37fab74b8e331db554af704ccf4c
[ "MIT" ]
null
null
null
01-algorithmic-design-and-techniques/week-2/fibonacci-huge.py
andrewnachtigal/UCSD-Algorithms
25acae36752e37fab74b8e331db554af704ccf4c
[ "MIT" ]
null
null
null
01-algorithmic-design-and-techniques/week-2/fibonacci-huge.py
andrewnachtigal/UCSD-Algorithms
25acae36752e37fab74b8e331db554af704ccf4c
[ "MIT" ]
null
null
null
#!/user/bin/python '''Fibonacci Number Modulo m Compute the nth Fibonacci number modulo m. Input: Integers 0 <= n <= 10^18 and 2 <= m <= 10^5 Output: nth Fibonacci number modulo m, F(n) mod m. To compute F(n) mod m, calculate the remainder of n mod length... ... A Pisano...
21.589286
73
0.622829
import sys def get_fibonacci_huge_naive(n, m): if n <= 1: return n previous = 0 current = 1 for _ in range(n - 1): previous, current = current, previous + current return current % m def get_fibonacci_huge_fast(n, m): return current % m if __name__ == '__main__': ...
true
true
f7f0e954bf65a676bf7fbe930d3f2673849e3da9
60,655
py
Python
tracer/probes_insertion.py
pbotros/TRACER
269e17ca27fe0fb78c30484d8685d119caab5dbb
[ "MIT" ]
null
null
null
tracer/probes_insertion.py
pbotros/TRACER
269e17ca27fe0fb78c30484d8685d119caab5dbb
[ "MIT" ]
null
null
null
tracer/probes_insertion.py
pbotros/TRACER
269e17ca27fe0fb78c30484d8685d119caab5dbb
[ "MIT" ]
null
null
null
# Import libraries import math import os import os.path import numpy as np import matplotlib # matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import pickle from collections import OrderedDict from tabulate import tabulate import mplcursors from scipy.spatial import distance from six.moves import input # fit...
65.080472
334
0.480834
import math import os import os.path import numpy as np import matplotlib import matplotlib.pyplot as plt import pickle from collections import OrderedDict from tabulate import tabulate import mplcursors from scipy.spatial import distance from six.moves import input from skspatial.objects import Line from .ObjSa...
true
true
f7f0e963e9ca31fe46719c5025093723ee9b3b17
1,738
py
Python
model.py
InzamamRahaman/PoincareDiskEmbedding
89261bcf544e9d6c144ace2697400e2ffb489f94
[ "MIT" ]
1
2017-12-27T00:12:52.000Z
2017-12-27T00:12:52.000Z
model.py
InzamamRahaman/PoincareDiskEmbedding
89261bcf544e9d6c144ace2697400e2ffb489f94
[ "MIT" ]
null
null
null
model.py
InzamamRahaman/PoincareDiskEmbedding
89261bcf544e9d6c144ace2697400e2ffb489f94
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import util class Model(nn.Module): def __init__(self, vocab_size, embedding_dim=10): super(Model, self).__init__() self.embedding_dim = embedding_dim self.embeddings = nn.Embedding(vocab_size, embedding_dim) self.embeddings.weight.data.uniform_(-...
32.185185
84
0.571346
import torch import torch.nn as nn import util class Model(nn.Module): def __init__(self, vocab_size, embedding_dim=10): super(Model, self).__init__() self.embedding_dim = embedding_dim self.embeddings = nn.Embedding(vocab_size, embedding_dim) self.embeddings.weight.data.uniform_(-...
true
true
f7f0e9ada06e1ac3f3acb1b3c03236e9069175e5
31,109
py
Python
src/fklearn/training/transformation.py
snakeice/fklearn
80497dd403c582bda0e796c62219f0636d15d074
[ "Apache-2.0" ]
null
null
null
src/fklearn/training/transformation.py
snakeice/fklearn
80497dd403c582bda0e796c62219f0636d15d074
[ "Apache-2.0" ]
null
null
null
src/fklearn/training/transformation.py
snakeice/fklearn
80497dd403c582bda0e796c62219f0636d15d074
[ "Apache-2.0" ]
null
null
null
from typing import Any, Callable, Dict, List, Union, Optional import numpy as np import pandas as pd from numpy import nan import swifter # NOQA from sklearn.preprocessing import StandardScaler from statsmodels.distributions import empirical_distribution as ed from toolz import curry, merge, compose, mapcat from fkle...
33.631351
117
0.650648
from typing import Any, Callable, Dict, List, Union, Optional import numpy as np import pandas as pd from numpy import nan import swifter from sklearn.preprocessing import StandardScaler from statsmodels.distributions import empirical_distribution as ed from toolz import curry, merge, compose, mapcat from fklearn.co...
true
true