hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c10dd881ef8c944f31caae03862d4ec569f9166
2,283
py
Python
scripts/RunTestList.py
GitHubRepoDescription/Azure-Kinect-Sensor-SDK-forked
3b57e9c9501bce282ff5529d9b1106120921252f
[ "MIT" ]
4
2019-05-15T22:38:18.000Z
2020-09-03T13:48:41.000Z
scripts/RunTestList.py
GitHubRepoDescription/Azure-Kinect-Sensor-SDK-forked
3b57e9c9501bce282ff5529d9b1106120921252f
[ "MIT" ]
1
2019-09-07T16:17:45.000Z
2019-11-20T21:12:45.000Z
scripts/RunTestList.py
GitHubRepoDescription/Azure-Kinect-Sensor-SDK-forked
3b57e9c9501bce282ff5529d9b1106120921252f
[ "MIT" ]
1
2021-11-20T05:34:08.000Z
2021-11-20T05:34:08.000Z
#!/usr/bin/env python3 # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # Used to run Google Tests generated during build. Takes in a text file # containing a list of relative paths to text exectuables to run and path to # binary output directory of build. The paths are re...
34.590909
123
0.643452
import re, argparse, sys, subprocess, os parser=argparse.ArgumentParser(description='Run test list of built k4a tests') parser.add_argument('--list', type=str, help='Test list file path', required=True) parser.add_argument('--bin', type=str, help='path to build binary directory', required=True) parser.add_argument('...
true
true
1c10dec09ac1920856b9c75314d97b46b34d96f1
8,140
py
Python
Source/sprites/decorator.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
null
null
null
Source/sprites/decorator.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
null
null
null
Source/sprites/decorator.py
LucXyMan/starseeker
b5c3365514c982734da7d95621e6b85af550ce82
[ "BSD-3-Clause" ]
1
2019-11-27T18:00:00.000Z
2019-11-27T18:00:00.000Z
#!/usr/bin/env python2.7 # -*- coding:UTF-8 -*-2 u"""decorator.py Copyright (c) 2019 Yukio Kuro This software is released under BSD license. デコレータモジュール。 """ import pygame as _pygame def set_decorator(subject, groups=None): u"""デコレータ設定。 """ class __Top(Decorator): u"""上部デコレータ。 """ ...
32.430279
74
0.520762
import pygame as _pygame def set_decorator(subject, groups=None): class __Top(Decorator): def _get_image(self, is_light): return self._get_horizon(is_light) def update(self): if self._subject.alive(): self.image = ( self._light_image if ...
true
true
1c10df672481d9ea370bd5f0844fc62bb7919b46
5,296
py
Python
uimnet/workers/predictor.py
facebookresearch/uimnet
d7544cf5fb4c65cb262dca203afb0db4ba6c569d
[ "MIT" ]
7
2021-07-28T18:40:20.000Z
2022-01-26T23:50:41.000Z
uimnet/workers/predictor.py
facebookresearch/uimnet
d7544cf5fb4c65cb262dca203afb0db4ba6c569d
[ "MIT" ]
10
2021-08-31T13:44:56.000Z
2021-08-31T14:10:12.000Z
uimnet/workers/predictor.py
facebookresearch/uimnet
d7544cf5fb4c65cb262dca203afb0db4ba6c569d
[ "MIT" ]
1
2021-11-06T01:55:58.000Z
2021-11-06T01:55:58.000Z
#!/usr/bin/env python3 # # # Copyright (c) 2021 Facebook, inc. and its affiliates. All Rights Reserved # # import copy import torch import torch.distributed as dist import time from pathlib import Path import pickle from uimnet.algorithms.base import Algorithm import submitit from uimnet import algorithms from uimnet...
34.167742
99
0.658799
import copy import torch import torch.distributed as dist import time from pathlib import Path import pickle from uimnet.algorithms.base import Algorithm import submitit from uimnet import algorithms from uimnet import datasets from uimnet import metrics from uimnet import utils from uimnet import workers from uimnet...
true
true
1c10e13ad2f5532bcc8f3d1b99e494ae284822bb
999
py
Python
setup.py
ttngu207/workflow-animal
c6f7d47d0a72fc33f0fb3199b6537d6a2ccb4ab5
[ "MIT" ]
null
null
null
setup.py
ttngu207/workflow-animal
c6f7d47d0a72fc33f0fb3199b6537d6a2ccb4ab5
[ "MIT" ]
13
2021-03-21T05:50:07.000Z
2022-03-07T17:24:18.000Z
setup.py
ttngu207/workflow-animal
c6f7d47d0a72fc33f0fb3199b6537d6a2ccb4ab5
[ "MIT" ]
4
2021-03-18T17:25:20.000Z
2021-08-03T21:05:42.000Z
#!/usr/bin/env python from setuptools import setup, find_packages from os import path import sys here = path.abspath(path.dirname(__file__)) long_description = """" # Workflow for lab management and animal management Build a workflow for lab management and animal metadata using DataJoint Elements + [elements-lab](ht...
31.21875
80
0.738739
from setuptools import setup, find_packages from os import path import sys here = path.abspath(path.dirname(__file__)) long_description = """" # Workflow for lab management and animal management Build a workflow for lab management and animal metadata using DataJoint Elements + [elements-lab](https://github.com/dataj...
true
true
1c10e5a267c81b3d9b2f9cbf225bb98322c1d09a
1,539
py
Python
setup.py
vhelke/python-cas
067bd8c7a1265331fe3901a12f33197ef0930f48
[ "MIT" ]
82
2015-06-26T16:59:06.000Z
2022-01-19T04:50:45.000Z
setup.py
vhelke/python-cas
067bd8c7a1265331fe3901a12f33197ef0930f48
[ "MIT" ]
28
2016-06-24T13:24:34.000Z
2021-11-14T06:02:03.000Z
setup.py
vhelke/python-cas
067bd8c7a1265331fe3901a12f33197ef0930f48
[ "MIT" ]
52
2016-06-22T17:38:44.000Z
2021-11-13T09:11:35.000Z
#!/usr/bin/env python from __future__ import absolute_import import codecs from setuptools import setup with codecs.open('README.rst', encoding='utf-8') as f: readme = f.read() setup( author='Ming Chen', author_email='ming@djangocas.dev', classifiers=[ 'Development Status :: 5 - Production/...
32.0625
98
0.586745
from __future__ import absolute_import import codecs from setuptools import setup with codecs.open('README.rst', encoding='utf-8') as f: readme = f.read() setup( author='Ming Chen', author_email='ming@djangocas.dev', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Envi...
true
true
1c10e7e9848185a7205690072acd80e473214da5
1,084
py
Python
Tree/Inorder-Iterator-For-Binary-Tree.py
umerkhan95/teaching-python
36f2bd6f740c5d0e6afb6c02163b2f11133cb883
[ "MIT" ]
null
null
null
Tree/Inorder-Iterator-For-Binary-Tree.py
umerkhan95/teaching-python
36f2bd6f740c5d0e6afb6c02163b2f11133cb883
[ "MIT" ]
null
null
null
Tree/Inorder-Iterator-For-Binary-Tree.py
umerkhan95/teaching-python
36f2bd6f740c5d0e6afb6c02163b2f11133cb883
[ "MIT" ]
null
null
null
class InorderIterator: def __init__(self, root): self.stack = [] while root != None: self.stack.append(root) root = root.left # Check whether the stack is empty or not def hasNext(self): if not self.stack: return False else: re...
27.794872
81
0.54797
class InorderIterator: def __init__(self, root): self.stack = [] while root != None: self.stack.append(root) root = root.left def hasNext(self): if not self.stack: return False else: return True def getNext(self): ...
true
true
1c10e8ec8039b5909bdf0d01cdaca6f4bae8dadb
7,781
py
Python
pyspheregl/sim/touch_manager.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
null
null
null
pyspheregl/sim/touch_manager.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
null
null
null
pyspheregl/sim/touch_manager.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
3
2018-08-09T18:57:51.000Z
2019-11-23T08:27:33.000Z
import zmq import numpy as np import json import attr from ..sphere import sphere @attr.s class TouchEvent(object): event = attr.ib(default="NONE") touch = attr.ib(default=None) @attr.s class Touch(object): lonlat = attr.ib() origin = attr.ib() orig_t = attr.ib() raw = attr.ib() # raw TUIO co...
37.408654
133
0.571263
import zmq import numpy as np import json import attr from ..sphere import sphere @attr.s class TouchEvent(object): event = attr.ib(default="NONE") touch = attr.ib(default=None) @attr.s class Touch(object): lonlat = attr.ib() origin = attr.ib() orig_t = attr.ib() raw = attr.ib() t = attr....
false
true
1c10e9bac9d6d762037305c0ab0c65587a6395b8
2,086
py
Python
crud/base.py
GDGSNF/ChefAPI
bede60dc392dac47982b324d3a4f2f430ef0026f
[ "MIT" ]
11
2021-06-26T02:06:38.000Z
2021-08-06T01:34:10.000Z
crud/base.py
yezz123/ChefAPI
bede60dc392dac47982b324d3a4f2f430ef0026f
[ "MIT" ]
15
2021-09-05T14:59:01.000Z
2021-09-06T08:43:31.000Z
crud/base.py
GDGSNF/ChefAPI
bede60dc392dac47982b324d3a4f2f430ef0026f
[ "MIT" ]
2
2021-06-26T02:13:03.000Z
2021-07-05T01:28:00.000Z
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, Union from fastapi.encoders import jsonable_encoder from pydantic import BaseModel from sqlalchemy.orm import Session from database.base_class import Base ModelType = TypeVar("ModelType", bound=Base) CreateSchemaType = TypeVar("CreateSchemaType", ...
31.606061
80
0.626079
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, Union from fastapi.encoders import jsonable_encoder from pydantic import BaseModel from sqlalchemy.orm import Session from database.base_class import Base ModelType = TypeVar("ModelType", bound=Base) CreateSchemaType = TypeVar("CreateSchemaType", ...
true
true
1c10e9cc15113b8c8d667acd1230921139a69a6c
130
py
Python
Tensorflow Hello World/tensorflow_example.py
ahmedhamdy90/Deep-Learning-Neural-Network
4a015b385958c313310aa9e30f6482431b1b845b
[ "MIT" ]
null
null
null
Tensorflow Hello World/tensorflow_example.py
ahmedhamdy90/Deep-Learning-Neural-Network
4a015b385958c313310aa9e30f6482431b1b845b
[ "MIT" ]
null
null
null
Tensorflow Hello World/tensorflow_example.py
ahmedhamdy90/Deep-Learning-Neural-Network
4a015b385958c313310aa9e30f6482431b1b845b
[ "MIT" ]
null
null
null
import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') session = tf.Session() print(session.run(hello)) session.close()
26
41
0.753846
import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') session = tf.Session() print(session.run(hello)) session.close()
true
true
1c10eb4443b9793870ac337cc2edacbaf0404144
26,840
py
Python
tools/gen-postmortem-metadata.py
fade-vivida/v8
faaf4a8ab39bef429f38b1d3f72c4f5986412be5
[ "BSD-3-Clause" ]
1
2019-06-08T10:50:38.000Z
2019-06-08T10:50:38.000Z
tools/gen-postmortem-metadata.py
fade-vivida/v8
faaf4a8ab39bef429f38b1d3f72c4f5986412be5
[ "BSD-3-Clause" ]
null
null
null
tools/gen-postmortem-metadata.py
fade-vivida/v8
faaf4a8ab39bef429f38b1d3f72c4f5986412be5
[ "BSD-3-Clause" ]
1
2019-10-31T21:16:39.000Z
2019-10-31T21:16:39.000Z
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # not...
39.587021
131
0.565648
# the generated libv8 binary. # # for py2/py3 compatibility from __future__ import print_function import re import sys # # Miscellaneous constants such as tags and masks used for object identification, # enumeration values used as indexes in internal tables, etc.. # consts_misc = [ { 'name': 'FirstNonstringTyp...
true
true
1c10eb7352f719d5bebf123ea0e2676650ef0015
5,949
py
Python
PoseNet/converter/tfjs2python.py
X-kimna/Music2Dance
f09932aeb7e5944902c82790dffca904d6e9dfab
[ "MIT" ]
1
2020-12-08T13:10:25.000Z
2020-12-08T13:10:25.000Z
PoseNet/converter/tfjs2python.py
X-kimna/Music2Dance
f09932aeb7e5944902c82790dffca904d6e9dfab
[ "MIT" ]
null
null
null
PoseNet/converter/tfjs2python.py
X-kimna/Music2Dance
f09932aeb7e5944902c82790dffca904d6e9dfab
[ "MIT" ]
null
null
null
import json import struct import tensorflow as tf import cv2 import numpy as np import os import yaml import sys f = open("config.yaml", "r+") cfg = yaml.load(f) checkpoints = cfg['checkpoints'] imageSize = cfg['imageSize'] chk = cfg['chk'] outputStride = cfg['outputStride'] chkpoint = checkpoints[chk] if chkpoint ==...
29.894472
114
0.640108
import json import struct import tensorflow as tf import cv2 import numpy as np import os import yaml import sys f = open("config.yaml", "r+") cfg = yaml.load(f) checkpoints = cfg['checkpoints'] imageSize = cfg['imageSize'] chk = cfg['chk'] outputStride = cfg['outputStride'] chkpoint = checkpoints[chk] if chkpoint ==...
true
true
1c10ec741ce653c039c688bb5e8a895e2fd0d32f
193
py
Python
r3c0nutils/viewer.py
markgacoka/r3c0n
ac64614d10d176b9de2170ce8758a6aa75d75f54
[ "MIT" ]
4
2022-03-06T16:42:23.000Z
2022-03-09T02:29:08.000Z
r3c0nutils/viewer.py
markgacoka/r3c0n
ac64614d10d176b9de2170ce8758a6aa75d75f54
[ "MIT" ]
null
null
null
r3c0nutils/viewer.py
markgacoka/r3c0n
ac64614d10d176b9de2170ce8758a6aa75d75f54
[ "MIT" ]
1
2022-03-07T03:37:51.000Z
2022-03-07T03:37:51.000Z
def show(output): """Print out an output based on the logging level Args: output: A string to be output Returns: prints out an output """ print(output)
19.3
53
0.585492
def show(output): print(output)
true
true
1c10eed720026095a65029c5519835384a8fe717
3,532
py
Python
moabb/datasets/ssvep_nakanishi.py
ideaguy3d/moabb
73d9a1e01f9d63c423fa855fb517b398d7e3cfc8
[ "BSD-3-Clause" ]
1
2021-06-15T19:55:46.000Z
2021-06-15T19:55:46.000Z
moabb/datasets/ssvep_nakanishi.py
ideaguy3d/moabb
73d9a1e01f9d63c423fa855fb517b398d7e3cfc8
[ "BSD-3-Clause" ]
null
null
null
moabb/datasets/ssvep_nakanishi.py
ideaguy3d/moabb
73d9a1e01f9d63c423fa855fb517b398d7e3cfc8
[ "BSD-3-Clause" ]
null
null
null
""" SSVEP Nakanishi dataset. """ import logging import numpy as np from mne import create_info from mne.channels import make_standard_montage from mne.io import RawArray from scipy.io import loadmat from . import download as dl from .base import BaseDataset log = logging.getLogger(__name__) NAKAHISHI_URL = "https...
34.970297
89
0.587769
import logging import numpy as np from mne import create_info from mne.channels import make_standard_montage from mne.io import RawArray from scipy.io import loadmat from . import download as dl from .base import BaseDataset log = logging.getLogger(__name__) NAKAHISHI_URL = "https://github.com/mnakanishi/12JFPM_S...
true
true
1c10ef5db974385bc85ca00a729a7f9ed4fa7e5f
878
py
Python
sa/profiles/HP/ProCurve/get_chassis_id.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
sa/profiles/HP/ProCurve/get_chassis_id.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
sa/profiles/HP/ProCurve/get_chassis_id.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # HP.ProCurve.get_chassis_id # --------------------------------------------------------------------- # Copyright (C) 2007-2010 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Pyt...
30.275862
95
0.518223
import re from noc.core.script.base import BaseScript from noc.sa.interfaces.igetchassisid import IGetChassisID class Script(BaseScript): name = "HP.ProCurve.get_chassis_id" cache = True interface = IGetChassisID rx_mac = re.compile(r"([0-9a-f]{6}-[0-9a-f]{6})", re.IGNORECASE | re.MULTILINE | re.D...
true
true
1c10f243532c5950634fe99f08e061624816b4c6
19,902
py
Python
clinica/pipelines/pet_surface/pet_surface_pipeline.py
alexandreroutier/clinica
66625c65e74962db7d5cea267d1a0e51d774bf91
[ "MIT" ]
null
null
null
clinica/pipelines/pet_surface/pet_surface_pipeline.py
alexandreroutier/clinica
66625c65e74962db7d5cea267d1a0e51d774bf91
[ "MIT" ]
null
null
null
clinica/pipelines/pet_surface/pet_surface_pipeline.py
alexandreroutier/clinica
66625c65e74962db7d5cea267d1a0e51d774bf91
[ "MIT" ]
null
null
null
# coding: utf-8 import clinica.pipelines.engine as cpe class PetSurface(cpe.Pipeline): """PetSurface - Surface-based processing of PET images. Returns: A clinica pipeline object containing the PetSurface pipeline. """ def check_pipeline_parameters(self): """Check pipeline parameters...
54.377049
145
0.44689
import clinica.pipelines.engine as cpe class PetSurface(cpe.Pipeline): def check_pipeline_parameters(self): if 'acq_label' not in self.parameters.keys(): raise KeyError('Missing compulsory acq_label key in pipeline parameter.') if 'suvr_reference_region' not in self.parameters.keys()...
true
true
1c10f28c7813e27b8717078d4305d61cfd3c559d
2,408
py
Python
server/geography/migrations/0001_initial.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
server/geography/migrations/0001_initial.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
server/geography/migrations/0001_initial.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-11 18:18 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
43.781818
149
0.596761
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Settlement', fields=[ ...
true
true
1c10f2c083a6db310c008778ddccef9441bb5514
1,003
py
Python
social/contrib/sites/migrations/0003_set_site_domain_and_name.py
mena-hub/social_site
168637ae3b6c323c74303d98f6bb373caf7c4e00
[ "MIT" ]
null
null
null
social/contrib/sites/migrations/0003_set_site_domain_and_name.py
mena-hub/social_site
168637ae3b6c323c74303d98f6bb373caf7c4e00
[ "MIT" ]
null
null
null
social/contrib/sites/migrations/0003_set_site_domain_and_name.py
mena-hub/social_site
168637ae3b6c323c74303d98f6bb373caf7c4e00
[ "MIT" ]
null
null
null
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): """Set site d...
28.657143
129
0.684945
from django.conf import settings from django.db import migrations def update_site_forward(apps, schema_editor): Site = apps.get_model("sites", "Site") Site.objects.update_or_create( id=settings.SITE_ID, defaults={ "domain": "social.com", "name": "social", }, ...
true
true
1c10f2ec222a860d1c8af9198c04bb612c9283a4
2,493
py
Python
Nile/Test.py
ee1tbg/elanFirstPyProj
34dce646b14bf33d0adb673fbcd52a43986fe1cb
[ "MIT" ]
null
null
null
Nile/Test.py
ee1tbg/elanFirstPyProj
34dce646b14bf33d0adb673fbcd52a43986fe1cb
[ "MIT" ]
null
null
null
Nile/Test.py
ee1tbg/elanFirstPyProj
34dce646b14bf33d0adb673fbcd52a43986fe1cb
[ "MIT" ]
null
null
null
def test_function(fn): if fn.__name__ == "calculate_shipping_cost": test_shipping(fn) if fn.__name__ == "calculate_driver_cost": test_driver(fn) if fn.__name__ == "calculate_money_made": test_money(fn) def test_shipping(f): try: costs = f((0, 0), (1, 1)) e...
34.150685
123
0.626955
def test_function(fn): if fn.__name__ == "calculate_shipping_cost": test_shipping(fn) if fn.__name__ == "calculate_driver_cost": test_driver(fn) if fn.__name__ == "calculate_money_made": test_money(fn) def test_shipping(f): try: costs = f((0, 0), (1, 1)) e...
true
true
1c10f340eac57bfba616626e29ffdf1be8fe2414
922
py
Python
backend/rumergy_backend/rumergy/models/user_profile.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-11-08T00:28:37.000Z
2021-11-08T00:28:37.000Z
backend/rumergy_backend/rumergy/models/user_profile.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-11-02T02:17:37.000Z
2021-11-02T02:17:37.000Z
backend/rumergy_backend/rumergy/models/user_profile.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-10-18T22:27:04.000Z
2021-10-18T22:27:04.000Z
from django.db import models from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from rumergy_backend import settings class UserProfile(models.Model): """Model for non-auth related us...
31.793103
86
0.706074
from django.db import models from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from rumergy_backend import settings class UserProfile(models.Model): user = models.OneToOneField( ...
true
true
1c10f3f5ca030c9e72f8f40128551f04783725f6
1,760
py
Python
scripts/create_update.py
YuricaKirisame/Store
c8cdef1473e4e23869372dbcf8c4e3111b641ccb
[ "MIT" ]
99
2017-10-26T17:53:03.000Z
2022-03-29T20:05:42.000Z
scripts/create_update.py
YuricaKirisame/Store
c8cdef1473e4e23869372dbcf8c4e3111b641ccb
[ "MIT" ]
146
2017-11-02T19:09:21.000Z
2022-02-06T07:27:25.000Z
scripts/create_update.py
YuricaKirisame/Store
c8cdef1473e4e23869372dbcf8c4e3111b641ccb
[ "MIT" ]
53
2018-02-05T12:03:55.000Z
2022-01-17T15:07:07.000Z
# Help # import vdf by running pip3 install vdf in console. # place your items.txt file into the dir with this scirpt. # edit INPUT_FILE_NAME & OUTPUT_FILE_NAME # python3 create_update.py import vdf import os CURRECT_DIR = os.path.dirname(os.path.realpath(__file__)) INPUT_FILE_NAME = "items.txt" OUTPUT_FILE_NAME = "u...
34.509804
165
0.6
import vdf import os CURRECT_DIR = os.path.dirname(os.path.realpath(__file__)) INPUT_FILE_NAME = "items.txt" OUTPUT_FILE_NAME = "update.sql" items = vdf.load(open("{}/{}".format(CURRECT_DIR, INPUT_FILE_NAME))) output = open("{}/{}".format(CURRECT_DIR, OUTPUT_FILE_NAME),"w+") items = {**items["Store"]["VIP Area"], *...
true
true
1c10f48117a643fbf60afca704f38d2d748f27f4
1,721
py
Python
class-randomness-is-all-around/code/week4/04-videoGridRandom.py
montoyamoraga/classes
4392b7ff5db7a42730e9856e2ed5e5a81859ab54
[ "MIT" ]
null
null
null
class-randomness-is-all-around/code/week4/04-videoGridRandom.py
montoyamoraga/classes
4392b7ff5db7a42730e9856e2ed5e5a81859ab54
[ "MIT" ]
null
null
null
class-randomness-is-all-around/code/week4/04-videoGridRandom.py
montoyamoraga/classes
4392b7ff5db7a42730e9856e2ed5e5a81859ab54
[ "MIT" ]
null
null
null
## example based on Video Grid example from VidPy website ## https://antiboredom.github.io/vidpy/examples.html # import vidpy module from vidpy import Clip, Composition # import random module import random # video location in hard drive video = 'videos/video4.mp4' # canvas width and height # this matches the dimensi...
23.256757
70
0.693202
from vidpy import Clip, Composition import random video = 'videos/video4.mp4' canvasWidth = 1280 canvasHeight = 720 horizontalVideos = 3 vidWidth = canvasWidth / horizontalVideos vidHeight = (vidWidth/canvasWidth) * canvasHeight x = 0 y = 0 delta = 5 clips = [] while y < canvasHeight: clip = Clip(video...
true
true
1c10f62259d36632f35ce894a99c4167d399beef
968
py
Python
examples/common/common_operations/schema.py
rijacobsen/dj-docs
dd9d399940f69202731fdac654d71424042d3ade
[ "MIT" ]
null
null
null
examples/common/common_operations/schema.py
rijacobsen/dj-docs
dd9d399940f69202731fdac654d71424042d3ade
[ "MIT" ]
8
2020-05-18T15:05:53.000Z
2022-03-01T10:33:14.000Z
examples/common/common_operations/schema.py
rijacobsen/dj-docs
dd9d399940f69202731fdac654d71424042d3ade
[ "MIT" ]
7
2019-09-19T13:58:32.000Z
2022-03-01T10:50:49.000Z
import csv import datajoint as dj schema = dj.schema("group_shared_datajoint_example") @schema class Pantheon(dj.Lookup): definition = """ pantheon : varchar(16) --- earliest : int latest: int """ @schema class Deity(dj.Manual): definition = """ name : varchar(16) --- -> Pant...
22
77
0.551653
import csv import datajoint as dj schema = dj.schema("group_shared_datajoint_example") @schema class Pantheon(dj.Lookup): definition = """ pantheon : varchar(16) --- earliest : int latest: int """ @schema class Deity(dj.Manual): definition = """ name : varchar(16) --- -> Pant...
true
true
1c10f71a6243b87586311b075f6a12f8f2c0e470
4,585
py
Python
LP2/Exercicio Banco/banco.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
null
null
null
LP2/Exercicio Banco/banco.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
6
2020-06-05T20:57:34.000Z
2022-03-11T23:47:43.000Z
LP2/Exercicio Banco/banco.py
luisxfelipe/Faculdade_Impacta_2semestre
ad6e0bcc22496bb96f56c5ca3d930554dd5302a4
[ "Apache-2.0" ]
null
null
null
from typing import List, Union Number = Union[int, float] """ 1) Termine os métodos calcula_juros() e saque(valor) da classe ContaPoupanca 2) Termine o método calcula_juros() da classe ContaCorrente 3) Adicione um atributo à classe Conta chamado _operacoes: self._operacoes = [] Ele servirá para guar...
24.918478
77
0.592366
from typing import List, Union Number = Union[int, float] class Cliente: def __init__(self, nome: str, telefone: int, email: str) -> None: self._nome = nome self._tel = telefone self._email = email def get_nome(self) -> str: return self._nome def get_telefone(self) -> int...
true
true
1c10f7662b28da9e434b1b4e564e2b383a8f32fe
2,803
py
Python
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/virtual_network_gateway_ip_configuration.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/virtual_network_gateway_ip_configuration.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/virtual_network_gateway_ip_configuration.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.123077
103
0.655012
from .sub_resource import SubResource class VirtualNetworkGatewayIPConfiguration(SubResource): _validation = { 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'private_ip_allocation_method': {'key': 'properties.privateIPAllocati...
true
true
1c10f7e7536f6f5140bac39d1f66ec93da98508a
11,896
py
Python
stats/trace_ip.py
private-octopus/diana
af8ffaac4a8fad26bf78104e5238e358a5ad8b21
[ "MIT" ]
3
2018-02-15T20:00:44.000Z
2020-07-16T06:08:20.000Z
stats/trace_ip.py
private-octopus/diana
af8ffaac4a8fad26bf78104e5238e358a5ad8b21
[ "MIT" ]
111
2017-11-04T23:13:38.000Z
2021-05-20T00:12:28.000Z
stats/trace_ip.py
private-octopus/dianal
af8ffaac4a8fad26bf78104e5238e358a5ad8b21
[ "MIT" ]
5
2018-06-21T08:18:26.000Z
2021-10-11T02:02:54.000Z
#!/usr/bin/python # coding=utf-8 # # This script takes into input a list of addresses that needs to be traced, # and a list of folders containing traces per five minute slice. It produces # for each address a csv file with one row per 5-minute slice and # one column per server-specific folder, showing how much traffic...
38.128205
187
0.590282
import codecs import sys import os from os import listdir from os.path import isfile, join from address_file import address_line, address_file_line, source_file, slice_to_time, time_to_slice import gzip import concurrent.futures import traceback import time import ipaddress import ip2as import datetime class trace_i...
true
true
1c10f8c6ba10e4e240e4937e708bb210589f3931
3,884
py
Python
tests/unit/test_context.py
nathanctech/pipsqueak3
f5c038fcecb0f54a6a71f6000c13e683ae72920f
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_context.py
nathanctech/pipsqueak3
f5c038fcecb0f54a6a71f6000c13e683ae72920f
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_context.py
nathanctech/pipsqueak3
f5c038fcecb0f54a6a71f6000c13e683ae72920f
[ "BSD-3-Clause" ]
null
null
null
""" test_context.py - Tests for Context test suite for the Context module Copyright (c) 2018 The Fuel Rat Mischief, All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE.md """ import pytest from src.packages.context.context import Context, _split_message pytestmark = [pytest.mark.unit, pytest...
34.371681
99
0.504377
import pytest from src.packages.context.context import Context, _split_message pytestmark = [pytest.mark.unit, pytest.mark.context] def test_constructor(bot_fx, user_fx): my_context = Context(bot_fx, user_fx, "#unittest", ["bird", "is", "the", "word"], [""]) assert my_context.bot is bot_fx assert my_co...
true
true
1c10f930406d0d842bde7039b462cbd6bd42d3c5
1,509
py
Python
sympy/polys/benchmarks/bench_galoispolys.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
sympy/polys/benchmarks/bench_galoispolys.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
sympy/polys/benchmarks/bench_galoispolys.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
"""Benchmarks for polynomials over Galois fields. """ from __future__ import print_function, division from sympy.polys.galoistools import gf_from_dict, gf_factor_sqf from sympy.polys.domains import ZZ from sympy import pi, nextprime def gathen_poly(n, p, K): return gf_from_dict({n: K.one, 1: K.one, 0: K.one}, p...
21.869565
63
0.695825
from __future__ import print_function, division from sympy.polys.galoistools import gf_from_dict, gf_factor_sqf from sympy.polys.domains import ZZ from sympy import pi, nextprime def gathen_poly(n, p, K): return gf_from_dict({n: K.one, 1: K.one, 0: K.one}, p, K) def shoup_poly(n, p, K): f = [K.one] * (n +...
true
true
1c10faa68cf0485137712d00eb14344b6e51700d
2,952
py
Python
lib/modules/powershell/management/get_domain_sid.py
lex0tanl/Empire
c8217e87cf333797eb363b782f769cc4b2f64b0b
[ "BSD-3-Clause" ]
3
2018-01-05T03:59:44.000Z
2020-02-11T03:25:46.000Z
lib/modules/powershell/management/get_domain_sid.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
null
null
null
lib/modules/powershell/management/get_domain_sid.py
gcxtx/Empire
dfb049ed48165eff2a8c1fe41941d0fbfa42df31
[ "BSD-3-Clause" ]
3
2017-11-27T07:29:34.000Z
2018-09-23T06:27:05.000Z
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-DomainSID', 'Author': ['@harmj0y'], 'Description': ('Returns the SID for the current of specified domain.'), 'Background' : True, ...
33.168539
116
0.50542
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-DomainSID', 'Author': ['@harmj0y'], 'Description': ('Returns the SID for the current of specified domain.'), 'Background' : True, ...
false
true
1c10fb0ab5700a9abd3a5da6855de061a51bd3c0
995
py
Python
setup.py
yaqwsx/ElegooMarsUtility
abd566ead4aaacc9e17259f66e49520dd6c61dcd
[ "MIT" ]
30
2019-11-13T19:19:58.000Z
2022-01-25T21:12:10.000Z
setup.py
yaqwsx/ElegooMarsUtilitiy
abd566ead4aaacc9e17259f66e49520dd6c61dcd
[ "MIT" ]
5
2019-12-29T04:58:00.000Z
2021-02-19T10:07:53.000Z
setup.py
yaqwsx/ElegooMarsUtilitiy
abd566ead4aaacc9e17259f66e49520dd6c61dcd
[ "MIT" ]
1
2021-04-18T19:06:54.000Z
2021-04-18T19:06:54.000Z
# -*- coding: utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="ElegooMarsUtility", version="0.2.2", author="Jan Mrázek", author_email="email@honzamrazek.cz", description="Utility to post process sliced models for Elegoo Mars"...
26.184211
72
0.621106
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="ElegooMarsUtility", version="0.2.2", author="Jan Mrázek", author_email="email@honzamrazek.cz", description="Utility to post process sliced models for Elegoo Mars", long_description=l...
true
true
1c10fb8250954a11a8554d525b0b509dd654dba7
76,554
py
Python
third_party/bazel/protos/crosstool_config_pb2.py
Ewpratten/frc_971_mirror
3a8a0c4359f284d29547962c2b4c43d290d8065c
[ "BSD-2-Clause" ]
null
null
null
third_party/bazel/protos/crosstool_config_pb2.py
Ewpratten/frc_971_mirror
3a8a0c4359f284d29547962c2b4c43d290d8065c
[ "BSD-2-Clause" ]
null
null
null
third_party/bazel/protos/crosstool_config_pb2.py
Ewpratten/frc_971_mirror
3a8a0c4359f284d29547962c2b4c43d290d8065c
[ "BSD-2-Clause" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: src/main/protobuf/crosstool_config.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.pr...
48.916294
8,397
0.750647
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf i...
true
true
1c10fbd3a7275ff1bb403fb1152c73eeb304a6f2
132
py
Python
python/hello-sphinx/tests/test_nwispy.py
jlant/playground
e3488ad93c1edc5285a693a58a9be886000c5bf5
[ "MIT" ]
null
null
null
python/hello-sphinx/tests/test_nwispy.py
jlant/playground
e3488ad93c1edc5285a693a58a9be886000c5bf5
[ "MIT" ]
null
null
null
python/hello-sphinx/tests/test_nwispy.py
jlant/playground
e3488ad93c1edc5285a693a58a9be886000c5bf5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest def test_hello(): assert 0 # phony test to force failure for now
16.5
51
0.651515
import pytest def test_hello(): assert 0
true
true
1c10fc20a3fe7b412a9339bf55740091fd684119
2,314
py
Python
Python/Golden_Section.py
CleverChuk/Numerical-Analysis
1131aa56955c883bcb28859868121c4ee80d9c04
[ "MIT" ]
null
null
null
Python/Golden_Section.py
CleverChuk/Numerical-Analysis
1131aa56955c883bcb28859868121c4ee80d9c04
[ "MIT" ]
null
null
null
Python/Golden_Section.py
CleverChuk/Numerical-Analysis
1131aa56955c883bcb28859868121c4ee80d9c04
[ "MIT" ]
null
null
null
""" Golden Section search Implementation "NOT COMPLETE" """ import math as mt from Nu_Meth import Nu_Meth class GoldenSection(Nu_Meth): gR = 1.618 def __init__(self, fptr, maxIter = 500, tol = 0.0001): self._fptr = fptr self._max_iter = maxIter self._tol = tol def execute(s...
17.8
120
0.451599
import math as mt from Nu_Meth import Nu_Meth class GoldenSection(Nu_Meth): gR = 1.618 def __init__(self, fptr, maxIter = 500, tol = 0.0001): self._fptr = fptr self._max_iter = maxIter self._tol = tol def execute(self, a, b, minimax = 0): f_a = self._fptr(a) f_b = s...
true
true
1c10fd2736d1e25c5d41725d287020ac7bb6cda3
2,048
py
Python
inhomogenousPaths/boSolverInhomogenous.py
andrewwarrington/cost-optimal-particle-filter
a6acb60ca90c7f7b984182891d39adeb7e05724f
[ "MIT" ]
2
2018-06-20T21:17:47.000Z
2018-09-07T01:27:26.000Z
inhomogenousPaths/boSolverInhomogenous.py
andrewwarrington/cost-optimal-particle-filter
a6acb60ca90c7f7b984182891d39adeb7e05724f
[ "MIT" ]
null
null
null
inhomogenousPaths/boSolverInhomogenous.py
andrewwarrington/cost-optimal-particle-filter
a6acb60ca90c7f7b984182891d39adeb7e05724f
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018, Andrew Warrington. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
27.675676
111
0.757813
import numpy as np import matplotlib.pyplot as plt import time import os import copy import GPy import GPyOpt from functools import partial import inhomogenousPaths.generateRandomCourse as grc import inhomogenousPaths.evaluateScheduleAndCourse as esac samplesToMake = 1 course = grc.generate_course(2) plt.figure() ...
true
true
1c10fdf1aa45ebde8b6d1d991af96768ed15bf0d
3,679
py
Python
plugins/tts/espeak-tts/espeak.py
kowo-zahl/Naomi
476cfc42036a1ac88e33451431fc64d5ea1aa49a
[ "MIT" ]
194
2018-07-28T14:54:35.000Z
2022-03-18T12:40:10.000Z
plugins/tts/espeak-tts/espeak.py
HoltTechnologyCorporation/Naomi
16d5f6ba03ea96c3fa13ed4e2c1f082041d9de31
[ "MIT" ]
239
2018-07-13T16:15:25.000Z
2022-03-31T17:55:01.000Z
plugins/tts/espeak-tts/espeak.py
Longshotpro2/Naomi
9330c63fe24606dc45194d297c665f37a4ec10f7
[ "MIT" ]
64
2018-07-26T02:18:33.000Z
2022-01-07T06:53:01.000Z
import collections import pipes import re import unittest from naomi import diagnose from naomi import plugin from naomi import profile from naomi.run_command import run_command if not diagnose.check_executable('espeak'): raise unittest.SkipTest("Skipping espeak, executable not found") raise ImportError("espea...
33.752294
83
0.550965
import collections import pipes import re import unittest from naomi import diagnose from naomi import plugin from naomi import profile from naomi.run_command import run_command if not diagnose.check_executable('espeak'): raise unittest.SkipTest("Skipping espeak, executable not found") raise ImportError("espea...
true
true
1c10fe693c31bf1771a2198560e6bd0c1db521b0
14,046
py
Python
data/field.py
Kilichbek/artemis-m2-transformer
99f7e797965710bf2565283d6b5028a6fe32664c
[ "MIT" ]
8
2021-02-02T02:42:55.000Z
2021-03-26T14:47:58.000Z
data/field.py
Kilichbek/artemis-m2-transformer
99f7e797965710bf2565283d6b5028a6fe32664c
[ "MIT" ]
null
null
null
data/field.py
Kilichbek/artemis-m2-transformer
99f7e797965710bf2565283d6b5028a6fe32664c
[ "MIT" ]
1
2021-07-16T08:24:15.000Z
2021-07-16T08:24:15.000Z
# coding: utf8 import base64 import csv import os import pickle import shutil import sys import warnings from collections import Counter, OrderedDict from itertools import chain import numpy as np import six import torch from torch.utils.data.dataloader import default_collate from tqdm import tqdm from .dataset impor...
40.131429
108
0.593763
import base64 import csv import os import pickle import shutil import sys import warnings from collections import Counter, OrderedDict from itertools import chain import numpy as np import six import torch from torch.utils.data.dataloader import default_collate from tqdm import tqdm from .dataset import Dataset from ...
true
true
1c10feeb5a66ffc6e91ca3f7af1a35a187f625c7
424
py
Python
fzw/news/migrations/0009_news_analysis_url.py
fajnie-ze-wiesz/fzw-backend
eb7942bbf884a1269cfe0ad336187ffa979b4d12
[ "MIT" ]
1
2018-03-31T14:07:28.000Z
2018-03-31T14:07:28.000Z
fzw/news/migrations/0009_news_analysis_url.py
fajnie-ze-wiesz/fzw-backend
eb7942bbf884a1269cfe0ad336187ffa979b4d12
[ "MIT" ]
2
2020-06-06T06:27:44.000Z
2020-12-23T14:13:50.000Z
fzw/news/migrations/0009_news_analysis_url.py
fajnie-ze-wiesz/fzw-backend
eb7942bbf884a1269cfe0ad336187ffa979b4d12
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name # Generated by Django 3.0.7 on 2021-01-26 11:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('news', '0008_auto_20201221_1204'), ] operations = [ migrations.AddField( model_name='news', ...
21.2
58
0.606132
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('news', '0008_auto_20201221_1204'), ] operations = [ migrations.AddField( model_name='news', name='analysis_url', field=models.URLField(blank=True, defau...
true
true
1c110009b43a8ae59f1713561146800a342ccd61
47,538
py
Python
planemo/shed/__init__.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
null
null
null
planemo/shed/__init__.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
1
2016-09-14T18:09:59.000Z
2016-09-14T18:09:59.000Z
planemo/shed/__init__.py
jmchilton/planemo
d352a085fe10cb6b7c1384663b114201da42d97b
[ "CC-BY-3.0" ]
null
null
null
"""Abstractions for shed related interactions used by the rest of planemo.""" import contextlib import copy import fnmatch import hashlib import json import os import re import shutil import sys import tarfile from collections import namedtuple from tempfile import ( mkstemp, ) import bioblend import six import ya...
33.336606
237
0.636144
import contextlib import copy import fnmatch import hashlib import json import os import re import shutil import sys import tarfile from collections import namedtuple from tempfile import ( mkstemp, ) import bioblend import six import yaml from galaxy.util import ( odict, unicodify, ) from planemo import ...
true
true
1c11009a99a9ca743e2a9606688b17698063dded
21,923
py
Python
python/tvm/runtime/vm.py
onkar-sima-ai/tvm
2d321202fb2683edc5b18179ac564b5218e2fcbf
[ "Apache-2.0" ]
null
null
null
python/tvm/runtime/vm.py
onkar-sima-ai/tvm
2d321202fb2683edc5b18179ac564b5218e2fcbf
[ "Apache-2.0" ]
2
2021-02-04T21:31:34.000Z
2021-04-09T22:39:56.000Z
python/tvm/runtime/vm.py
onkar-sima-ai/tvm
2d321202fb2683edc5b18179ac564b5218e2fcbf
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.0768
108
0.602564
import numpy as np import tvm from tvm.runtime import Module from tvm._ffi.runtime_ctypes import TVMByteArray from tvm._ffi import base as _base from .object import Object from . import _ffi_api, container from ..rpc.base import RPC_SESS_MASK def _convert(arg, cargs): if isinstance(arg, Object): cargs.ap...
true
true
1c1100fc561cc12d695a0f02e582a1b5cd0e076d
2,395
py
Python
teuthology/task/proc_thrasher.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
1
2018-05-17T13:02:42.000Z
2018-05-17T13:02:42.000Z
teuthology/task/proc_thrasher.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
1
2021-02-23T19:06:55.000Z
2021-02-23T19:06:55.000Z
teuthology/task/proc_thrasher.py
zhsj/teuthology
7f11a09f2b7d7406d65f21a85fc2e3db395a95a0
[ "MIT" ]
2
2019-09-26T09:31:37.000Z
2019-09-26T09:36:30.000Z
""" Process thrasher """ import logging import gevent import random import time from ..orchestra import run log = logging.getLogger(__name__) class ProcThrasher: """ Kills and restarts some number of the specified process on the specified remote """ def __init__(self, config, remote, *proc_args, ...
29.567901
97
0.545303
import logging import gevent import random import time from ..orchestra import run log = logging.getLogger(__name__) class ProcThrasher: def __init__(self, config, remote, *proc_args, **proc_kwargs): self.proc_kwargs = proc_kwargs self.proc_args = proc_args self.config = config se...
true
true
1c1101b8065e5dd660e5d97ae778a5b13363d5bc
427
py
Python
examples-python/simple_hive_context.py
vaquarkhan/mist-with-spark
1602ee890aef86c7d22448d4f9804eb43ecc1311
[ "Apache-2.0" ]
2
2018-08-31T06:06:56.000Z
2020-01-07T11:29:41.000Z
examples-python/simple_hive_context.py
vaquarkhan/mist-with-spark
1602ee890aef86c7d22448d4f9804eb43ecc1311
[ "Apache-2.0" ]
null
null
null
examples-python/simple_hive_context.py
vaquarkhan/mist-with-spark
1602ee890aef86c7d22448d4f9804eb43ecc1311
[ "Apache-2.0" ]
null
null
null
from mist.mist_job import * class SimpleHiveContext(MistJob, WithSQLSupport, WithHiveSupport): def execute(self, path): df = self.hive_context.read.json(path) df.printSchema() df.registerTempTable("people") df.show() df2 = self.hive_context.sql("SELECT AVG(age) AS avg_age ...
25.117647
77
0.632319
from mist.mist_job import * class SimpleHiveContext(MistJob, WithSQLSupport, WithHiveSupport): def execute(self, path): df = self.hive_context.read.json(path) df.printSchema() df.registerTempTable("people") df.show() df2 = self.hive_context.sql("SELECT AVG(age) AS avg_age ...
true
true
1c1103ee14e4e83c51057989db1739b637af9157
2,142
py
Python
cvtest.py
SmaugTheTerrible/cvtest
ebca2da96d4d03d8ef5c5f64ae997de9a7e8dde0
[ "MIT" ]
null
null
null
cvtest.py
SmaugTheTerrible/cvtest
ebca2da96d4d03d8ef5c5f64ae997de9a7e8dde0
[ "MIT" ]
null
null
null
cvtest.py
SmaugTheTerrible/cvtest
ebca2da96d4d03d8ef5c5f64ae997de9a7e8dde0
[ "MIT" ]
null
null
null
import cv2 import numpy import pyautogui import threading def match(template, source=None, method=cv2.TM_CCOEFF_NORMED, threshold=0.95): if (source is None): source = screenshot() res = cv2.matchTemplate(source, template, method) loc = numpy.where(res >= threshold) return zip(*loc[::-1]) de...
22.082474
78
0.631653
import cv2 import numpy import pyautogui import threading def match(template, source=None, method=cv2.TM_CCOEFF_NORMED, threshold=0.95): if (source is None): source = screenshot() res = cv2.matchTemplate(source, template, method) loc = numpy.where(res >= threshold) return zip(*loc[::-1]) de...
true
true
1c110441731b32962a864bc70e5b5d0347647bdd
2,813
py
Python
examples/basic_example.py
EleutherAI/tqdm-multiprocess
fccefc473595055bf3a5e74bcf8a75b3a9517638
[ "MIT" ]
30
2020-10-23T05:32:01.000Z
2021-12-08T21:11:43.000Z
examples/basic_example.py
EleutherAI/tqdm-multiprocess
fccefc473595055bf3a5e74bcf8a75b3a9517638
[ "MIT" ]
null
null
null
examples/basic_example.py
EleutherAI/tqdm-multiprocess
fccefc473595055bf3a5e74bcf8a75b3a9517638
[ "MIT" ]
1
2020-10-26T16:39:06.000Z
2020-10-26T16:39:06.000Z
from time import sleep import multiprocessing import tqdm import logging from tqdm_multiprocess.logger import setup_logger_tqdm logger = logging.getLogger(__name__) from tqdm_multiprocess import TqdmMultiProcessPool iterations1 = 100 iterations2 = 5 iterations3 = 2 def some_other_function(tqdm_func, global_tqdm): ...
40.768116
110
0.668326
from time import sleep import multiprocessing import tqdm import logging from tqdm_multiprocess.logger import setup_logger_tqdm logger = logging.getLogger(__name__) from tqdm_multiprocess import TqdmMultiProcessPool iterations1 = 100 iterations2 = 5 iterations3 = 2 def some_other_function(tqdm_func, global_tqdm): ...
true
true
1c1104bad438c19d7251bf3ff9a2c29b30f73cd1
3,646
py
Python
cpapi/api_response.py
chkp-ofer/cp_mgmt_api_python_sdk
22723052348e83043ec7ed8e4ddcd8a608aeb10e
[ "Apache-2.0" ]
null
null
null
cpapi/api_response.py
chkp-ofer/cp_mgmt_api_python_sdk
22723052348e83043ec7ed8e4ddcd8a608aeb10e
[ "Apache-2.0" ]
null
null
null
cpapi/api_response.py
chkp-ofer/cp_mgmt_api_python_sdk
22723052348e83043ec7ed8e4ddcd8a608aeb10e
[ "Apache-2.0" ]
null
null
null
import json import sys # compatible import for python 2 and 3 from .api_exceptions import APIException if sys.version_info >= (3, 0): from http.client import HTTPResponse else: from httplib import HTTPResponse # compatible iterator for python 2 and 3 def iteritems(data): if sys.version_info >= (3, 0): ...
32.846847
113
0.603675
import json import sys from .api_exceptions import APIException if sys.version_info >= (3, 0): from http.client import HTTPResponse else: from httplib import HTTPResponse def iteritems(data): if sys.version_info >= (3, 0): return data.items() else: return data.iteritems() def extrac...
true
true
1c1105ad3e9262a31174bb28b475bee65a2270c3
744
py
Python
backprop/models/t5_qa_summary_emotion/models_list.py
lucky7323/backprop
4daa756f3a46600d4dfa0631bb3607237df1fed6
[ "Apache-2.0" ]
null
null
null
backprop/models/t5_qa_summary_emotion/models_list.py
lucky7323/backprop
4daa756f3a46600d4dfa0631bb3607237df1fed6
[ "Apache-2.0" ]
null
null
null
backprop/models/t5_qa_summary_emotion/models_list.py
lucky7323/backprop
4daa756f3a46600d4dfa0631bb3607237df1fed6
[ "Apache-2.0" ]
null
null
null
t5_base_qa_summary_emotion = { "description": "This is the T5 base model by Google, and has been finetuned further for Q&A, Summarisation, and Sentiment analysis (emotion detection).", "tasks": ["text-generation", "emotion", "summarisation", "qa"], "init_kwargs": { "model_path": "kiri-ai/t5-base-qa-...
28.615385
157
0.557796
t5_base_qa_summary_emotion = { "description": "This is the T5 base model by Google, and has been finetuned further for Q&A, Summarisation, and Sentiment analysis (emotion detection).", "tasks": ["text-generation", "emotion", "summarisation", "qa"], "init_kwargs": { "model_path": "kiri-ai/t5-base-qa-...
true
true
1c1105c259357eea406f34a91ddee5d8c28179b1
17,790
py
Python
Demo/tkinter/guido/solitaire.py
arvindm95/unladen-swallow
8175e37eaea7ca66ed03283b46bc1d2db0d3f9c3
[ "PSF-2.0" ]
2,293
2015-01-02T12:46:10.000Z
2022-03-29T09:45:43.000Z
python/src/Demo/tkinter/guido/solitaire.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
315
2015-05-31T11:55:46.000Z
2022-01-12T08:36:37.000Z
python/src/Demo/tkinter/guido/solitaire.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
1,033
2015-01-04T07:48:40.000Z
2022-03-24T09:34:37.000Z
#! /usr/bin/env python """Solitaire game, much like the one that comes with MS Windows. Limitations: - No cute graphical images for the playing cards faces or backs. - No scoring or timer. - No undo. - No option to turn 3 cards at a time. - No keyboard shortcuts. - Less fancy animation when you win. - The determinat...
27.884013
78
0.583193
import math import random from Tkinter import * from Canvas import Rectangle, CanvasText, Group, Window class Group(Group): def bind(self, sequence=None, command=None): return self.canvas.tag_bind(self.id, sequence, command) CARDWIDTH = 100 CARDHEIGHT = 150 MARGIN = 10 XSPACING = CARDWIDTH + 2*MAR...
true
true
1c1105ea617b4706c2748a734da54d4ce17d4a29
858
py
Python
blog/migrations/0007_auto_20180608_1941.py
frueringborgerforening/fruering
cb482268272698d34482dbb956b79f0d114e1834
[ "MIT" ]
1
2018-05-14T20:19:42.000Z
2018-05-14T20:19:42.000Z
blog/migrations/0007_auto_20180608_1941.py
andreasbrakhagecarstensen/fruering
cb482268272698d34482dbb956b79f0d114e1834
[ "MIT" ]
78
2018-03-18T09:36:26.000Z
2019-12-16T21:06:09.000Z
blog/migrations/0007_auto_20180608_1941.py
andreasbrakhagecarstensen/fruering
cb482268272698d34482dbb956b79f0d114e1834
[ "MIT" ]
null
null
null
# Generated by Django 2.0.3 on 2018-06-08 19:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20180505_1927'), ] operations = [ migrations.RemoveField( model_name='blogpagegalleryimage', name='image',...
23.189189
47
0.537296
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0006_auto_20180505_1927'), ] operations = [ migrations.RemoveField( model_name='blogpagegalleryimage', name='image', ), migrations.RemoveField( ...
true
true
1c1105fe39a5eb4407d15ad8aedf216f80e675a8
796
py
Python
models/projection_head.py
mgwillia/unsupervised-analysis
66b5c7af391199394ace3a1ff396d46ac5bd7ce5
[ "MIT" ]
null
null
null
models/projection_head.py
mgwillia/unsupervised-analysis
66b5c7af391199394ace3a1ff396d46ac5bd7ce5
[ "MIT" ]
null
null
null
models/projection_head.py
mgwillia/unsupervised-analysis
66b5c7af391199394ace3a1ff396d46ac5bd7ce5
[ "MIT" ]
null
null
null
""" Some code from Unsupservised Classifcation, maybe. Lots of modifications. """ from torch import nn class ProjectionHead(nn.Module): def __init__(self, embedding_dim, projection_dim): super(ProjectionHead, self).__init__() head_layers = [nn.Linear(embedding_dim, embedding_dim, bias=True)] ...
34.608696
79
0.633166
from torch import nn class ProjectionHead(nn.Module): def __init__(self, embedding_dim, projection_dim): super(ProjectionHead, self).__init__() head_layers = [nn.Linear(embedding_dim, embedding_dim, bias=True)] head_layers.append(nn.BatchNorm1d( embedding_dim, ...
true
true
1c1107fafdf52fa3f68991c935d46b695b300b38
1,336
py
Python
psshlib/hosts.py
rorz99/parallel-ssh
b59b6ad840c1aa139fb384175c2be37772a0b868
[ "BSD-3-Clause" ]
15
2015-05-12T07:47:05.000Z
2021-11-15T11:29:17.000Z
psshlib/hosts.py
rorz99/parallel-ssh
b59b6ad840c1aa139fb384175c2be37772a0b868
[ "BSD-3-Clause" ]
1
2016-09-08T14:07:24.000Z
2016-09-08T18:14:18.000Z
psshlib/hosts.py
rorz99/parallel-ssh
b59b6ad840c1aa139fb384175c2be37772a0b868
[ "BSD-3-Clause" ]
3
2015-10-14T14:39:48.000Z
2018-12-20T06:39:44.000Z
import sys import psshutil import random import re class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sy...
34.25641
91
0.574102
import sys import psshutil import random import re class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sy...
true
true
1c11087f76debaec10eb54dd71dd64a43c3a9923
1,462
py
Python
hawkweed/functional/mathematical.py
hellerve/hawkweed
0cdb378f7dac5ab76ad53d6c1917f0ac5687793c
[ "MIT" ]
20
2016-06-13T19:24:20.000Z
2022-01-26T14:08:11.000Z
hawkweed/functional/mathematical.py
hellerve/hawkweed
0cdb378f7dac5ab76ad53d6c1917f0ac5687793c
[ "MIT" ]
null
null
null
hawkweed/functional/mathematical.py
hellerve/hawkweed
0cdb378f7dac5ab76ad53d6c1917f0ac5687793c
[ "MIT" ]
null
null
null
"""A few mathematical functions""" from hawkweed.functional.primitives import curry def inc(num): """ A function that increments its argument by 1. Complexity: O(1) params: num: the number to increment returns: the incremented number """ return num + 1 def dec(num): """ A ...
20.885714
65
0.619015
from hawkweed.functional.primitives import curry def inc(num): return num + 1 def dec(num): return num - 1 @curry def add(fst, snd): return fst + snd @curry def sub(fst, snd): return fst - snd @curry def mul(fst, snd): return fst * snd @curry def div(fst, snd): return fst / snd @curry def...
true
true
1c1108a73f52940d62cc913d7459cbd6b36a1fa3
25,831
py
Python
tests/test_nubank_client.py
janjitsu/pynubank
5e8df67e2e713b19eb758a0980507ed928a6bf4e
[ "MIT" ]
null
null
null
tests/test_nubank_client.py
janjitsu/pynubank
5e8df67e2e713b19eb758a0980507ed928a6bf4e
[ "MIT" ]
null
null
null
tests/test_nubank_client.py
janjitsu/pynubank
5e8df67e2e713b19eb758a0980507ed928a6bf4e
[ "MIT" ]
null
null
null
import json import pytest from unittest.mock import MagicMock from requests import Response from pynubank.nubank import Nubank, NuException @pytest.fixture def authentication_return(): return { "access_token": "access_token_123", "token_type": "bearer", "_links": { "change_p...
43.486532
146
0.561922
import json import pytest from unittest.mock import MagicMock from requests import Response from pynubank.nubank import Nubank, NuException @pytest.fixture def authentication_return(): return { "access_token": "access_token_123", "token_type": "bearer", "_links": { "change_p...
true
true
1c1108fa6eb93b6d83cb6dbefc0d793390b4904f
5,992
py
Python
core/polyaxon/polyaxonfile/check.py
jjasonkal/polyaxon
8454b29b2b971b965de8a7bf63afdd48f07d6d53
[ "Apache-2.0" ]
null
null
null
core/polyaxon/polyaxonfile/check.py
jjasonkal/polyaxon
8454b29b2b971b965de8a7bf63afdd48f07d6d53
[ "Apache-2.0" ]
null
null
null
core/polyaxon/polyaxonfile/check.py
jjasonkal/polyaxon
8454b29b2b971b965de8a7bf63afdd48f07d6d53
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
33.662921
95
0.633678
import os from collections import OrderedDict from polyaxon.cli.errors import handle_cli_error from polyaxon.config_reader.spec import ConfigSpec from polyaxon.exceptions import PolyaxonfileError from polyaxon.polyaxonfile.manager import check_default_path, get_op_specification from polyaxon.polyaxonfile.params impo...
true
true
1c1109011cee92efaab5f19068915959e9ce896c
7,290
py
Python
tests/integration/views/surveys/test_access_survey.py
ONSdigital/ras-frontstage
e8ff1931b49cb3ab47b421aed6780e9e944dceea
[ "MIT" ]
8
2017-06-30T12:32:02.000Z
2022-02-25T09:07:28.000Z
tests/integration/views/surveys/test_access_survey.py
ONSdigital/ras-frontstage
e8ff1931b49cb3ab47b421aed6780e9e944dceea
[ "MIT" ]
256
2017-05-16T09:38:09.000Z
2022-03-28T13:38:42.000Z
tests/integration/views/surveys/test_access_survey.py
ONSdigital/ras-frontstage
e8ff1931b49cb3ab47b421aed6780e9e944dceea
[ "MIT" ]
4
2017-09-29T08:58:36.000Z
2021-04-11T07:44:27.000Z
import io import unittest from unittest.mock import patch import requests_mock from frontstage import app from tests.integration.mocked_services import ( business_party, collection_exercise, collection_instrument_seft, encoded_jwt_token, encrypted_enrolment_code, survey, url_banner_api, ) ...
41.896552
215
0.691632
import io import unittest from unittest.mock import patch import requests_mock from frontstage import app from tests.integration.mocked_services import ( business_party, collection_exercise, collection_instrument_seft, encoded_jwt_token, encrypted_enrolment_code, survey, url_banner_api, ) ...
true
true
1c11095816892977cda8fec90d483f796c6a1057
9,700
py
Python
jang_pendulum_example.py
trituenhantaoio/anfis-pytorch
7a6bf123d69b550e46abeddd5b4a776243d43aa6
[ "MIT" ]
66
2019-04-18T08:02:35.000Z
2022-03-26T07:10:42.000Z
jang_pendulum_example.py
trituenhantaoio/anfis-pytorch
7a6bf123d69b550e46abeddd5b4a776243d43aa6
[ "MIT" ]
3
2019-04-20T09:42:47.000Z
2021-02-24T19:16:02.000Z
jang_pendulum_example.py
trituenhantaoio/anfis-pytorch
7a6bf123d69b550e46abeddd5b4a776243d43aa6
[ "MIT" ]
35
2019-09-19T01:42:05.000Z
2021-12-07T15:56:46.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' ANFIS in torch: Control examples from Jang's book, chapter 17. Section 17.6.2: Recurrent learning, inverted pendulum case study. or "Self Learning of Fuzzy Controllers Based on Temporal Back Propagation" IEEE Trans on Neural Networks 3(5), Sept ...
35.793358
78
0.602062
import numpy as np import matplotlib.pyplot as plt import torch import anfis from membership import make_bell_mfs import fileio.astext dtype = torch.float np.random.seed(0) class Pendulum(): def __init__(self, theta=0, dtheta=0): self._state = torch.tensor((theta, dtheta), dtype=dtype).reshape(1, 2)...
true
true
1c110a0826a5a0cc52df3928ed6e4c6721598238
1,257
py
Python
src/pacsanini/__init__.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
10
2021-07-05T16:59:03.000Z
2022-02-09T11:13:03.000Z
src/pacsanini/__init__.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
51
2021-07-05T08:29:35.000Z
2021-11-30T08:30:10.000Z
src/pacsanini/__init__.py
aachick/pacsanini
b54e4f222eede3c31b04373253e4de0b2c91217b
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
2
2021-07-06T06:35:37.000Z
2021-07-09T10:26:38.000Z
# Copyright (C) 2019-2020, Therapixel SA. # All rights reserved. # This file is subject to the terms and conditions described in the # LICENSE file distributed in this package. """Expose the top-level pacsanini methods and classes.""" __all__ = [ "parse_dir", "parse_dir2csv", "parse_dir2df", "parse_dir...
20.95
79
0.674622
__all__ = [ "parse_dir", "parse_dir2csv", "parse_dir2df", "parse_dir2json", "StoreSCPServer", "echo", "find", "move", "move_patients", "move_studies", "patient_find", "patient_find2csv", "patient_find2sql", "run_server", "send_dicom", "study_find", "s...
true
true
1c110a0c779e7c0e8755b7c0d3d96eafd4eb87e6
11,877
py
Python
Scripts/Prototypes/img_sub_lanes_pub.py
aryanmangal769/UGV-DTU_ROS_Stack
6a00c83d076361bdf171c1ad4ef383ad262da4e6
[ "BSD-3-Clause" ]
null
null
null
Scripts/Prototypes/img_sub_lanes_pub.py
aryanmangal769/UGV-DTU_ROS_Stack
6a00c83d076361bdf171c1ad4ef383ad262da4e6
[ "BSD-3-Clause" ]
null
null
null
Scripts/Prototypes/img_sub_lanes_pub.py
aryanmangal769/UGV-DTU_ROS_Stack
6a00c83d076361bdf171c1ad4ef383ad262da4e6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Python libs import sys, time # numpy and scipy import numpy as np import math from scipy.ndimage import filters # OpenCV import cv2 # Ros libraries import roslib import rospy # Ros Messages from sensor_msgs.msg import CompressedImage from sensor_msgs.msg import LaserScan ''' TO understand M...
31.420635
150
0.583817
import sys, time import numpy as np import math from scipy.ndimage import filters import cv2 import roslib import rospy from sensor_msgs.msg import CompressedImage from sensor_msgs.msg import LaserScan def imagesShow(): cv2.imshow('masked_img', masked_img) cv2.imshow('warped_img', warped_img) ...
true
true
1c110aba556247840a81e0d2194a42594ea74bc5
6,824
py
Python
deepchem/trans/tests/test_balancing.py
micimize/deepchem
651df9f9d8e6f1b33d3af8f0be251e9e8095fe88
[ "MIT" ]
1
2020-08-19T17:25:27.000Z
2020-08-19T17:25:27.000Z
deepchem/trans/tests/test_balancing.py
swpper/deepchem
510b9bf1805bc5a472c1a519700e6b128e06c651
[ "MIT" ]
1
2020-09-22T18:42:21.000Z
2020-09-22T18:42:21.000Z
deepchem/trans/tests/test_balancing.py
swpper/deepchem
510b9bf1805bc5a472c1a519700e6b128e06c651
[ "MIT" ]
1
2022-03-11T00:10:23.000Z
2022-03-11T00:10:23.000Z
import os import numpy as np import deepchem as dc import itertools import tempfile def test_binary_1d(): """Test balancing transformer on single-task dataset without explicit task dimension.""" n_samples = 20 n_features = 3 n_classes = 2 np.random.seed(123) ids = np.arange(n_samples) X = np.random.rand...
38.994286
90
0.699443
import os import numpy as np import deepchem as dc import itertools import tempfile def test_binary_1d(): n_samples = 20 n_features = 3 n_classes = 2 np.random.seed(123) ids = np.arange(n_samples) X = np.random.rand(n_samples, n_features) y = np.random.randint(n_classes, size=(n_samples,)) w = np.ones...
true
true
1c110c3e0c7b5717f0a2d1844dead2399d29e108
116
py
Python
medium2md/__main__.py
cleberzavadniak/medium2md
d1149b7763b3c9bd3b58419008ce6996c2b08e63
[ "MIT" ]
5
2019-03-07T14:47:46.000Z
2022-03-07T20:19:51.000Z
medium2md/__main__.py
cleberzavadniak/medium2md
d1149b7763b3c9bd3b58419008ce6996c2b08e63
[ "MIT" ]
null
null
null
medium2md/__main__.py
cleberzavadniak/medium2md
d1149b7763b3c9bd3b58419008ce6996c2b08e63
[ "MIT" ]
null
null
null
import sys from . import Importer url = sys.argv[1] importer = Importer(url) importer.run() print(importer.text)
11.6
24
0.732759
import sys from . import Importer url = sys.argv[1] importer = Importer(url) importer.run() print(importer.text)
true
true
1c110dda8eb7a0a52ec510ea702d4b6cff7526f5
6,101
py
Python
modules.py
lkbr1808/DIF-Net
538858c8c89e1b4f37c24533ebd6651ae8eb413b
[ "MIT" ]
null
null
null
modules.py
lkbr1808/DIF-Net
538858c8c89e1b4f37c24533ebd6651ae8eb413b
[ "MIT" ]
null
null
null
modules.py
lkbr1808/DIF-Net
538858c8c89e1b4f37c24533ebd6651ae8eb413b
[ "MIT" ]
null
null
null
'''Define basic blocks ''' import torch from torch import nn from torchmeta.modules import (MetaModule, MetaSequential) # from torchmeta.modules.utils import get_subdict import numpy as np from collections import OrderedDict import math import torch.nn.functional as F '''Adapted from the SIREN repository https://gith...
35.678363
115
0.631372
import torch from torch import nn from torchmeta.modules import (MetaModule, MetaSequential) import numpy as np from collections import OrderedDict import math import torch.nn.functional as F class BatchLinear(nn.Linear,MetaModule): __doc__ = nn.Linear.__doc__ def forward(self, input, params=None): ...
true
true
1c110e6262a70b083d63f3d6bfbbdc5d7d43da02
14,071
py
Python
Labs/lab10.py
jainam26/Applied-Crypto
11946adf92f49f6240ecfc804ae904d68a5ea27c
[ "MIT" ]
1
2020-05-01T17:08:12.000Z
2020-05-01T17:08:12.000Z
Labs/lab10.py
jainam26/Applied-Crypto
11946adf92f49f6240ecfc804ae904d68a5ea27c
[ "MIT" ]
null
null
null
Labs/lab10.py
jainam26/Applied-Crypto
11946adf92f49f6240ecfc804ae904d68a5ea27c
[ "MIT" ]
1
2020-02-28T23:47:33.000Z
2020-02-28T23:47:33.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################################## LAB 10 ############################################## """ List you collaborators here: No one Your task is to fill in the body of the functions below. The specification of each of the functions i...
49.027875
182
0.626253
import lab10_helper from Cryptodome.Hash import HMAC from Cryptodome.Hash import MD5,SHA1,SHA256,SHA512 from Cryptodome.Cipher import AES from Cryptodome.Util.strxor import strxor from math import ceil def q1_fb_onion_hash(password, salt1, salt2): md5Obj = MD5.new() md5Obj.update(password.encode...
true
true
1c110f7ce5c67ab14d4034b89ce631d4a909721f
421
py
Python
aoc2016/03.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
3
2019-12-04T01:22:34.000Z
2020-12-10T15:31:00.000Z
aoc2016/03.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
null
null
null
aoc2016/03.py
0x8b/HackerRank
45e1a0e2be68950505c0a75218715bd3132a428b
[ "MIT" ]
1
2019-12-04T01:24:01.000Z
2019-12-04T01:24:01.000Z
#!/usr/bin/env python import fileinput import numpy as np data = [] for line in fileinput.input(): data.append(list(map(int, line.strip().split()))) def count(data): triangles = 0 for a, b, c in data: if a + b > c and a + c > b and b + c > a: triangles += 1 return triangles ...
15.035714
53
0.584323
import fileinput import numpy as np data = [] for line in fileinput.input(): data.append(list(map(int, line.strip().split()))) def count(data): triangles = 0 for a, b, c in data: if a + b > c and a + c > b and b + c > a: triangles += 1 return triangles assert count(data) ==...
true
true
1c11101be4e20c789054be2e8e238063a837e88c
10,758
py
Python
hypersolvers-control/src/mpc/torchmpc.py
Juju-botu/diffeqml-research
aa796c87447e5299ec4f25a07fc4d032afb1f63e
[ "Apache-2.0" ]
null
null
null
hypersolvers-control/src/mpc/torchmpc.py
Juju-botu/diffeqml-research
aa796c87447e5299ec4f25a07fc4d032afb1f63e
[ "Apache-2.0" ]
null
null
null
hypersolvers-control/src/mpc/torchmpc.py
Juju-botu/diffeqml-research
aa796c87447e5299ec4f25a07fc4d032afb1f63e
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn class TorchMPC(nn.Module): def __init__(self, system, cost_function, t_span, opt, max_g_iters=100, eps_accept=0.01, lookahead_steps=100, lower_b...
45.974359
125
0.586633
import torch import torch.nn as nn class TorchMPC(nn.Module): def __init__(self, system, cost_function, t_span, opt, max_g_iters=100, eps_accept=0.01, lookahead_steps=100, lower_b...
true
true
1c11103b84c2bacf0c83020c6ab8c740e3d29da9
633
py
Python
src/data/665.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/665.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/665.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
n, q = map(int, input().split()) g = [[] for _ in range(n + 1)] for _ in range(n - 1): a, b = [int(x) for x in input().split()] g[a].append(b) g[b].append(a) from collections import deque def bfs(u): queue = deque([u]) d = [None] * (n + 1) # uからの距離の初期化 d[u] = 0 # 自分との距離は0 while queue: ...
19.181818
44
0.458136
n, q = map(int, input().split()) g = [[] for _ in range(n + 1)] for _ in range(n - 1): a, b = [int(x) for x in input().split()] g[a].append(b) g[b].append(a) from collections import deque def bfs(u): queue = deque([u]) d = [None] * (n + 1) d[u] = 0 while queue: v = queue.poplef...
true
true
1c1110d4c23234b6b63ac5254f92279ffa20e491
4,670
py
Python
django/realtimemonitor/client.py
haizaar/crossbar-examples
a3daffc0348565aa5e989433978dec2913242ea8
[ "Apache-2.0" ]
2
2020-11-05T21:59:58.000Z
2020-11-05T22:00:04.000Z
django/realtimemonitor/client.py
Weeshlow/crossbarexamples
e392ea2708f52ba322e63808041f9fe6dcfe893e
[ "Apache-2.0" ]
null
null
null
django/realtimemonitor/client.py
Weeshlow/crossbarexamples
e392ea2708f52ba322e63808041f9fe6dcfe893e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division import socket import requests import psutil from autobahn.twisted.wamp import Application from autobahn.twisted.util import sleep from twisted.internet.defer import inlineCallbacks def to_gib(bytes, factor=2**30, suffix="GiB"): """ Convert a number of by...
32.206897
115
0.601499
from __future__ import division import socket import requests import psutil from autobahn.twisted.wamp import Application from autobahn.twisted.util import sleep from twisted.internet.defer import inlineCallbacks def to_gib(bytes, factor=2**30, suffix="GiB"): return "%0.2f%s" % (bytes / factor, suffix) def g...
true
true
1c111180cf991b37c43fbbdf0f890256e3640dd3
6,208
py
Python
models/image_recognition/tensorflow/inceptionv4/inference/datasets.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
models/image_recognition/tensorflow/inceptionv4/inference/datasets.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
models/image_recognition/tensorflow/inceptionv4/inference/datasets.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 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 requ...
31.835897
81
0.671392
from abc import abstractmethod import os import numpy as np from six.moves import cPickle from six.moves import xrange import tensorflow as tf from tensorflow.python.platform import gfile import preprocessing IMAGENET_NUM_TRAIN_IMAGES = 1281167 IMAGENET_NUM_VAL_IMAGES = 50000 def create_data...
true
true
1c1111e037beb699f8d559e240dcbbb1191d64a1
176
py
Python
st3/mdpopups/version.py
sublimelsp/sublime-markdown-popups
7b5eece58c96a2b432c0932f12a87c82103c136f
[ "MIT" ]
null
null
null
st3/mdpopups/version.py
sublimelsp/sublime-markdown-popups
7b5eece58c96a2b432c0932f12a87c82103c136f
[ "MIT" ]
null
null
null
st3/mdpopups/version.py
sublimelsp/sublime-markdown-popups
7b5eece58c96a2b432c0932f12a87c82103c136f
[ "MIT" ]
1
2022-03-15T08:00:39.000Z
2022-03-15T08:00:39.000Z
"""Version.""" _version_info = (4, 0, 0) __version__ = '.'.join([str(x) for x in _version_info]) def version(): """Get the current version.""" return _version_info
16
55
0.625
_version_info = (4, 0, 0) __version__ = '.'.join([str(x) for x in _version_info]) def version(): return _version_info
true
true
1c1112bb20da08ba82c64182785b365bf504b836
9,005
py
Python
tests/test_workspace.py
JBBalling/core
b9977a28118d33e40656f5ea95e819d8cc496f32
[ "Apache-2.0" ]
null
null
null
tests/test_workspace.py
JBBalling/core
b9977a28118d33e40656f5ea95e819d8cc496f32
[ "Apache-2.0" ]
null
null
null
tests/test_workspace.py
JBBalling/core
b9977a28118d33e40656f5ea95e819d8cc496f32
[ "Apache-2.0" ]
null
null
null
from os import walk from os.path import join, exists, abspath, basename, dirname from tempfile import TemporaryDirectory, mkdtemp from shutil import copyfile from pathlib import Path from tests.base import TestCase, assets, main, copy_of_directory from ocrd.resolver import Resolver from ocrd.workspace import Workspac...
44.142157
115
0.63276
from os import walk from os.path import join, exists, abspath, basename, dirname from tempfile import TemporaryDirectory, mkdtemp from shutil import copyfile from pathlib import Path from tests.base import TestCase, assets, main, copy_of_directory from ocrd.resolver import Resolver from ocrd.workspace import Workspac...
true
true
1c1112e45a9cf7584bc7112b18dc83a387bdc548
3,152
py
Python
shelter/web/models/__init__.py
cedricbonhomme/shelter-database
ca5a4b0e13676879df2b1ebcc190498a8b9b6c21
[ "MIT" ]
1
2016-10-27T05:06:06.000Z
2016-10-27T05:06:06.000Z
shelter/web/models/__init__.py
cedricbonhomme/shelter-database
ca5a4b0e13676879df2b1ebcc190498a8b9b6c21
[ "MIT" ]
null
null
null
shelter/web/models/__init__.py
cedricbonhomme/shelter-database
ca5a4b0e13676879df2b1ebcc190498a8b9b6c21
[ "MIT" ]
3
2016-08-19T19:49:17.000Z
2016-10-27T05:06:29.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # ***** BEGIN LICENSE BLOCK ***** # This file is part of Shelter Database. # Copyright (c) 2016 Luxembourg Institute of Science and Technology. # All rights reserved. # # # # ***** END LICENSE BLOCK ***** __author__ = "Cedric Bonhomme" __version__ = "$Revision: 0.1 $" __...
22.84058
74
0.644353
__author__ = "Cedric Bonhomme" __version__ = "$Revision: 0.1 $" __date__ = "$Date: 2016/03/30 $" __revision__ = "$Date: 2016/06/21 $" __copyright__ = "Copyright (c) " __license__ = "" from .user import User from .property import Property, Association from .value import Value from .shelter import Shelter from .secti...
true
true
1c1112f80dc8efef745d679c803a6570afcc8f64
8,132
py
Python
src/python/WMCore/WMSpec/Steps/Executors/AlcaHarvest.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
src/python/WMCore/WMSpec/Steps/Executors/AlcaHarvest.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
src/python/WMCore/WMSpec/Steps/Executors/AlcaHarvest.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ _Step.Executor.AlcaHarvest_ Implementation of an Executor for a AlcaHarvest step """ from __future__ import print_function import logging import os import shutil import stat import subprocess from Utils.Utilities import rootUrlJoin from WMCore.FwkJobReport.Report import Report from WMCore....
39.285024
148
0.541072
from __future__ import print_function import logging import os import shutil import stat import subprocess from Utils.Utilities import rootUrlJoin from WMCore.FwkJobReport.Report import Report from WMCore.Services.UUIDLib import makeUUID from WMCore.WMSpec.Steps.Executor import Executor from WMCore.WMSpec.Steps.WMExe...
true
true
1c11131da64853bfa32dae31df639268cd438800
43,378
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/crypto/plugins/module_utils/crypto/module_backends/csr.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/crypto/plugins/module_utils/crypto/module_backends/csr.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/crypto/plugins/module_utils/crypto/module_backends/csr.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright: (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # Copyright: (c) 2020, Felix Fontein <felix@fontein.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ ...
49.974654
159
0.652704
from __future__ import absolute_import, division, print_function __metaclass__ = type import abc import binascii import traceback from distutils.version import LooseVersion from ansible.module_utils import six from ansible.module_utils.basic import missing_required_lib from ansible.module_utils.common.text.convert...
true
true
1c1113e0808c334b99e3fcad9de0fb51ccb42e56
126,511
py
Python
scipy/stats/_distn_infrastructure.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
null
null
null
scipy/stats/_distn_infrastructure.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
null
null
null
scipy/stats/_distn_infrastructure.py
smola/scipy
ff8b9d9e87a585a820846d7f459d6156ba621c4d
[ "BSD-3-Clause" ]
null
null
null
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy._lib._util import getargspec_no_self as _getargspec import sys import keyword import re import types import warnings from itertools import...
34.899586
115
0.568883
from __future__ import division, print_function, absolute_import from scipy._lib._util import getargspec_no_self as _getargspec import sys import keyword import re import types import warnings from itertools import zip_longest from scipy._lib import doccer from ._distr_params import distcont, distdiscrete from scipy...
true
true
1c111527f882aaeff55ff05ac39d17d6b661a96a
552
py
Python
rebus/agents/ls_uuids.py
dev-pro-jma/rebus
b880e67ad9cd4ec6be316ca7697a7077ea1b5f17
[ "BSD-2-Clause" ]
25
2017-02-20T13:00:07.000Z
2021-04-27T21:22:02.000Z
rebus/agents/ls_uuids.py
dev-pro-jma/rebus
b880e67ad9cd4ec6be316ca7697a7077ea1b5f17
[ "BSD-2-Clause" ]
null
null
null
rebus/agents/ls_uuids.py
dev-pro-jma/rebus
b880e67ad9cd4ec6be316ca7697a7077ea1b5f17
[ "BSD-2-Clause" ]
7
2017-03-07T13:54:17.000Z
2022-01-18T07:05:39.000Z
from rebus.agent import Agent @Agent.register class Ls(Agent): _name_ = "ls_uuid" _desc_ = "List existing UUIDs and their labels" _operationmodes_ = ('automatic', ) @classmethod def add_arguments(cls, subparser): subparser.add_argument("--domain", help="Descriptor domain", ...
27.6
68
0.603261
from rebus.agent import Agent @Agent.register class Ls(Agent): _name_ = "ls_uuid" _desc_ = "List existing UUIDs and their labels" _operationmodes_ = ('automatic', ) @classmethod def add_arguments(cls, subparser): subparser.add_argument("--domain", help="Descriptor domain", ...
false
true
1c11152d778de253e5430a5643fc2c63c61f0cb1
11,441
py
Python
tools/scons/scons-local-2.2.0/SCons/Variables/__init__.py
tristanpenman/gameutils
d4695922c6a8ba201a67fc8e5319da53e0d25323
[ "BSD-2-Clause" ]
null
null
null
tools/scons/scons-local-2.2.0/SCons/Variables/__init__.py
tristanpenman/gameutils
d4695922c6a8ba201a67fc8e5319da53e0d25323
[ "BSD-2-Clause" ]
null
null
null
tools/scons/scons-local-2.2.0/SCons/Variables/__init__.py
tristanpenman/gameutils
d4695922c6a8ba201a67fc8e5319da53e0d25323
[ "BSD-2-Clause" ]
null
null
null
"""engine.SCons.Variables This file defines the Variables class that is used to add user-friendly customizable variables to an SCons build. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to an...
36.552716
111
0.547417
"""engine.SCons.Variables This file defines the Variables class that is used to add user-friendly customizable variables to an SCons build. """ __revision__ = "src/engine/SCons/Variables/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import sys import SCons.Environme...
false
true
1c11153a00218b4a4c170bb590d5ffbbbff098ad
4,806
py
Python
lib/mpdaf/sdetect/tests/test_segmap.py
jzabl/mpdaf
806baab8b793ba1cdbde4ce9ea13116f8ca327ee
[ "BSD-3-Clause" ]
null
null
null
lib/mpdaf/sdetect/tests/test_segmap.py
jzabl/mpdaf
806baab8b793ba1cdbde4ce9ea13116f8ca327ee
[ "BSD-3-Clause" ]
null
null
null
lib/mpdaf/sdetect/tests/test_segmap.py
jzabl/mpdaf
806baab8b793ba1cdbde4ce9ea13116f8ca327ee
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon Copyright (c) 2019 Simon Conseil <simon.conseil@univ-lyon1.fr> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redis...
39.393443
79
0.718061
import numpy as np import pytest from astropy.io import fits from glob import glob from mpdaf.obj import Image from mpdaf.sdetect import Segmap, create_masks_from_segmap from mpdaf.tests.utils import get_data_file from numpy.testing import assert_array_equal try: import joblib except ImportError: HAS_JOBLIB ...
true
true
1c111607dae46c978614b28f3152d4aa4beff360
6,957
py
Python
django_q/conf.py
Solanar/django-q
5e5676292b1df83c78fe224a67d212850dfaf8a9
[ "MIT" ]
null
null
null
django_q/conf.py
Solanar/django-q
5e5676292b1df83c78fe224a67d212850dfaf8a9
[ "MIT" ]
null
null
null
django_q/conf.py
Solanar/django-q
5e5676292b1df83c78fe224a67d212850dfaf8a9
[ "MIT" ]
1
2020-08-11T21:18:10.000Z
2020-08-11T21:18:10.000Z
import logging from copy import deepcopy from signal import signal from multiprocessing import cpu_count # django from django.utils.translation import gettext_lazy as _ from django.conf import settings # external import os import pkg_resources # local from django_q.queues import Queue # optional try: import psu...
30.247826
115
0.663936
import logging from copy import deepcopy from signal import signal from multiprocessing import cpu_count from django.utils.translation import gettext_lazy as _ from django.conf import settings import os import pkg_resources from django_q.queues import Queue try: import psutil except ImportError: psutil = No...
true
true
1c11160c93919be766a925991e99bafed9f6a577
85
py
Python
src/Mojang/__init__.py
Hades1232/mojang_python
cc687a62791c6a09ba3d1024959f14d4123ec112
[ "Apache-2.0" ]
5
2022-03-06T02:16:42.000Z
2022-03-08T07:22:38.000Z
src/Mojang/__init__.py
Hades1232/mojang_python
cc687a62791c6a09ba3d1024959f14d4123ec112
[ "Apache-2.0" ]
null
null
null
src/Mojang/__init__.py
Hades1232/mojang_python
cc687a62791c6a09ba3d1024959f14d4123ec112
[ "Apache-2.0" ]
null
null
null
from .account import userSetting from .info import userInfo __version__ = "0.1.1"
12.142857
32
0.752941
from .account import userSetting from .info import userInfo __version__ = "0.1.1"
true
true
1c1118bc97872e5beba2d138e397e3748c61ed8c
3,602
py
Python
audiomate/corpus/validation/label_list.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
audiomate/corpus/validation/label_list.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
audiomate/corpus/validation/label_list.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
from audiomate import corpus from . import base class UtteranceTranscriptionRatioValidator(base.Validator): """ Checks if the ratio between utterance-duration and transcription-length is below a given ratio. This is used to find utterances where the speech transcription is to long for a given utterance, ...
35.663366
110
0.655469
from audiomate import corpus from . import base class UtteranceTranscriptionRatioValidator(base.Validator): def __init__(self, max_characters_per_second=10, label_list_idx=corpus.LL_WORD_TRANSCRIPT): self.max_characters_per_second = max_characters_per_second self.label_list_idx = label_list_idx ...
true
true
1c111b0e7b2227a1adebe92b696be2fa844cdadb
1,012
py
Python
tests/data/expected/parser/openapi/openapi_parser_parse_allof/output.py
languitar/datamodel-code-generator
ddd909746a66df5c8268d782f3ae24bee636be92
[ "MIT" ]
null
null
null
tests/data/expected/parser/openapi/openapi_parser_parse_allof/output.py
languitar/datamodel-code-generator
ddd909746a66df5c8268d782f3ae24bee636be92
[ "MIT" ]
null
null
null
tests/data/expected/parser/openapi/openapi_parser_parse_allof/output.py
languitar/datamodel-code-generator
ddd909746a66df5c8268d782f3ae24bee636be92
[ "MIT" ]
1
2020-09-24T09:09:15.000Z
2020-09-24T09:09:15.000Z
from __future__ import annotations from datetime import date, datetime from typing import List, Optional from pydantic import BaseModel, conint class Pet(BaseModel): id: int name: str tag: Optional[str] = None class Car(BaseModel): number: str class AllOfref(Pet, Car): pass class AllOfobj(...
16.590164
43
0.701581
from __future__ import annotations from datetime import date, datetime from typing import List, Optional from pydantic import BaseModel, conint class Pet(BaseModel): id: int name: str tag: Optional[str] = None class Car(BaseModel): number: str class AllOfref(Pet, Car): pass class AllOfobj(...
true
true
1c111bcfc3e5b0d41653f1a3565e6c16bd8c9dc3
6,734
py
Python
best_scores.py
nlindqv/pytorch_RVAE
d9e58134965f69aad557fb3bd2478500a51210f8
[ "MIT" ]
null
null
null
best_scores.py
nlindqv/pytorch_RVAE
d9e58134965f69aad557fb3bd2478500a51210f8
[ "MIT" ]
null
null
null
best_scores.py
nlindqv/pytorch_RVAE
d9e58134965f69aad557fb3bd2478500a51210f8
[ "MIT" ]
null
null
null
import argparse, re import os, os.path, subprocess from subprocess import * from nlgeval import NLGEval import numpy as np import torch as t from torch.optim import Adam from sample import sample_with_input, sample_with_beam from utils.batch_loader import BatchLoader from model.paraphraser import Paraphras...
42.0875
162
0.597713
import argparse, re import os, os.path, subprocess from subprocess import * from nlgeval import NLGEval import numpy as np import torch as t from torch.optim import Adam from sample import sample_with_input, sample_with_beam from utils.batch_loader import BatchLoader from model.paraphraser import Paraphras...
true
true
1c111bf82244872d3e4cf655264e3e087ff29372
39,402
py
Python
examples/sparse_gnmt/gnmt/model.py
stevesolun/nlp-architect-1
d2c1ea15ce20517af52d32ac87e5ccd009b4a620
[ "Apache-2.0" ]
null
null
null
examples/sparse_gnmt/gnmt/model.py
stevesolun/nlp-architect-1
d2c1ea15ce20517af52d32ac87e5ccd009b4a620
[ "Apache-2.0" ]
null
null
null
examples/sparse_gnmt/gnmt/model.py
stevesolun/nlp-architect-1
d2c1ea15ce20517af52d32ac87e5ccd009b4a620
[ "Apache-2.0" ]
1
2020-09-30T17:29:26.000Z
2020-09-30T17:29:26.000Z
# ****************************************************************************** # Copyright 2017-2018 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.apa...
39.8
99
0.603853
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import tensorflow as tf from tensorflow.contrib.model_pruning import get_masks, get_thresholds from tensorflow.contrib.model_pruning.python import pruning from tensorflow.contrib....
true
true
1c111c362773e584af123fe1e360d7b3448caefc
368
py
Python
autolens/pipeline/phase/positions/result.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
autolens/pipeline/phase/positions/result.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
autolens/pipeline/phase/positions/result.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
from autoconf import conf import autoarray as aa import numpy as np from autogalaxy.galaxy import galaxy as g from autolens.pipeline.phase import dataset class Result(dataset.Result): @property def max_log_likelihood_fit(self): return self.analysis.positions_fit_for_tracer( tr...
24.533333
55
0.725543
from autoconf import conf import autoarray as aa import numpy as np from autogalaxy.galaxy import galaxy as g from autolens.pipeline.phase import dataset class Result(dataset.Result): @property def max_log_likelihood_fit(self): return self.analysis.positions_fit_for_tracer( tr...
true
true
1c111c5aa7ed38d02d9dec9533ba00d530ecbe78
1,200
py
Python
cfd_trading/core/order.py
vitrvm/cfd_trading
d0880a12c805d150df6058764c153712da177b3a
[ "MIT" ]
2
2021-04-20T16:37:55.000Z
2021-08-09T10:27:43.000Z
cfd_trading/core/order.py
vitrvm/cfd_trading
d0880a12c805d150df6058764c153712da177b3a
[ "MIT" ]
null
null
null
cfd_trading/core/order.py
vitrvm/cfd_trading
d0880a12c805d150df6058764c153712da177b3a
[ "MIT" ]
1
2021-07-11T22:51:37.000Z
2021-07-11T22:51:37.000Z
from typing import Type class Order(object): class Action: BUY = 0 SELL = 1 class Type: MARKET = 'MARKET' LIMIT = 'LIMIT' STOP = 'STOP' __id = None __action = None __symbol = None __type = None __level = None __stop_distance = None __st...
17.142857
85
0.5925
from typing import Type class Order(object): class Action: BUY = 0 SELL = 1 class Type: MARKET = 'MARKET' LIMIT = 'LIMIT' STOP = 'STOP' __id = None __action = None __symbol = None __type = None __level = None __stop_distance = None __st...
true
true
1c111dc2aaa17bd07f305747f911859377a22e5d
3,628
py
Python
Coding Problem 3.5.7.py
opalqnka/CS1301xII
bba9cf34a7f6f0d1e0d90a73b933f3a90bdb825e
[ "MIT" ]
null
null
null
Coding Problem 3.5.7.py
opalqnka/CS1301xII
bba9cf34a7f6f0d1e0d90a73b933f3a90bdb825e
[ "MIT" ]
null
null
null
Coding Problem 3.5.7.py
opalqnka/CS1301xII
bba9cf34a7f6f0d1e0d90a73b933f3a90bdb825e
[ "MIT" ]
1
2020-07-16T06:56:22.000Z
2020-07-16T06:56:22.000Z
#This will be the largest, most authentic program you've #written so far. It will require everything you've learned #and should take some time to test and debug. Be patient, #you can do it! # #Write a function called average_word_length that takes as #input a string called my_string, and returns as output the #average ...
34.226415
92
0.649945
#written so far. It will require everything you've learned # you can if you want. # - There are lots of ways you can do this. If you're # separately, and worrying about average length only # after both have been counted. # - The word count should equal the number of letters that # come immediately after a space...
true
true
1c111dc46d428f287481c72b4aed37d145071458
5,731
py
Python
chapter_14/PyMailGui.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_14/PyMailGui.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_14/PyMailGui.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
"PyMailGUI: The Main Module" ''' Defines the file run to start PyMailGUI. It implements top-level list windows in the system—combinations of PyMailGUI’s application logic and the window protocol superclasses. The latter of these define window titles, icons, and close behavior. ''' """ ################################...
41.832117
82
0.68557
import mailconfig, sys from SharedNames import appname, windows from ListWindows import PyMailServer, PyMailFile srvrname = mailconfig.popservername or 'Server' class PyMailServerWindow(PyMailServer, windows.MainWindow): def __init__(self): windows.MainWindow.__init__(self, appname, srvrname) ...
true
true
1c111eefc91daf11abb36504cea9c631f3f9ca14
108
py
Python
src/interface_py/h2o4gpu/libs/__init__.py
pnijhara/h2o4gpu
6257112c134136471420b68241f57190a445b67d
[ "Apache-2.0" ]
458
2017-09-20T08:32:10.000Z
2022-02-28T18:40:57.000Z
src/interface_py/h2o4gpu/libs/__init__.py
Jun-NIBS/h2o4gpu
9885416deb3285f5d0f33023d6c07373ac4fc0b7
[ "Apache-2.0" ]
461
2017-09-20T11:39:04.000Z
2021-11-21T15:51:42.000Z
src/interface_py/h2o4gpu/libs/__init__.py
Jun-NIBS/h2o4gpu
9885416deb3285f5d0f33023d6c07373ac4fc0b7
[ "Apache-2.0" ]
114
2017-09-20T12:08:07.000Z
2021-11-29T14:15:40.000Z
""" :copyright: 2017-2018 H2O.ai, Inc. :license: Apache License Version 2.0 (see LICENSE for details) """
21.6
64
0.685185
true
true
1c111f7eb665285a078ab4f31404b4b1ad1cfa15
1,179
py
Python
static_scene_generator/make_mp4.py
NanboLi/CLEVR-Object-Centric
7c5dbaa2f4d1320205a2914aafa24f95a804b084
[ "MIT" ]
4
2022-03-29T22:49:17.000Z
2022-03-30T10:59:19.000Z
static_scene_generator/make_mp4.py
NanboLi/CLEVR-MultiView
7c5dbaa2f4d1320205a2914aafa24f95a804b084
[ "MIT" ]
null
null
null
static_scene_generator/make_mp4.py
NanboLi/CLEVR-MultiView
7c5dbaa2f4d1320205a2914aafa24f95a804b084
[ "MIT" ]
null
null
null
import os import argparse import imageio from natsort import natsorted def make_video(args): file_list = [] for file in natsorted(os.listdir(args.source_dir)): if file.startswith(args.prefix) and 'png' in file: complete_path = os.path.join(args.source_dir, file) file_list.appen...
30.230769
100
0.649703
import os import argparse import imageio from natsort import natsorted def make_video(args): file_list = [] for file in natsorted(os.listdir(args.source_dir)): if file.startswith(args.prefix) and 'png' in file: complete_path = os.path.join(args.source_dir, file) file_list.appen...
true
true
1c112025b068b396001a5f7079ab41d09efb567c
5,099
bzl
Python
src/main/starlark/builtins_bzl/common/cc/cc_test.bzl
parampavar/bazel
df96163124d220a04abde24f8302e77349ae5194
[ "Apache-2.0" ]
null
null
null
src/main/starlark/builtins_bzl/common/cc/cc_test.bzl
parampavar/bazel
df96163124d220a04abde24f8302e77349ae5194
[ "Apache-2.0" ]
null
null
null
src/main/starlark/builtins_bzl/common/cc/cc_test.bzl
parampavar/bazel
df96163124d220a04abde24f8302e77349ae5194
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.924658
80
0.686605
load(":common/cc/cc_binary.bzl", "cc_binary_impl") load(":common/paths.bzl", "paths") load(":common/cc/cc_binary_attrs.bzl", "cc_binary_attrs_with_aspects") load(":common/cc/cc_helper.bzl", "cc_helper") load(":common/cc/semantics.bzl", "semantics") cc_internal = _builtins.internal.cc_internal platform_common = _bui...
true
true
1c11213d211c0e7f5e5304abb554aec80fe186c9
7,248
py
Python
tests/neptune/new/client/test_run.py
neptune-ml/neptune-client
7aea63160b5149c3fec40f62d3b0da7381a35748
[ "Apache-2.0" ]
13
2019-02-11T13:18:38.000Z
2019-12-26T06:26:07.000Z
tests/neptune/new/client/test_run.py
neptune-ml/neptune-client
7aea63160b5149c3fec40f62d3b0da7381a35748
[ "Apache-2.0" ]
39
2019-03-07T13:40:10.000Z
2020-01-07T17:19:24.000Z
tests/neptune/new/client/test_run.py
neptune-ml/neptune-client
7aea63160b5149c3fec40f62d3b0da7381a35748
[ "Apache-2.0" ]
4
2019-02-11T13:07:23.000Z
2019-11-26T08:20:24.000Z
# # Copyright (c) 2022, Neptune Labs Sp. z o.o. # # 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 agr...
41.655172
103
0.685292
import os import unittest from mock import patch from neptune.new import ANONYMOUS, Run, get_last_run, init_run from neptune.new.attributes.atoms import String from neptune.new.envs import API_TOKEN_ENV_NAME, PROJECT_ENV_NAME from neptune.new.exceptions import MissingFieldException, NeptuneUninitializedException fro...
true
true
1c11215016ceb85a677158f565ff7a2a34ed35b6
244
py
Python
dmb/data/datasets/stereo/__init__.py
jiaw-z/DenseMatchingBenchmark
177c56ca1952f54d28e6073afa2c16981113a2af
[ "MIT" ]
160
2019-11-16T13:59:21.000Z
2022-03-28T07:52:59.000Z
dmb/data/datasets/stereo/__init__.py
jiaw-z/DenseMatchingBenchmark
177c56ca1952f54d28e6073afa2c16981113a2af
[ "MIT" ]
22
2019-11-22T02:14:18.000Z
2022-01-24T10:16:14.000Z
dmb/data/datasets/stereo/__init__.py
jiaw-z/DenseMatchingBenchmark
177c56ca1952f54d28e6073afa2c16981113a2af
[ "MIT" ]
38
2019-12-27T14:01:01.000Z
2022-03-12T11:40:11.000Z
from .scene_flow import SceneFlowDataset from .kitti import Kitti2012Dataset, Kitti2015Dataset from .builder import build_stereo_dataset __all__ = [ "build_stereo_dataset", "SceneFlowDataset", "Kitti2015Dataset", "Kitti2012Dataset" ]
24.4
53
0.79918
from .scene_flow import SceneFlowDataset from .kitti import Kitti2012Dataset, Kitti2015Dataset from .builder import build_stereo_dataset __all__ = [ "build_stereo_dataset", "SceneFlowDataset", "Kitti2015Dataset", "Kitti2012Dataset" ]
true
true
1c1121c7bd3d10c0f6e48c589bb1178641ad6b21
1,903
py
Python
2016/day13.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
6
2021-12-05T11:21:17.000Z
2021-12-07T03:04:24.000Z
2016/day13.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
null
null
null
2016/day13.py
tcbegley/advent-of-code
e293d06e9cd994b26c0d10619672a6d8d2d65377
[ "MIT" ]
null
null
null
import heapq import sys from collections import deque from functools import cache def load_data(path): with open(path) as f: return int(f.read().strip()) def count_bits(n): count = 0 while n: count += n & 1 n >>= 1 return count @cache def is_open(x, y, n): return count_...
21.625
73
0.522333
import heapq import sys from collections import deque from functools import cache def load_data(path): with open(path) as f: return int(f.read().strip()) def count_bits(n): count = 0 while n: count += n & 1 n >>= 1 return count @cache def is_open(x, y, n): return count_...
true
true
1c11224c0827da8668cfade02fbd90bcd947326e
1,980
py
Python
alphaPredict/alpha.py
ryanemenecker/alphaPredict
9a695bee41b435300bcc0ec5dbe063072a45fb6a
[ "MIT" ]
1
2021-09-29T21:38:27.000Z
2021-09-29T21:38:27.000Z
alphaPredict/alpha.py
ryanemenecker/alphaPredict
9a695bee41b435300bcc0ec5dbe063072a45fb6a
[ "MIT" ]
null
null
null
alphaPredict/alpha.py
ryanemenecker/alphaPredict
9a695bee41b435300bcc0ec5dbe063072a45fb6a
[ "MIT" ]
null
null
null
## ## alpha.py ## ## alpha.py contains all the user-facing function associated with alphaPredict. ## If a new function is added it should be included ## here and added to the __all__ list ## ##Handles the primary functions __all__ = ['predict', 'graph'] import os import sys # note - we imort packages below wi...
26.756757
92
0.70404
__all__ = ['predict', 'graph'] import os import sys import protfasta as _protfasta from alphaPredict.backend.parrot_alpha import alpha_predict as _alpha_predict from alphaPredict.backend import alpha_tools as _alpha_tools from alphaPredict.backend.alpha_graph import graph as _graph from alphaPredict.alpha_exce...
true
true
1c112341e7ca9b20b221f8862a0e4402d7253424
466
py
Python
oauthlib/oauth2/rfc6749/__init__.py
mgorny/oauthlib
b71636e85f845b79b5a56de6480fcba9d1415720
[ "BSD-3-Clause" ]
null
null
null
oauthlib/oauth2/rfc6749/__init__.py
mgorny/oauthlib
b71636e85f845b79b5a56de6480fcba9d1415720
[ "BSD-3-Clause" ]
null
null
null
oauthlib/oauth2/rfc6749/__init__.py
mgorny/oauthlib
b71636e85f845b79b5a56de6480fcba9d1415720
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ import functools import logging from .endpoints.base import BaseEndpoint from .endpoints.base import catch_errors_and_unavailability f...
24.526316
60
0.76824
import functools import logging from .endpoints.base import BaseEndpoint from .endpoints.base import catch_errors_and_unavailability from .errors import TemporarilyUnavailableError, ServerError from .errors import FatalClientError, OAuth2Error log = logging.getLogger(__name__)
true
true
1c112374ce9b433ca1eb4d0f33cdb59b5c38f500
298
py
Python
app.py
L3h4/NAUTelegramBot
5eea900469964cee6131447a38b994659f33ea7b
[ "MIT" ]
null
null
null
app.py
L3h4/NAUTelegramBot
5eea900469964cee6131447a38b994659f33ea7b
[ "MIT" ]
null
null
null
app.py
L3h4/NAUTelegramBot
5eea900469964cee6131447a38b994659f33ea7b
[ "MIT" ]
null
null
null
from loader import bot, logger from Bot.handlers import start from Bot.middleware import middleware @logger.catch def main(): logger.add('logs/debug.log', format = '{time} {level} {message}', rotation = '100 KB', compression = 'zip') bot.polling(True) if __name__ == "__main__": main()
18.625
109
0.697987
from loader import bot, logger from Bot.handlers import start from Bot.middleware import middleware @logger.catch def main(): logger.add('logs/debug.log', format = '{time} {level} {message}', rotation = '100 KB', compression = 'zip') bot.polling(True) if __name__ == "__main__": main()
true
true
1c11239231c739ef7dbcc786f09789c1b96fa35b
2,525
py
Python
test/test_project/settings.py
jaap3/django-otp
d7980bf516018319158570cc75353c905375a3ab
[ "BSD-2-Clause" ]
318
2019-08-27T15:57:05.000Z
2022-03-30T08:38:29.000Z
test/test_project/settings.py
jaap3/django-otp
d7980bf516018319158570cc75353c905375a3ab
[ "BSD-2-Clause" ]
77
2019-09-17T11:48:38.000Z
2022-03-13T17:26:56.000Z
test/test_project/settings.py
jaap3/django-otp
d7980bf516018319158570cc75353c905375a3ab
[ "BSD-2-Clause" ]
76
2019-08-30T20:29:40.000Z
2022-03-30T09:14:36.000Z
# django-otp test project import os from os.path import abspath, dirname, join from django.core.exceptions import ImproperlyConfigured def project_path(path): return abspath(join(dirname(__file__), path)) DEBUG = True backend = os.getenv('DB_BACKEND', 'sqlite3') if backend == 'sqlite3': DATABASES = { ...
26.861702
87
0.665743
import os from os.path import abspath, dirname, join from django.core.exceptions import ImproperlyConfigured def project_path(path): return abspath(join(dirname(__file__), path)) DEBUG = True backend = os.getenv('DB_BACKEND', 'sqlite3') if backend == 'sqlite3': DATABASES = { 'default': { ...
true
true
1c112426a8f87e561fe8ac4f89db741b5f8e2bbd
193
py
Python
autogp/losses/__init__.py
axdahl/Grouped-GPs
9a6ffb2fdcda15563cc508fb9bccd98d778e8456
[ "Apache-2.0" ]
null
null
null
autogp/losses/__init__.py
axdahl/Grouped-GPs
9a6ffb2fdcda15563cc508fb9bccd98d778e8456
[ "Apache-2.0" ]
null
null
null
autogp/losses/__init__.py
axdahl/Grouped-GPs
9a6ffb2fdcda15563cc508fb9bccd98d778e8456
[ "Apache-2.0" ]
null
null
null
from .loss import Loss from .zero_one_loss import ZeroOneLoss from .mean_sq_error import RootMeanSqError from .mean_abs_error import MeanAbsError from .neg_log_predlik import NegLogPredDensity
32.166667
46
0.870466
from .loss import Loss from .zero_one_loss import ZeroOneLoss from .mean_sq_error import RootMeanSqError from .mean_abs_error import MeanAbsError from .neg_log_predlik import NegLogPredDensity
true
true
1c1124951ab6d7e095b178672612ffadbe66a224
17,531
py
Python
modules/xia2/Wrappers/XIA/Chef.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/xia2/Wrappers/XIA/Chef.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/xia2/Wrappers/XIA/Chef.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
#!/usr/bin/env python # Chef.py # Copyright (C) 2008 CCLRC, Graeme Winter # # This code is distributed under the BSD license, a copy of which is # included in the root directory of this package. # # 5th February 2008 # # A wrapper for the new program "chef". This has been developed for xia2 # to analyse the bulk ...
29.41443
81
0.505961
from __future__ import absolute_import, division, print_function import math import sys from xia2.Decorators.DecoratorFactory import DecoratorFactory from xia2.Driver.DriverFactory import DriverFactory from xia2.Experts.WedgeExpert import digest_wedges from xia2.Handlers.Streams import Chatter, Stdout from xia2.lib....
true
true
1c1128562ebb44e59d9d1adf663876f316195bf9
453
py
Python
opencv_learn/charpter04/demo_04.13.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter04/demo_04.13.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter04/demo_04.13.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
import cv2 img = cv2.imread(r"..\lena.jpg") bgra = cv2.cvtColor(img, cv2.COLOR_BGR2BGRA) b, g, r, a = cv2.split(bgra) a[:, :] = 125 bgra125 = cv2.merge([b, g, r, a]) a[:, :] = 0 bgra0 = cv2.merge([b, g, r, a]) cv2.imshow("img", img) cv2.imshow("bgra", bgra) cv2.imshow("bgra125", bgra125) cv2.imshow("bgra0", bgra0) cv2...
23.842105
44
0.655629
import cv2 img = cv2.imread(r"..\lena.jpg") bgra = cv2.cvtColor(img, cv2.COLOR_BGR2BGRA) b, g, r, a = cv2.split(bgra) a[:, :] = 125 bgra125 = cv2.merge([b, g, r, a]) a[:, :] = 0 bgra0 = cv2.merge([b, g, r, a]) cv2.imshow("img", img) cv2.imshow("bgra", bgra) cv2.imshow("bgra125", bgra125) cv2.imshow("bgra0", bgra0) cv2...
true
true
1c1128591bb2f0de233e14f57ddbab361fffa10f
18,211
py
Python
datasets_EXT/vk_dataset.py
CVC-TDA-ADRE/MonoDEVSNet
25e2f7cd28909f933eb2f8dd7db9046dc7237635
[ "MIT" ]
null
null
null
datasets_EXT/vk_dataset.py
CVC-TDA-ADRE/MonoDEVSNet
25e2f7cd28909f933eb2f8dd7db9046dc7237635
[ "MIT" ]
null
null
null
datasets_EXT/vk_dataset.py
CVC-TDA-ADRE/MonoDEVSNet
25e2f7cd28909f933eb2f8dd7db9046dc7237635
[ "MIT" ]
null
null
null
# Author: Akhil Gurram # Build on top of the monodepth2 # (Automatically pulled from git repo, monodepth2 source code is not included in this repository) # This is the training script of the MonoDEVSNet framework. # MonoDEVSNet: Monocular Depth Estimation through Virtual-world Supervision and Real-world SfM Self-Superv...
40.923596
119
0.554445
from __future__ import absolute_import, division, print_function import os import random from abc import ABC import kornia import numpy as np import pandas as pd import torch import torch.utils.data as data from PIL import Image from torch.nn import functional as F from torchvision import transforms from monodepth...
true
true
1c1128ff6655c591ab480a66420b22ddf961b5bc
145
py
Python
6 kyu/Vasya and Stairs.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
6
2020-09-03T09:32:25.000Z
2020-12-07T04:10:01.000Z
6 kyu/Vasya and Stairs.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
1
2021-12-13T15:30:21.000Z
2021-12-13T15:30:21.000Z
6 kyu/Vasya and Stairs.py
mwk0408/codewars_solutions
9b4f502b5f159e68024d494e19a96a226acad5e5
[ "MIT" ]
null
null
null
def numberOfSteps(steps, m): if m>steps: return -1 print(steps, m) return m*(steps//2//m+1) if steps/2%m else m*(steps//2//m)
29
62
0.57931
def numberOfSteps(steps, m): if m>steps: return -1 print(steps, m) return m*(steps//2//m+1) if steps/2%m else m*(steps//2//m)
true
true
1c112c7b990440cbc78bc3e5559f748ec1b4dd21
8,679
py
Python
tools/cbmc/proofs/make_common_makefile.py
ictk-solution-dev/amazon-freertos
cc76512292ddfb70bba3030dbcb740ef3c6ead8b
[ "MIT" ]
2
2020-06-23T08:05:58.000Z
2020-06-24T01:25:51.000Z
tools/cbmc/proofs/make_common_makefile.py
LibreWireless/amazon-freertos-uno
2ddb5c0ac906e4ab5340062641776f44e0f1d67d
[ "MIT" ]
2
2022-03-29T05:16:50.000Z
2022-03-29T05:16:50.000Z
tools/cbmc/proofs/make_common_makefile.py
ictk-solution-dev/amazon-freertos
cc76512292ddfb70bba3030dbcb740ef3c6ead8b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Generation of common Makefile for CBMC proofs. # # Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to de...
36.012448
85
0.556861
from pprint import pprint import json import sys import re import os import argparse def cleanup_whitespace(string): return re.sub('\s+', ' ', string.strip()) platform_definitions = { "linux": { "platform": "linux", "separator": "/", "define": "-D", "include"...
true
true
1c112cbf68e6c4d3cfed8a7b98527a23967222cb
42,927
py
Python
__init__.py
NeonDaniel/skill-weather
b7a4984b457bb9a800de4ec1aa2d5265d540a9b7
[ "Apache-2.0" ]
null
null
null
__init__.py
NeonDaniel/skill-weather
b7a4984b457bb9a800de4ec1aa2d5265d540a9b7
[ "Apache-2.0" ]
null
null
null
__init__.py
NeonDaniel/skill-weather
b7a4984b457bb9a800de4ec1aa2d5265d540a9b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2021, Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
37.101988
88
0.632003
from datetime import datetime from time import sleep from typing import List, Tuple from adapt.intent import IntentBuilder from requests import HTTPError from mycroft import MycroftSkill, intent_handler from mycroft.messagebus.message import Message from mycroft.util.parse import extract_number from .skill import ( ...
true
true