hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72c35766d755e29c14dd797ad91e44ab34914bc
1,757
py
Python
loading.py
hawkarcane/Hangman
905640b087b747e6934ed7f18829b12784d0ed08
[ "MIT" ]
null
null
null
loading.py
hawkarcane/Hangman
905640b087b747e6934ed7f18829b12784d0ed08
[ "MIT" ]
null
null
null
loading.py
hawkarcane/Hangman
905640b087b747e6934ed7f18829b12784d0ed08
[ "MIT" ]
null
null
null
#!/usr/bin/python ##### ~ http://stackoverflow.com/questions/7960600/python-tkinter-display-animated-gif-using-pil ~ ## source of code can be found at the above web page, I have modified the code to suit my needs. from Tkinter import * from PIL import Image, ImageTk class MyLabel(Label): def __init__(self, mas...
25.463768
98
0.59078
from Tkinter import * from PIL import Image, ImageTk class MyLabel(Label): def __init__(self, master, filename): im = Image.open(filename) seq = [] try: while 1: seq.append(im.copy()) im.seek(len(seq)) except EOFError: pas...
true
true
f72c37376707907e2c5dcac2d81f5c1e1aad10ec
397
py
Python
maillerApp/wsgi.py
Stblacq/Xmailer
37cfd79f4c4b616fd449e78ef5587d1300090063
[ "bzip2-1.0.6" ]
null
null
null
maillerApp/wsgi.py
Stblacq/Xmailer
37cfd79f4c4b616fd449e78ef5587d1300090063
[ "bzip2-1.0.6" ]
null
null
null
maillerApp/wsgi.py
Stblacq/Xmailer
37cfd79f4c4b616fd449e78ef5587d1300090063
[ "bzip2-1.0.6" ]
null
null
null
""" WSGI config for maillerApp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'maillerApp.settings') application = get_wsgi_application()
true
true
f72c3830b52635d5830fd38ce38096456c2b9555
388
py
Python
bbb/migrations/0007_room_hangout_room.py
cmd-ev/voctoconf
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
[ "MIT" ]
21
2020-08-24T13:27:03.000Z
2021-10-15T09:17:46.000Z
bbb/migrations/0007_room_hangout_room.py
cmd-ev/voctoconf
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
[ "MIT" ]
null
null
null
bbb/migrations/0007_room_hangout_room.py
cmd-ev/voctoconf
5d2c1ca4f1da01b66983f5a562eb8eb6babe0452
[ "MIT" ]
5
2020-08-25T16:34:51.000Z
2021-02-19T04:48:10.000Z
# Generated by Django 2.2.15 on 2020-08-14 21:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bbb', '0006_auto_20200813_1954'), ] operations = [ migrations.AddField( model_name='room', name='hangout_room', ...
20.421053
53
0.600515
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bbb', '0006_auto_20200813_1954'), ] operations = [ migrations.AddField( model_name='room', name='hangout_room', field=models.BooleanField(default=False)...
true
true
f72c386148900925f8177edd4f614faab95b090b
704
py
Python
var/spack/repos/builtin/packages/r-biocversion/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/r-biocversion/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/r-biocversion/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RBiocversion(RPackage): """Set the appropriate version of Bioconductor packages. This...
32
73
0.72017
from spack import * class RBiocversion(RPackage): bioc = "BiocVersion" version('3.14.0', commit='aa56d93d0ea5dcdbf301f120502981740fd91e1e') version('3.12.0', commit='23b971963c6b73550a7e330dab5a046d58ce0223') depends_on('r@4.0.0:', type=('build', 'run')) depends_on('r@4.1.0:', type=('build', '...
true
true
f72c389a4d7bf918cd68d55d1048f404a1165eda
274,814
py
Python
xarray/core/dataset.py
aha66/xarray
3cbd21aa8fd3a57c0dd324f2a276d83829518331
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
xarray/core/dataset.py
aha66/xarray
3cbd21aa8fd3a57c0dd324f2a276d83829518331
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
xarray/core/dataset.py
aha66/xarray
3cbd21aa8fd3a57c0dd324f2a276d83829518331
[ "CC-BY-4.0", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
import copy import datetime import functools import inspect import sys import warnings from collections import defaultdict from distutils.version import LooseVersion from html import escape from numbers import Number from operator import methodcaller from pathlib import Path from typing import ( TYPE_CHECKING, ...
37.573694
124
0.56107
import copy import datetime import functools import inspect import sys import warnings from collections import defaultdict from distutils.version import LooseVersion from html import escape from numbers import Number from operator import methodcaller from pathlib import Path from typing import ( TYPE_CHECKING, ...
true
true
f72c3934b0697c32c252b1d2e817e435900da1e3
441
py
Python
metaci/plan/migrations/0018_planrepository_active.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
48
2018-10-24T14:52:06.000Z
2022-03-25T21:14:50.000Z
metaci/plan/migrations/0018_planrepository_active.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
2,034
2018-10-31T20:59:16.000Z
2022-03-22T21:38:03.000Z
metaci/plan/migrations/0018_planrepository_active.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
27
2018-12-24T18:16:23.000Z
2021-12-15T17:57:27.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-09-13 23:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("plan", "0016_auto_20180904_1457")] operations = [ migrations.AddField( mode...
23.210526
56
0.643991
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("plan", "0016_auto_20180904_1457")] operations = [ migrations.AddField( model_name="planrepository", name="active", field=mode...
true
true
f72c39bc796a19aeb0f55dc3bee1129236c8a00e
111,695
py
Python
salt/grains/core.py
MeAndTheFirefly/salt
77fc3ec3ee25c1b769cc66ddee09067d18080844
[ "Apache-2.0" ]
2
2016-11-14T15:08:53.000Z
2016-11-20T09:25:30.000Z
salt/grains/core.py
MeAndTheFirefly/salt
77fc3ec3ee25c1b769cc66ddee09067d18080844
[ "Apache-2.0" ]
3
2021-03-31T19:53:24.000Z
2021-12-13T20:46:19.000Z
salt/grains/core.py
MeAndTheFirefly/salt
77fc3ec3ee25c1b769cc66ddee09067d18080844
[ "Apache-2.0" ]
2
2020-11-04T06:32:02.000Z
2020-11-06T11:01:18.000Z
# -*- coding: utf-8 -*- """ The static grains, these are the core, or built in grains. When grains are loaded they are not loaded in the same way that modules are loaded, grain functions are detected and executed, the functions MUST return a dict which will be applied to the main grains dict. This module will always b...
36.911765
124
0.528985
from __future__ import absolute_import, print_function, unicode_literals import datetime import hashlib import locale import logging import os import platform import re import socket import sys import time import uuid from errno import EACCES, EPERM import distro import salt.exceptions import salt.log import salt.mo...
true
true
f72c39d04f46b4659fec28e1537a34671c4a461f
439
py
Python
people/templatetags/people_extras.py
hayatbayramolsa/website
22a00a1de8b5902c559e4b48df27fa5c1329f16a
[ "WTFPL" ]
1
2020-02-07T17:38:14.000Z
2020-02-07T17:38:14.000Z
people/templatetags/people_extras.py
hayatbayramolsa/website
22a00a1de8b5902c559e4b48df27fa5c1329f16a
[ "WTFPL" ]
null
null
null
people/templatetags/people_extras.py
hayatbayramolsa/website
22a00a1de8b5902c559e4b48df27fa5c1329f16a
[ "WTFPL" ]
null
null
null
from django import template register = template.Library() def fontawesome(icon_name, size=""): """ Generate fontawesome syntax for HTML. Usage: {% fontawesome "iconname" %} {% fontawesome "iconname" "size" %} Size values are: lg, 2x, 3x, 4x, 5x """ if len(size) > 0: ...
19.086957
60
0.587699
from django import template register = template.Library() def fontawesome(icon_name, size=""): if len(size) > 0: size = "fa-%s" % size return '<i class="fa fa-%s %s"></i>' % (icon_name, size) register.simple_tag(fontawesome)
true
true
f72c3a32e58db3f2d9a4b04faa87382ae4209bcf
314
py
Python
symarray/symarray/calculus/tests/test_arrays.py
tonyfast/uarray
72fe4a0b86b26208747c95c828c66b8284d435d4
[ "BSD-3-Clause" ]
null
null
null
symarray/symarray/calculus/tests/test_arrays.py
tonyfast/uarray
72fe4a0b86b26208747c95c828c66b8284d435d4
[ "BSD-3-Clause" ]
null
null
null
symarray/symarray/calculus/tests/test_arrays.py
tonyfast/uarray
72fe4a0b86b26208747c95c828c66b8284d435d4
[ "BSD-3-Clause" ]
null
null
null
from symarray.calculus.integers import Integer from symarray.calculus.arrays import Array from symarray.shape import NDShape def test_basic(): a = Array('a') b = Array('b', shape=NDShape((Integer('n1'), Integer('n2')))) n = Integer('n') expr = a+n*a+2+b print(expr.shape) print(expr[1])
22.428571
65
0.659236
from symarray.calculus.integers import Integer from symarray.calculus.arrays import Array from symarray.shape import NDShape def test_basic(): a = Array('a') b = Array('b', shape=NDShape((Integer('n1'), Integer('n2')))) n = Integer('n') expr = a+n*a+2+b print(expr.shape) print(expr[1])
true
true
f72c3ac1f20334925f3e4c702afd2d9868b7b904
3,221
py
Python
u-tokyo/2018-summer/dataset.py
PandaDrunkard/proex
c303f051721d9f271d8187957a4458dc5f4558b1
[ "MIT" ]
null
null
null
u-tokyo/2018-summer/dataset.py
PandaDrunkard/proex
c303f051721d9f271d8187957a4458dc5f4558b1
[ "MIT" ]
null
null
null
u-tokyo/2018-summer/dataset.py
PandaDrunkard/proex
c303f051721d9f271d8187957a4458dc5f4558b1
[ "MIT" ]
null
null
null
import math def load_image(filename, append_index=False): content = [line.strip().split(' ') for line in open(filename)][0] r = list(map(int, content[0::3])) g = list(map(int, content[1::3])) b = list(map(int, content[2::3])) if append_index: return list(zip(r,g,b,range(len(r)))) else: ...
30.386792
69
0.535548
import math def load_image(filename, append_index=False): content = [line.strip().split(' ') for line in open(filename)][0] r = list(map(int, content[0::3])) g = list(map(int, content[1::3])) b = list(map(int, content[2::3])) if append_index: return list(zip(r,g,b,range(len(r)))) else: ...
true
true
f72c3b061208c98f8b6103c531da45e38011c75c
92,091
py
Python
pandas/util/testing.py
mimikaTU/pandas
573d4e7e1b354e7ee0cb12280ec58835207106ea
[ "BSD-3-Clause" ]
1
2020-01-18T09:57:03.000Z
2020-01-18T09:57:03.000Z
pandas/util/testing.py
Kaya176/pandas
4fb963b6a3261940de5891323a8d217087a2a9a1
[ "BSD-3-Clause" ]
1
2018-03-22T16:06:03.000Z
2018-03-22T16:06:03.000Z
pandas/util/testing.py
Kaya176/pandas
4fb963b6a3261940de5891323a8d217087a2a9a1
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division # pylint: disable-msg=W0402 import re import string import sys import tempfile import warnings import inspect import os import subprocess import locale import traceback from datetime import datetime from functools import wraps from contextlib import contextmanager from numpy.random im...
32.854442
79
0.611059
from __future__ import division import re import string import sys import tempfile import warnings import inspect import os import subprocess import locale import traceback from datetime import datetime from functools import wraps from contextlib import contextmanager from numpy.random import randn, rand import nump...
true
true
f72c3bbbbfb56f466b8bb7c5ad7d122e79a30a61
22,903
py
Python
app/venv/lib/python2.7/site-packages/numpy/distutils/mingw32ccompiler.py
anaheino/Ufo-sightings-map
64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc
[ "MIT" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
app/venv/lib/python2.7/site-packages/numpy/distutils/mingw32ccompiler.py
anaheino/Ufo-sightings-map
64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc
[ "MIT" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
app/venv/lib/python2.7/site-packages/numpy/distutils/mingw32ccompiler.py
anaheino/Ufo-sightings-map
64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc
[ "MIT" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
""" Support code for building Python extensions on Windows. # NT stuff # 1. Make sure libpython<version>.a exists for gcc. If not, build it. # 2. Force windows to use gcc (we're struggling with MSVC and g77 support) # 3. Force windows to use g77 """ from __future__ import division, absolute_import, p...
38.171667
176
0.590752
from __future__ import division, absolute_import, print_function import os import sys import subprocess import re import numpy.distutils.ccompiler if sys.version_info[0] < 3: from . import log else: from numpy.distutils import log # --> this is done in numpy/distutils/ccompiler.py # 3. Force windows to us...
true
true
f72c3c1f7ed42aa55a23fb88c63f41612e677e8b
203
py
Python
pyBrematic/utils/__init__.py
d-Rickyy-b/Brematic-Controller
878ace569ff7df0617a35f595cb74244c21ebb9c
[ "MIT" ]
11
2018-05-02T21:31:57.000Z
2021-11-09T11:40:47.000Z
pyBrematic/utils/__init__.py
d-Rickyy-b/Brematic-Controller
878ace569ff7df0617a35f595cb74244c21ebb9c
[ "MIT" ]
20
2018-05-01T14:32:59.000Z
2022-02-14T21:53:58.000Z
pyBrematic/utils/__init__.py
d-Rickyy-b/Brematic-Controller
878ace569ff7df0617a35f595cb74244c21ebb9c
[ "MIT" ]
5
2018-11-08T15:35:48.000Z
2020-12-27T18:28:44.000Z
# -*- coding: utf-8 -*- from .encoding import DataEncoder from .rand import Rand from .singleton import singleton from .storage import Storage __all__ = ["singleton", "Storage", "DataEncoder", "Rand"]
22.555556
57
0.724138
from .encoding import DataEncoder from .rand import Rand from .singleton import singleton from .storage import Storage __all__ = ["singleton", "Storage", "DataEncoder", "Rand"]
true
true
f72c3cb0514457777ed5fb9a0b71f43e86fde81c
4,523
py
Python
caw/tests/test_e2e.py
FNNDSC/caw
a41761c4502481f6ccb60ef6e9956464c9b30eb9
[ "MIT" ]
null
null
null
caw/tests/test_e2e.py
FNNDSC/caw
a41761c4502481f6ccb60ef6e9956464c9b30eb9
[ "MIT" ]
11
2021-04-23T21:25:29.000Z
2022-03-14T02:40:26.000Z
caw/tests/test_e2e.py
FNNDSC/caw
a41761c4502481f6ccb60ef6e9956464c9b30eb9
[ "MIT" ]
1
2021-10-17T16:18:30.000Z
2021-10-17T16:18:30.000Z
""" An end-to-end test which performs the following: 1. creates a ChRIS user account. 2. caw login 3. caw search 4. caw upload --pipeline ... 5. caw download 6. caw logout """ import os import unittest import random import string import requests import subprocess as sp from tempfile import NamedTemporaryFile, Tempor...
34.007519
147
0.554941
import os import unittest import random import string import requests import subprocess as sp from tempfile import NamedTemporaryFile, TemporaryDirectory from time import sleep from glob import iglob def random_string(length=12) -> str: return ''.join(random.choice(string.ascii_letters) for x in range(length)) ...
true
true
f72c3ce1384bcf313ac21687415c8302c74d8838
5,540
py
Python
clothingBot.py
MohamedBengezi/clothingBot
da48eec8548579be70e6990b991af8d0d9aa9c77
[ "MIT" ]
null
null
null
clothingBot.py
MohamedBengezi/clothingBot
da48eec8548579be70e6990b991af8d0d9aa9c77
[ "MIT" ]
3
2021-03-31T19:37:57.000Z
2021-12-13T20:32:40.000Z
clothingBot.py
MohamedBengezi/clothingBot
da48eec8548579be70e6990b991af8d0d9aa9c77
[ "MIT" ]
null
null
null
import sys import json from time import sleep from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptio...
31.657143
85
0.638809
import sys import json from time import sleep from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptio...
true
true
f72c3d058896a02a0504926742ddd9e972b29447
15,106
py
Python
twilio/rest/conversations/v1/service/configuration/notification.py
timgates42/twilio-python
ef29d03a4857b62b616df4a8f4f2b7c294afbb99
[ "MIT" ]
2
2022-01-13T10:58:03.000Z
2022-03-16T07:12:17.000Z
venv/Lib/site-packages/twilio/rest/conversations/v1/service/configuration/notification.py
syt1209/PythonProjects
0409dbd3c0b0ddf00debc38875059c828eb31dec
[ "MIT" ]
9
2018-05-07T21:59:44.000Z
2022-01-29T22:49:29.000Z
venv/Lib/site-packages/twilio/rest/conversations/v1/service/configuration/notification.py
syt1209/PythonProjects
0409dbd3c0b0ddf00debc38875059c828eb31dec
[ "MIT" ]
4
2021-03-25T09:00:08.000Z
2021-08-05T06:54:23.000Z
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource f...
42.672316
163
0.693632
from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page import Page class NotificationList(ListResource): def __init__(self, version, chat_service_s...
true
true
f72c3d8a0d20aa867b3ae48210aa041fe0e1ebf3
516
py
Python
env/Lib/site-packages/plotly/validators/violin/_points.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/violin/_points.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/violin/_points.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class PointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="points", parent_name="violin", **kwargs): super(PointsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
34.4
77
0.622093
import _plotly_utils.basevalidators class PointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="points", parent_name="violin", **kwargs): super(PointsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f72c3deb6a646c951f899749fe2ceefc65d3ed16
5,534
py
Python
plotly/graph_objs/layout/scene/_domain.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/layout/scene/_domain.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/layout/scene/_domain.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
1
2019-02-18T04:12:56.000Z
2019-02-18T04:12:56.000Z
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class Domain(BaseLayoutHierarchyType): # column # ------ @property def column(self): """ If there is a layout grid, use the domain for this column in the grid for this scene subplot . The 'column...
27.809045
71
0.527647
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class Domain(BaseLayoutHierarchyType): @property def column(self): return self['column'] @column.setter def column(self, val): self['column'] = val @property def row(self): return se...
true
true
f72c3e5bb5282a9d3bfbafdfee816454ab692053
64,538
py
Python
tests/test_scottbrian_algo1/test_algo_api.py
ScottBrian/scottbrian_algo1
57cd8fc5674507db51b1c887d5f9a68462b0ca9d
[ "MIT" ]
null
null
null
tests/test_scottbrian_algo1/test_algo_api.py
ScottBrian/scottbrian_algo1
57cd8fc5674507db51b1c887d5f9a68462b0ca9d
[ "MIT" ]
null
null
null
tests/test_scottbrian_algo1/test_algo_api.py
ScottBrian/scottbrian_algo1
57cd8fc5674507db51b1c887d5f9a68462b0ca9d
[ "MIT" ]
null
null
null
"""test_algo_api.py module.""" # from datetime import datetime, timedelta import pytest # import sys # from pathlib import Path import numpy as np import pandas as pd # type: ignore import string import math from typing import Any, List, NamedTuple # from typing_extensions import Final from ibapi.tag_value import T...
37.133487
79
0.562754
import pytest import numpy as np import pandas as pd import string import math from typing import Any, List, NamedTuple from ibapi.tag_value import TagValue from ibapi.contract import ComboLeg from ibapi.contract import DeltaNeutralContract from ibapi.contract import Contract, ContractDetails from scottbrian_alg...
true
true
f72c3eaefc009d0112c0c6fa0eb8a060a2d74f83
13,353
py
Python
cryptoapis/model/inline_response40084.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
cryptoapis/model/inline_response40084.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
cryptoapis/model/inline_response40084.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
46.852632
484
0.59642
import re import sys from cryptoapis.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenApiM...
true
true
f72c3f4ba1a384299dbf753da7d0c4ce5d5a213d
117
py
Python
App/pogress.py
MarioTiara/MarioTiara-RD-Detection-Ensemble-CNN
95101b942a7e51078bfe643021e745e51e82516f
[ "MIT" ]
null
null
null
App/pogress.py
MarioTiara/MarioTiara-RD-Detection-Ensemble-CNN
95101b942a7e51078bfe643021e745e51e82516f
[ "MIT" ]
null
null
null
App/pogress.py
MarioTiara/MarioTiara-RD-Detection-Ensemble-CNN
95101b942a7e51078bfe643021e745e51e82516f
[ "MIT" ]
null
null
null
from tqdm import tqdm,trange from time import sleep for i in trange(20): sleep(0.1) pass raise SystemExit
11.7
28
0.709402
from tqdm import tqdm,trange from time import sleep for i in trange(20): sleep(0.1) pass raise SystemExit
true
true
f72c409dd9d8c1ef88d4e1e5c1f5d52fa3e3b565
546
py
Python
manage.py
C-PRONCE/django-project
573402850462a73bd8750118f74e2b36aa650ded
[ "MIT" ]
null
null
null
manage.py
C-PRONCE/django-project
573402850462a73bd8750118f74e2b36aa650ded
[ "MIT" ]
null
null
null
manage.py
C-PRONCE/django-project
573402850462a73bd8750118f74e2b36aa650ded
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "second_project.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Djang...
34.125
78
0.690476
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "second_project.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's i...
true
true
f72c41aed18c0d9acc5d31e93cff1a2cecca0807
2,225
py
Python
test/ux/components/model/test_repository.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
test/ux/components/model/test_repository.py
intel/lp-opt-tool
130eefa3586b38df6c0ff78cc8807ae273f6a63f
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
test/ux/components/model/test_repository.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
36.47541
84
0.720899
import unittest from neural_compressor.ux.components.model.repository import ModelRepository from neural_compressor.ux.utils.consts import Frameworks from neural_compressor.ux.utils.exceptions import NotFoundException class TestModelRepository(unittest.TestCase): def test_onnx_is_model_path(self) -> None: ...
true
true
f72c41f790310bb3e579547708ef92adbef03768
4,008
py
Python
unit_test/test_interface.py
riven314/capstone_dash_interface
5eab25f4c15ad09aa889554820231175b0a3ed28
[ "CC0-1.0" ]
1
2019-12-10T14:59:12.000Z
2019-12-10T14:59:12.000Z
unit_test/test_interface.py
riven314/capstone_dash_interface
5eab25f4c15ad09aa889554820231175b0a3ed28
[ "CC0-1.0" ]
null
null
null
unit_test/test_interface.py
riven314/capstone_dash_interface
5eab25f4c15ad09aa889554820231175b0a3ed28
[ "CC0-1.0" ]
1
2020-01-01T12:24:51.000Z
2020-01-01T12:24:51.000Z
""" test the following: model + scene understanding + interface """ import os import sys PATH = os.path.join(os.getcwd(), '..') sys.path.append(PATH) import cv2 from PyQt5.QtGui import QImage, QColor, QPixmap from PyQt5.QtWidgets import QApplication import qtmodern.styles import qtmodern.windows from l...
38.538462
102
0.643214
import os import sys PATH = os.path.join(os.getcwd(), '..') sys.path.append(PATH) import cv2 from PyQt5.QtGui import QImage, QColor, QPixmap from PyQt5.QtWidgets import QApplication import qtmodern.styles import qtmodern.windows from layout import Layout from pyqt_utils import convert_qimg from scene_sum...
true
true
f72c4215bb8a7b8efd6c3aee4ac1b1fb3af3b383
6,434
py
Python
userbot/__init__.py
PRUDHVI-BOT/apple
daae0ca57f42c6a924a59bfd800b92e2a6c6115e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
PRUDHVI-BOT/apple
daae0ca57f42c6a924a59bfd800b92e2a6c6115e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
PRUDHVI-BOT/apple
daae0ca57f42c6a924a59bfd800b92e2a6c6115e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ Userbot initialization. """ import os from sys import version_info from logging import basicConfig, getLogger, IN...
32.17
143
0.713864
import os from sys import version_info from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pylast import LastFMNetwork, md5 from pySmartDL import SmartDL from dotenv import load_dotenv from requests import get from telethon import TelegramClient from telethon.sessi...
true
true
f72c4479ad5d2532a05900a83c5526eec00f800e
13,381
py
Python
src/rkd_harbor/tasks/deployment/base.py
attawayinc/riotkit-harbor
baea9f6e856f18835d316e3adc01ced2b9aaebda
[ "Apache-2.0" ]
14
2019-04-12T11:24:54.000Z
2022-03-21T01:13:27.000Z
src/rkd_harbor/tasks/deployment/base.py
attawayinc/riotkit-harbor
baea9f6e856f18835d316e3adc01ced2b9aaebda
[ "Apache-2.0" ]
37
2019-06-29T05:54:10.000Z
2021-08-03T05:54:52.000Z
src/rkd_harbor/tasks/deployment/base.py
attawayinc/riotkit-harbor
baea9f6e856f18835d316e3adc01ced2b9aaebda
[ "Apache-2.0" ]
2
2021-09-29T04:22:52.000Z
2021-09-29T06:43:59.000Z
import os import subprocess from abc import ABC from jinja2 import Environment from jinja2 import FileSystemLoader from jinja2 import StrictUndefined from jinja2.exceptions import UndefinedError from argparse import ArgumentParser from rkd.api.contract import ExecutionContext from rkd.yaml_parser import YamlFileLoader ...
41.172308
120
0.603318
import os import subprocess from abc import ABC from jinja2 import Environment from jinja2 import FileSystemLoader from jinja2 import StrictUndefined from jinja2.exceptions import UndefinedError from argparse import ArgumentParser from rkd.api.contract import ExecutionContext from rkd.yaml_parser import YamlFileLoader ...
true
true
f72c4540917b51bca7ea46963d819966d9f4ad33
103
py
Python
code/test/__init__.py
fgitmichael/TestModeDisentangling
022fbe5b49e847aeb110d89be1e0b1c28bcff01d
[ "MIT" ]
1
2020-05-16T14:03:09.000Z
2020-05-16T14:03:09.000Z
code/test/__init__.py
fgitmichael/TestModeDisentangling
022fbe5b49e847aeb110d89be1e0b1c28bcff01d
[ "MIT" ]
null
null
null
code/test/__init__.py
fgitmichael/TestModeDisentangling
022fbe5b49e847aeb110d89be1e0b1c28bcff01d
[ "MIT" ]
null
null
null
from .mode_actions_sampler import ModeActionSampler from .disentangling_test import DisentanglingTester
51.5
51
0.912621
from .mode_actions_sampler import ModeActionSampler from .disentangling_test import DisentanglingTester
true
true
f72c464b80241ef5e87521b090940d0e329fe244
2,462
py
Python
algotrader/trading/context.py
alexcwyu/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
17
2016-03-30T21:52:30.000Z
2021-05-01T18:21:48.000Z
algotrader/trading/context.py
ajmal017/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
2
2016-10-04T19:29:05.000Z
2017-02-01T19:24:39.000Z
algotrader/trading/context.py
ajmal017/python-trading
a494f602411a3ebfdecae002a16a5ea93fc7a046
[ "Apache-2.0" ]
9
2016-04-24T05:05:26.000Z
2020-05-03T13:01:34.000Z
from algotrader import Context from algotrader.model.model_factory import ModelFactory from algotrader.provider import ProviderManager from algotrader.provider.broker import Broker from algotrader.provider.datastore import DataStore from algotrader.provider.feed import Feed from algotrader.strategy import StrategyManag...
42.448276
102
0.750203
from algotrader import Context from algotrader.model.model_factory import ModelFactory from algotrader.provider import ProviderManager from algotrader.provider.broker import Broker from algotrader.provider.datastore import DataStore from algotrader.provider.feed import Feed from algotrader.strategy import StrategyManag...
true
true
f72c464dc5c8ee869e61bd1a0fbcf6cc63feb838
3,082
py
Python
lispy/lisp.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
3
2019-01-04T12:54:16.000Z
2019-01-13T07:08:10.000Z
lispy/lisp.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
null
null
null
lispy/lisp.py
fucangyu/myself-impls
9fd2730f9e0e12f95559d2f4e41c34b670441428
[ "MIT" ]
1
2019-08-27T18:29:53.000Z
2019-08-27T18:29:53.000Z
import math import operator as op from collections import ChainMap as Environment Symbol = str List = list Number = (int, float) def parse(program: str): return read_from_tokens(tokenize(program)) def tokenize(raw): return raw.replace('(', ' ( ').replace(')', ' ) ').split() def read_from_tokens(tokens: l...
23.172932
64
0.508436
import math import operator as op from collections import ChainMap as Environment Symbol = str List = list Number = (int, float) def parse(program: str): return read_from_tokens(tokenize(program)) def tokenize(raw): return raw.replace('(', ' ( ').replace(')', ' ) ').split() def read_from_tokens(tokens: l...
true
true
f72c46adb32a8a5bb98d87da7bfcaf092e3eb79b
19,109
py
Python
logs/management/commands/import_log.py
ahemery/ezreports
9ff0f472ff0f0efd06c8315b99084bd723b0e2f9
[ "Apache-2.0" ]
null
null
null
logs/management/commands/import_log.py
ahemery/ezreports
9ff0f472ff0f0efd06c8315b99084bd723b0e2f9
[ "Apache-2.0" ]
null
null
null
logs/management/commands/import_log.py
ahemery/ezreports
9ff0f472ff0f0efd06c8315b99084bd723b0e2f9
[ "Apache-2.0" ]
null
null
null
import csv import glob import os import pycurl import re import ldap3 from datetime import date, timedelta, datetime from dateutil.parser import parse from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.models import Max from django.utils.text import slugify...
41.905702
117
0.487676
import csv import glob import os import pycurl import re import ldap3 from datetime import date, timedelta, datetime from dateutil.parser import parse from django.core.management.base import BaseCommand, CommandError from django.db import connection from django.db.models import Max from django.utils.text import slugify...
true
true
f72c46cc6e6046ea77fc6de5d29eb113534e9e14
9,731
py
Python
tools/rosunit/test/test_junitxml.py
dodsonmg/ros
f1ce3d9d36e8df9dcdca6b37086aabb7f3e202d3
[ "BSD-3-Clause" ]
null
null
null
tools/rosunit/test/test_junitxml.py
dodsonmg/ros
f1ce3d9d36e8df9dcdca6b37086aabb7f3e202d3
[ "BSD-3-Clause" ]
null
null
null
tools/rosunit/test/test_junitxml.py
dodsonmg/ros
f1ce3d9d36e8df9dcdca6b37086aabb7f3e202d3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # 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...
42.679825
176
0.631795
import os import io import sys import unittest import tempfile import shutil junitxml = None class MockResult(): def __init__(self, directory, filename, suites = [], noSuitesRoot = False): self.filename = os.path.join(directory, filename) self.suites = suites self.noSuitesRoot = n...
true
true
f72c48af45b656ece0447e4d40290a0102816591
20,906
py
Python
odoo/base-addons/sale/tests/test_sale_product_attribute_value_config.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/sale/tests/test_sale_product_attribute_value_config.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/sale/tests/test_sale_product_attribute_value_config.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields from odoo.addons.product.tests.test_product_attribute_value_config import TestProductAttributeValueSetup from odoo.tests import tagged class TestSaleProductAttributeValueSetup(TestProductAttribu...
51.114914
120
0.69162
from odoo import fields from odoo.addons.product.tests.test_product_attribute_value_config import TestProductAttributeValueSetup from odoo.tests import tagged class TestSaleProductAttributeValueSetup(TestProductAttributeValueSetup): def _setup_currency(self, currency_ratio=2): from_currency = self.comput...
true
true
f72c490d26e31fc870e558ebe85f5de8ccd13aa9
4,921
py
Python
src/btfs/firebase_dc.py
mikespub-org/mar10-clouddav
dabfe2832438667ca5ff960e9273fceae9280f15
[ "MIT" ]
2
2021-03-01T10:27:41.000Z
2021-11-04T21:27:12.000Z
src/btfs/firebase_dc.py
mikespub-org/mar10-clouddav
dabfe2832438667ca5ff960e9273fceae9280f15
[ "MIT" ]
1
2022-03-07T09:09:21.000Z
2022-03-07T09:09:21.000Z
src/btfs/firebase_dc.py
mikespub-org/mar10-clouddav
dabfe2832438667ca5ff960e9273fceae9280f15
[ "MIT" ]
1
2020-10-17T07:35:37.000Z
2020-10-17T07:35:37.000Z
# (c) 2009-2019 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Implementation of a domain controller that allows users to authenticate via the Google Identity Platform - based on Firebase Authentication...
44.333333
104
0.633611
from wsgidav import util from wsgidav.dc.base_dc import BaseDomainController from .sessions import get_current_session __docformat__ = "reStructuredText" _logger = util.get_module_logger(__name__) class FirebaseDomainController(BaseDomainController): known_roles = ("admin", "editor", "reader", "browser", "none...
true
true
f72c4c832d99aaf2b05ca354a98a00fc55c755f2
1,232
py
Python
paper_simulation_scripts/run_one_job.py
bsierieb1/SCDCdm_public
4cd3460a598fad01cb556dc1fb86f63d805ee052
[ "BSD-3-Clause" ]
1
2021-03-31T10:44:48.000Z
2021-03-31T10:44:48.000Z
paper_simulation_scripts/run_one_job.py
neurogenomics/scCODA
db610c1bda904f79a8142da767cf8e62d1cd8d32
[ "BSD-3-Clause" ]
null
null
null
paper_simulation_scripts/run_one_job.py
neurogenomics/scCODA
db610c1bda904f79a8142da767cf8e62d1cd8d32
[ "BSD-3-Clause" ]
null
null
null
""" This script is executed in each job on the server to run simulation studies on all the parameters that are passed to it """ import sys import ast import numpy as np from scdcdm.util import multi_parameter_sampling as mult # Convert string parameters to lists cases = ast.literal_eval(sys.argv[1]) print("cases:", c...
32.421053
131
0.719156
import sys import ast import numpy as np from scdcdm.util import multi_parameter_sampling as mult cases = ast.literal_eval(sys.argv[1]) print("cases:", cases) K = ast.literal_eval(sys.argv[2]) print("K:", K) n_total = ast.literal_eval(sys.argv[3]) print("n_total:", n_total) n_samples = ast.literal_eval(sys.argv[4]) p...
true
true
f72c4d210b5eea32e3d333a149d7cfd14424c8d5
14,927
py
Python
uf/application/uda.py
yupeijei1997/unif
16685a89446e6ce14080439162a9bfd0c75f0521
[ "Apache-2.0" ]
1
2021-05-15T12:07:40.000Z
2021-05-15T12:07:40.000Z
uf/application/uda.py
yupeijei1997/unif
16685a89446e6ce14080439162a9bfd0c75f0521
[ "Apache-2.0" ]
null
null
null
uf/application/uda.py
yupeijei1997/unif
16685a89446e6ce14080439162a9bfd0c75f0521
[ "Apache-2.0" ]
null
null
null
# coding:=utf-8 # Copyright 2021 Tencent. 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 applic...
38.872396
79
0.586923
import numpy as np from uf.tools import tf from .base import ClassifierModule from .bert import BERTClassifier, get_bert_config, get_key_to_depths from uf.modeling.bert import BERTEncoder from uf.modeling.uda import UDADecoder from uf.tokenization.word_piece import get_word_piece_tokenizer import uf.utils as utils im...
true
true
f72c4da207cd6d82929af064fa9ceebeef08defa
283
py
Python
iterators_and_generators/demo_generators.py
Minkov/python-oop-2020-02
d2acb1504c1a135cded2ae6ff42acccb303d9ab1
[ "MIT" ]
2
2020-02-27T18:34:45.000Z
2020-10-25T17:34:15.000Z
iterators_and_generators/demo_generators.py
Minkov/python-oop-2020-02
d2acb1504c1a135cded2ae6ff42acccb303d9ab1
[ "MIT" ]
null
null
null
iterators_and_generators/demo_generators.py
Minkov/python-oop-2020-02
d2acb1504c1a135cded2ae6ff42acccb303d9ab1
[ "MIT" ]
null
null
null
def custom_range(min, max): index = min while index <= max: yield index index += 1 it = custom_range(1, 2) print(next(it)) print(next(it)) print((x for x in range(3))) even = filter(lambda x: x % 2 == 0, range(10)) for x in even: print(x)
18.866667
47
0.55477
def custom_range(min, max): index = min while index <= max: yield index index += 1 it = custom_range(1, 2) print(next(it)) print(next(it)) print((x for x in range(3))) even = filter(lambda x: x % 2 == 0, range(10)) for x in even: print(x)
true
true
f72c4f1fb0a457648028cbec2b488d34d23bde73
5,745
py
Python
logistic_fit.py
ege-erdil/logistic-fit
7c6cc9ed35877ed8d142dd75b7b98658e19cf7cb
[ "MIT" ]
null
null
null
logistic_fit.py
ege-erdil/logistic-fit
7c6cc9ed35877ed8d142dd75b7b98658e19cf7cb
[ "MIT" ]
null
null
null
logistic_fit.py
ege-erdil/logistic-fit
7c6cc9ed35877ed8d142dd75b7b98658e19cf7cb
[ "MIT" ]
null
null
null
from autograd import grad import autograd.numpy as np from scipy.stats import logistic, norm from scipy.optimize import minimize def logistic_pdf(x, loc, scale): y = (x - loc)/scale return np.exp(-y)/(scale * (1 + np.exp(-y))**2) def logistic_cdf(x, loc, scale): y = (x-loc)/scale if y < -10...
33.794118
132
0.582594
from autograd import grad import autograd.numpy as np from scipy.stats import logistic, norm from scipy.optimize import minimize def logistic_pdf(x, loc, scale): y = (x - loc)/scale return np.exp(-y)/(scale * (1 + np.exp(-y))**2) def logistic_cdf(x, loc, scale): y = (x-loc)/scale if y < -10...
true
true
f72c4f3b403c785cc891e829c3dd7d88ad7ca116
308
py
Python
tests/parser_test.py
krilifon/proxy-parse
79d1c1655024a03e7a8c1b653dfdf6d68f89e511
[ "MIT" ]
4
2021-11-29T18:56:54.000Z
2021-12-23T10:59:58.000Z
tests/parser_test.py
krilifon/proxy-parse
79d1c1655024a03e7a8c1b653dfdf6d68f89e511
[ "MIT" ]
null
null
null
tests/parser_test.py
krilifon/proxy-parse
79d1c1655024a03e7a8c1b653dfdf6d68f89e511
[ "MIT" ]
null
null
null
from proxy_parse import ProxyParser from proxy_parse.spiders import HideMySpider def test_proxy_parser(): proxy_parser = ProxyParser(scrapy_spiders=[HideMySpider]) result = proxy_parser.parse() assert type(result) is list assert all(type(proxy) is str and ":" in proxy for proxy in result)
30.8
71
0.762987
from proxy_parse import ProxyParser from proxy_parse.spiders import HideMySpider def test_proxy_parser(): proxy_parser = ProxyParser(scrapy_spiders=[HideMySpider]) result = proxy_parser.parse() assert type(result) is list assert all(type(proxy) is str and ":" in proxy for proxy in result)
true
true
f72c50b550d0cb981526fc944b9967a3ca63e4c6
237
py
Python
polyaxon/api/code_reference/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/api/code_reference/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
polyaxon/api/code_reference/serializers.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
from rest_framework import serializers from db.models.repos import CodeReference class CodeReferenceSerializer(serializers.ModelSerializer): class Meta: model = CodeReference exclude = ['created_at', 'updated_at']
23.7
59
0.755274
from rest_framework import serializers from db.models.repos import CodeReference class CodeReferenceSerializer(serializers.ModelSerializer): class Meta: model = CodeReference exclude = ['created_at', 'updated_at']
true
true
f72c516d329c6cda5c8629429947754fd975930b
458
py
Python
.venv/lib/python3.7/site-packages/jupyter_client/__init__.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
.venv/lib/python3.7/site-packages/jupyter_client/__init__.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
24
2020-03-25T19:35:43.000Z
2022-02-10T11:46:50.000Z
.venv/lib/python3.7/site-packages/jupyter_client/__init__.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
11
2019-01-21T17:51:48.000Z
2021-08-10T07:04:33.000Z
"""Client-side implementations of the Jupyter protocol""" from ._version import version_info, __version__, protocol_version_info, protocol_version from .connect import * from .launcher import * from .client import KernelClient from .manager import KernelManager, AsyncKernelManager, run_kernel from .blocking import Blo...
41.636364
88
0.851528
from ._version import version_info, __version__, protocol_version_info, protocol_version from .connect import * from .launcher import * from .client import KernelClient from .manager import KernelManager, AsyncKernelManager, run_kernel from .blocking import BlockingKernelClient from .asynchronous import AsyncKernelCli...
true
true
f72c517b8635ba9e8ee1d7ac3aac00b5ef74b266
475
py
Python
src/som/primitives/invokable_primitives.py
smarr/RPySOM
941e1fe08753d6e97dac24c3ba4d1e99a9c40160
[ "MIT" ]
12
2016-01-07T14:20:57.000Z
2019-10-13T06:56:20.000Z
src/som/primitives/invokable_primitives.py
smarr/RPySOM
941e1fe08753d6e97dac24c3ba4d1e99a9c40160
[ "MIT" ]
2
2016-05-26T06:53:33.000Z
2020-09-02T15:58:28.000Z
src/som/primitives/invokable_primitives.py
SOM-st/RPySOM
2dcfc71786a3bd5be5a842c649645f71d6c35f89
[ "MIT" ]
2
2016-05-25T06:07:52.000Z
2019-10-02T16:52:25.000Z
from som.primitives.primitives import Primitives from som.vmobjects.primitive import UnaryPrimitive def _holder(rcvr): return rcvr.get_holder() def _signature(rcvr): return rcvr.get_signature() class InvokablePrimitivesBase(Primitives): def install_primitives(self): self._install_instance_prim...
27.941176
97
0.785263
from som.primitives.primitives import Primitives from som.vmobjects.primitive import UnaryPrimitive def _holder(rcvr): return rcvr.get_holder() def _signature(rcvr): return rcvr.get_signature() class InvokablePrimitivesBase(Primitives): def install_primitives(self): self._install_instance_prim...
true
true
f72c517f1ba15c39ff29e590665a48a098bdbe9a
868
py
Python
Aula_extrator_url/main.py
laurourbano/Projetos_Python
50e7f4a7ff34158385ea7b635bac95ec8a0363a1
[ "MIT" ]
1
2021-12-28T02:51:34.000Z
2021-12-28T02:51:34.000Z
Aula_extrator_url/main.py
laurourbano/Projetos_Python
50e7f4a7ff34158385ea7b635bac95ec8a0363a1
[ "MIT" ]
null
null
null
Aula_extrator_url/main.py
laurourbano/Projetos_Python
50e7f4a7ff34158385ea7b635bac95ec8a0363a1
[ "MIT" ]
null
null
null
# Arquivo utilizado até a aula 3, quando então passamos a utilizar a classe # ExtratorURL no arquivo extrator_url.py url = "bytebank.com/cambio?quantidade=100&moedaOrigem=real&moedaDestino=dolar" # Sanitização da URL url = url.strip() # Validação da URL if url == "": raise ValueError("A URL está vazia") # Separa...
31
78
0.776498
url = "bytebank.com/cambio?quantidade=100&moedaOrigem=real&moedaDestino=dolar" url = url.strip() if url == "": raise ValueError("A URL está vazia") indice_interrogacao = url.find('?') url_base = url[:indice_interrogacao] url_parametros = url[indice_interrogacao+1:] print(url_parametros) parametro_busca = 'quant...
true
true
f72c51acdba5f7032ff01e97210db5d3fb75c607
8,224
py
Python
conda/cli/main.py
jacoblsmith/conda
f50b919a4c923820c1bb2b449603534084faa28b
[ "BSD-3-Clause" ]
null
null
null
conda/cli/main.py
jacoblsmith/conda
f50b919a4c923820c1bb2b449603534084faa28b
[ "BSD-3-Clause" ]
null
null
null
conda/cli/main.py
jacoblsmith/conda
f50b919a4c923820c1bb2b449603534084faa28b
[ "BSD-3-Clause" ]
null
null
null
# (c) Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. '''conda is a tool for managing environments and packages. conda provides the following commands: ...
35.601732
105
0.655399
from __future__ import print_function, division, absolute_import import sys def main(): if len(sys.argv) > 1: argv1 = sys.argv[1] if argv1 in ('..activate', '..deactivate', '..activateroot', '..checkenv'): import conda.cli.activate as activate activate.main() r...
true
true
f72c52094e0d1fefbdc0188332f4f3efdc92129b
4,055
py
Python
semantic-conventions/src/opentelemetry/semconv/model/constraints.py
bogdandrutu/build-tools
08bec45f36f112751a2ea0785368a4fa8e2add6a
[ "Apache-2.0" ]
null
null
null
semantic-conventions/src/opentelemetry/semconv/model/constraints.py
bogdandrutu/build-tools
08bec45f36f112751a2ea0785368a4fa8e2add6a
[ "Apache-2.0" ]
null
null
null
semantic-conventions/src/opentelemetry/semconv/model/constraints.py
bogdandrutu/build-tools
08bec45f36f112751a2ea0785368a4fa8e2add6a
[ "Apache-2.0" ]
null
null
null
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
41.377551
119
0.67349
from dataclasses import dataclass, field, replace from typing import List, Tuple, Set from opentelemetry.semconv.model.exceptions import ValidationError from opentelemetry.semconv.model.semantic_attribute import SemanticAttribute from opentelemetry.semconv.model.utils import validate_values from ruamel.yaml.comments...
true
true
f72c526d85a4169c9d8e5811a9e733fff90c8df8
3,136
py
Python
gitea_api/models/issue_labels_option.py
r7l/python-gitea-api
31d3dba27ea7e551e2048a1230c4ab4d73365006
[ "MIT" ]
1
2022-02-09T23:43:26.000Z
2022-02-09T23:43:26.000Z
gitea_api/models/issue_labels_option.py
r7l/python-gitea-api
31d3dba27ea7e551e2048a1230c4ab4d73365006
[ "MIT" ]
null
null
null
gitea_api/models/issue_labels_option.py
r7l/python-gitea-api
31d3dba27ea7e551e2048a1230c4ab4d73365006
[ "MIT" ]
null
null
null
# coding: utf-8 """ Gitea API. This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.16.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class IssueLabelsOption(object): """NOTE: This class ...
27.752212
80
0.552934
import pprint import re import six class IssueLabelsOption(object): swagger_types = { 'labels': 'list[int]' } attribute_map = { 'labels': 'labels' } def __init__(self, labels=None): self._labels = None self.discriminator = None if labels is not None: ...
true
true
f72c52cdd198823444e5eba59c73f88ccbadef74
3,334
py
Python
benchmark/startCirq3299.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq3299.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq3299.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=45 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
37.044444
77
0.678164
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np from cirq.contrib.svg import SVGCircuit def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(c...
true
true
f72c52e95f901b6fd8527d85d0d774d80df5f455
842
py
Python
zeeguu/api/api/teacher_dashboard/student_words.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
8
2018-02-06T15:47:55.000Z
2021-05-26T15:24:49.000Z
zeeguu/api/api/teacher_dashboard/student_words.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
57
2018-02-02T19:54:38.000Z
2021-07-15T15:45:15.000Z
zeeguu/api/api/teacher_dashboard/student_words.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
13
2017-10-12T09:05:19.000Z
2020-02-19T09:38:01.000Z
import zeeguu.core from zeeguu.core.sql.learner.words import words_not_studied, learned_words from ._common_api_parameters import _get_student_cohort_and_period_from_POST_params from .. import api, json_result, with_session db = zeeguu.core.db @api.route("/student_words_not_studied", methods=["POST"]) @with_session ...
35.083333
88
0.800475
import zeeguu.core from zeeguu.core.sql.learner.words import words_not_studied, learned_words from ._common_api_parameters import _get_student_cohort_and_period_from_POST_params from .. import api, json_result, with_session db = zeeguu.core.db @api.route("/student_words_not_studied", methods=["POST"]) @with_session ...
true
true
f72c53192b9962222a935bcba714f77187770d13
186
py
Python
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
Reliability_Tests/ex78.py
dieterch/dReliaCalc
1e0a06e904f3a60527c3a6ae0f45c666a9b48128
[ "MIT" ]
null
null
null
from reliability.Reliability_testing import one_sample_proportion result = one_sample_proportion(trials=30, successes=29) print(result) ''' (0.8278305443665873, 0.9991564290733695) '''
23.25
65
0.817204
from reliability.Reliability_testing import one_sample_proportion result = one_sample_proportion(trials=30, successes=29) print(result)
true
true
f72c533b9f24bb347b96c3082d58404f5c3dff10
592
py
Python
examples/display_feed_example.py
UniquePassive/randcam
7c8dc977cfaf5eddb9b06f6280ab268526114d40
[ "Apache-2.0" ]
1
2018-06-04T04:10:06.000Z
2018-06-04T04:10:06.000Z
examples/display_feed_example.py
UniquePassive/randcam
7c8dc977cfaf5eddb9b06f6280ab268526114d40
[ "Apache-2.0" ]
null
null
null
examples/display_feed_example.py
UniquePassive/randcam
7c8dc977cfaf5eddb9b06f6280ab268526114d40
[ "Apache-2.0" ]
1
2018-06-04T04:10:07.000Z
2018-06-04T04:10:07.000Z
import cv2 import binascii from randcam import RandCam with RandCam(0, True) as rc: result, random = rc.seed() while True: result, image = rc.feed.read() cv2.imshow('Captured Image', image) key = cv2.waitKey(1) # 'S' key - reseed if key == ord('s'): ...
29.6
86
0.554054
import cv2 import binascii from randcam import RandCam with RandCam(0, True) as rc: result, random = rc.seed() while True: result, image = rc.feed.read() cv2.imshow('Captured Image', image) key = cv2.waitKey(1) if key == ord('s'): result, rando...
true
true
f72c534e1699dc5a2e1677045e0d3915c236a50b
12,873
py
Python
info_summary/get_summary_pdf.py
Dangaran/home_station_project
890b342e79e3dd493a8f418ed9283f0d444e5073
[ "CC0-1.0" ]
null
null
null
info_summary/get_summary_pdf.py
Dangaran/home_station_project
890b342e79e3dd493a8f418ed9283f0d444e5073
[ "CC0-1.0" ]
null
null
null
info_summary/get_summary_pdf.py
Dangaran/home_station_project
890b342e79e3dd493a8f418ed9283f0d444e5073
[ "CC0-1.0" ]
null
null
null
import requests import pandas as pd from plotnine import * import json import time from fpdf import FPDF from datetime import datetime # change pandas display options pd.options.display.max_columns = 101 pd.options.display.max_rows = 200 pd.options.display.precision = 7 # get aemet and home information last_day = { ...
45.487633
210
0.607395
import requests import pandas as pd from plotnine import * import json import time from fpdf import FPDF from datetime import datetime pd.options.display.max_columns = 101 pd.options.display.max_rows = 200 pd.options.display.precision = 7 last_day = { 'date_start': int(time.time()) - 86400, 'date_end': int(t...
true
true
f72c5491decdb5fc627448e653e80715d6890df3
473
py
Python
duck/FlyBehavior.py
rinman24/headfirst-python
1c6a12dc04475fae06e333a9abcdefee0bdda5d6
[ "MIT" ]
null
null
null
duck/FlyBehavior.py
rinman24/headfirst-python
1c6a12dc04475fae06e333a9abcdefee0bdda5d6
[ "MIT" ]
null
null
null
duck/FlyBehavior.py
rinman24/headfirst-python
1c6a12dc04475fae06e333a9abcdefee0bdda5d6
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod # abstract class class FlyBehavior(ABC): @staticmethod @abstractmethod def fly(): pass # Concrete implementations class FlyWithWings(FlyBehavior): @staticmethod def fly(): print("I'm flying!!") class FlyNoWay(FlyBehavior): @staticmethod ...
18.92
42
0.649049
from abc import ABC, abstractmethod class FlyBehavior(ABC): @staticmethod @abstractmethod def fly(): pass class FlyWithWings(FlyBehavior): @staticmethod def fly(): print("I'm flying!!") class FlyNoWay(FlyBehavior): @staticmethod def fly(): print("I can't fly.") cl...
true
true
f72c564b609e2ec63105a6116e9ade4a3f942eae
1,684
py
Python
api/chat_api/migrations/0001_create_message_model.py
gda2048/ChatAPI
6efab6fb5b9d1ff74b44075cd2d13cbb6cd06189
[ "MIT" ]
null
null
null
api/chat_api/migrations/0001_create_message_model.py
gda2048/ChatAPI
6efab6fb5b9d1ff74b44075cd2d13cbb6cd06189
[ "MIT" ]
5
2020-06-06T01:18:14.000Z
2021-06-10T19:45:08.000Z
api/chat_api/migrations/0001_create_message_model.py
gda2048/ChatAPI
6efab6fb5b9d1ff74b44075cd2d13cbb6cd06189
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2020-02-04 21:51 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
46.777778
190
0.64905
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f72c5744bbab84a804af1d39c17f0245e4c8220a
19,980
py
Python
Tools/python37/Lib/textwrap.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
207
2018-10-01T08:53:01.000Z
2022-03-14T12:15:54.000Z
Tools/python37/Lib/textwrap.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
8
2019-06-29T14:18:51.000Z
2022-02-19T07:30:27.000Z
Tools/python37/Lib/textwrap.py
xxroot/android_universal
af2d8627182f936383d792c1f775d87da50f2f6d
[ "MIT" ]
76
2020-03-16T01:47:46.000Z
2022-03-21T16:37:07.000Z
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten'] # Hardcode the recognized whitespace characters ...
41.026694
81
0.565716
import re __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten'] _whitespace = '\t\n\x0b\x0c\r ' class TextWrapper: unicode_whitespace_trans = {} uspace = ord(' ') for x in _whitespace: unicode_whitespace_trans[ord(x)] = uspace word...
true
true
f72c596ca53720016e67120b1a4e92b4a9a60f51
2,775
py
Python
training/utils/utils.py
Tbarkin121/Tensegrity_IsaacGym
0b6b5227e76b18396862c242a4e8e743248844b3
[ "MIT" ]
317
2021-09-08T01:28:49.000Z
2022-03-31T07:52:36.000Z
training/utils/utils.py
Tbarkin121/Tensegrity_IsaacGym
0b6b5227e76b18396862c242a4e8e743248844b3
[ "MIT" ]
24
2021-11-05T14:15:47.000Z
2022-03-31T11:58:18.000Z
training/utils/utils.py
Tbarkin121/Tensegrity_IsaacGym
0b6b5227e76b18396862c242a4e8e743248844b3
[ "MIT" ]
58
2021-10-31T07:15:43.000Z
2022-03-29T14:51:02.000Z
# Copyright (c) 2018-2021, NVIDIA Corporation # 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. Redistributions of source code must retain the above copyright notice, this # list of condit...
39.084507
91
0.728649
import numpy as np import torch import random import os def set_np_formatting(): np.set_printoptions(edgeitems=30, infstr='inf', linewidth=4000, nanstr='nan', precision=2, suppress=False, threshold=10000, formatter=None) def set_seed(seed, torch_deterministic=Fal...
true
true
f72c59b6c86d8d1a0d95172b56d5bdce1315051e
32,056
py
Python
scripts/automation/trex_control_plane/interactive/trex/console/trex_console.py
klement/trex-core
b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e
[ "Apache-2.0" ]
1
2020-09-06T00:58:34.000Z
2020-09-06T00:58:34.000Z
scripts/automation/trex_control_plane/interactive/trex/console/trex_console.py
klement/trex-core
b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/interactive/trex/console/trex_console.py
klement/trex-core
b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e
[ "Apache-2.0" ]
1
2021-09-13T13:43:10.000Z
2021-09-13T13:43:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dan Klein, Itay Marom Cisco Systems, Inc. Copyright (c) 2015-2015 Cisco Systems, 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://ww...
32.088088
153
0.551816
from __future__ import print_function import collections import subprocess import inspect import cmd import json import argparse import random import readline import string import os import sys import tty, termios from threading import Lock from functools import wraps, partial import threading import atexit import te...
true
true
f72c59dd8ce767d14399213927b2439b6c5d6359
5,582
bzl
Python
external_plugin_deps.bzl
davido/plugins_saml
a876ef94a1a2988882bca9665356dd90628a828e
[ "Apache-2.0" ]
null
null
null
external_plugin_deps.bzl
davido/plugins_saml
a876ef94a1a2988882bca9665356dd90628a828e
[ "Apache-2.0" ]
null
null
null
external_plugin_deps.bzl
davido/plugins_saml
a876ef94a1a2988882bca9665356dd90628a828e
[ "Apache-2.0" ]
null
null
null
load("//tools/bzl:maven_jar.bzl", "maven_jar") SHIBBOLETH = "https://build.shibboleth.net/nexus/content/repositories/releases/" OPENSAML_VERSION = "3.4.3" PAC4J_VERSION = "3.8.0" def external_plugin_deps(): # Transitive dependency of velocity maven_jar( name = "commons-collections", artifact...
30.67033
80
0.640989
load("//tools/bzl:maven_jar.bzl", "maven_jar") SHIBBOLETH = "https://build.shibboleth.net/nexus/content/repositories/releases/" OPENSAML_VERSION = "3.4.3" PAC4J_VERSION = "3.8.0" def external_plugin_deps(): maven_jar( name = "commons-collections", artifact = "commons-collections:commons-coll...
true
true
f72c5a8f517248059d2b01dd023847f9b1fa269d
2,726
py
Python
django_project/store_cms/settings/base.py
Chumbak/RetailstoreTV-Content-Player
ea26f14045c3d30a2e348abac4d0a0c8df171b4b
[ "Apache-2.0" ]
2
2017-08-31T10:35:47.000Z
2017-11-10T07:03:43.000Z
django_project/store_cms/settings/base.py
Chumbak/RetailstoreTV-Content-Player
ea26f14045c3d30a2e348abac4d0a0c8df171b4b
[ "Apache-2.0" ]
null
null
null
django_project/store_cms/settings/base.py
Chumbak/RetailstoreTV-Content-Player
ea26f14045c3d30a2e348abac4d0a0c8df171b4b
[ "Apache-2.0" ]
5
2017-08-31T09:53:12.000Z
2018-08-02T04:26:32.000Z
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ SECRET_KEY = os.environ['S...
25.240741
91
0.696992
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = bool(os.environ.get('DEBUG', False)) ALLOWED_HOSTS = [] DJANGO_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.se...
true
true
f72c5b38b7252471247fc6364be4f544e55a623c
1,047
py
Python
Day_23/car_manager.py
johnsons-ux/100-days-of-python
59f8f5b1be85542306103df44383423b00e48931
[ "CC0-1.0" ]
1
2022-03-12T07:17:56.000Z
2022-03-12T07:17:56.000Z
Day_23/car_manager.py
johnsons-ux/100-days-of-python
59f8f5b1be85542306103df44383423b00e48931
[ "CC0-1.0" ]
null
null
null
Day_23/car_manager.py
johnsons-ux/100-days-of-python
59f8f5b1be85542306103df44383423b00e48931
[ "CC0-1.0" ]
null
null
null
from turtle import Turtle import random COLORS = ['red', 'orange', 'yellow', 'green', 'blue', 'purple'] STARTING_MOVE_DISTANCE = 5 MOVE_INCREMENT = 10 class CarManager: def __init__(self): self.all_cars = [] self.car_speed = STARTING_MOVE_DISTANCE def create_car(self): random_chance...
30.794118
115
0.619866
from turtle import Turtle import random COLORS = ['red', 'orange', 'yellow', 'green', 'blue', 'purple'] STARTING_MOVE_DISTANCE = 5 MOVE_INCREMENT = 10 class CarManager: def __init__(self): self.all_cars = [] self.car_speed = STARTING_MOVE_DISTANCE def create_car(self): random_chance...
true
true
f72c5ca5cbb2721d967ad9ef9dfa896f7ccce240
2,924
py
Python
tensorflow/python/estimator/canned/optimizers.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
522
2016-06-08T02:15:50.000Z
2022-03-02T05:30:36.000Z
tensorflow/python/estimator/canned/optimizers.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/python/estimator/canned/optimizers.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
108
2016-06-16T15:34:05.000Z
2022-03-12T13:23:11.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.012658
80
0.719904
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from tensorflow.python.training import adagrad from tensorflow.python.training import adam from tensorflow.python.training import ftrl from tensorflow.python.training import gradient_descent from ...
true
true
f72c5d1dce32355c3989c67add71367d80276cc4
6,188
py
Python
code/common/preprocessing.py
monperrus/iFixR
5548f3ba91341dc9e73057269f8c01a0b1b6fc68
[ "MIT" ]
8
2019-07-23T15:03:50.000Z
2021-02-08T11:06:53.000Z
code/common/preprocessing.py
monperrus/iFixR
5548f3ba91341dc9e73057269f8c01a0b1b6fc68
[ "MIT" ]
null
null
null
code/common/preprocessing.py
monperrus/iFixR
5548f3ba91341dc9e73057269f8c01a0b1b6fc68
[ "MIT" ]
4
2019-09-19T08:23:46.000Z
2021-03-05T13:57:40.000Z
from nltk.tokenize import RegexpTokenizer # from stop_words import get_stop_words from nltk.stem.porter import PorterStemmer from string import punctuation import re from nltk.corpus import stopwords en_stop = stopwords.words('english') from nltk.corpus import wordnet import html from common.commons import * CODE_PATH...
26.672414
139
0.609082
from nltk.tokenize import RegexpTokenizer from nltk.stem.porter import PorterStemmer from string import punctuation import re from nltk.corpus import stopwords en_stop = stopwords.words('english') from nltk.corpus import wordnet import html from common.commons import * CODE_PATH = os.environ["CODE_PATH"] import spacy...
true
true
f72c5e0a7a2455dfd966067814f820b39b4646a1
8,806
py
Python
src/main/resources/pytz/zoneinfo/America/Moncton.py
TheEin/swagger-maven-plugin
cf93dce2d5c8d3534f4cf8c612b11e2d2313871b
[ "Apache-2.0" ]
65
2015-11-14T13:46:01.000Z
2021-08-14T05:54:04.000Z
lib/pytz/zoneinfo/America/Moncton.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
13
2016-03-31T20:00:17.000Z
2021-08-20T14:52:31.000Z
lib/pytz/zoneinfo/America/Moncton.py
tjsavage/polymer-dashboard
19bc467f1206613f8eec646b6f2bc43cc319ef75
[ "CNRI-Python", "Linux-OpenIB" ]
20
2015-03-18T08:41:37.000Z
2020-12-18T02:58:30.000Z
'''tzinfo timezone information for America/Moncton.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Moncton(DstTzInfo): '''America/Moncton timezone definition. See datetime.tzinfo for details''' zone = 'America/Moncton' ...
20.337182
78
0.563479
from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Moncton(DstTzInfo): zone = 'America/Moncton' _utc_transition_times = [ d(1,1,1,0,0,0), d(1902,6,15,5,0,0), d(1918,4,14,6,0,0), d(1918,10,31,5,0,0), d(1933,6,11,5,0,0), d(1933,...
true
true
f72c5ecb4c2bda8417b9edf7a53fca157ea84580
397
py
Python
ReefberryPi/wsgi.py
reefberrypi/reefberrypi
f1e9977e8f56b402ef4d231ba8d4cdd0e469db42
[ "MIT" ]
null
null
null
ReefberryPi/wsgi.py
reefberrypi/reefberrypi
f1e9977e8f56b402ef4d231ba8d4cdd0e469db42
[ "MIT" ]
null
null
null
ReefberryPi/wsgi.py
reefberrypi/reefberrypi
f1e9977e8f56b402ef4d231ba8d4cdd0e469db42
[ "MIT" ]
null
null
null
""" WSGI config for ReefberryPi project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ReefberryPi.settings") from djang...
26.466667
78
0.793451
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ReefberryPi.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
true
true
f72c5ef7f4210f6058725bdb8a177f76f278f6d9
3,669
py
Python
quetz/tests/test_workers.py
beenje/quetz
1c9e5827e81f7ea89e7a0efc4c855ef63577a028
[ "BSD-3-Clause" ]
null
null
null
quetz/tests/test_workers.py
beenje/quetz
1c9e5827e81f7ea89e7a0efc4c855ef63577a028
[ "BSD-3-Clause" ]
null
null
null
quetz/tests/test_workers.py
beenje/quetz
1c9e5827e81f7ea89e7a0efc4c855ef63577a028
[ "BSD-3-Clause" ]
null
null
null
import os import socket from contextlib import closing import pytest import requests from fastapi import BackgroundTasks from quetz.authorization import Rules from quetz.dao import Dao from quetz.db_models import User from quetz.tasks.workers import RQManager, SubprocessWorker, ThreadingWorker @pytest.fixture def s...
21.086207
87
0.696648
import os import socket from contextlib import closing import pytest import requests from fastapi import BackgroundTasks from quetz.authorization import Rules from quetz.dao import Dao from quetz.db_models import User from quetz.tasks.workers import RQManager, SubprocessWorker, ThreadingWorker @pytest.fixture def s...
true
true
f72c5f1f4d6cd6f6582fcd1e96aee59135e0c5f7
14,438
py
Python
grr/lib/lexer.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
grr/lib/lexer.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
grr/lib/lexer.py
nexus-lab/relf-server
d46774799c20376691c38f9293f454a3aff3ccb3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """An LL(1) lexer. This lexer is very tolerant of errors and can resync.""" import logging import re from grr.lib import utils class Token(object): """A token action.""" state_regex = None def __init__(self, state_regex, regex, actions, next_state, flags=re.I): """Constructor. ...
28.991968
80
0.626333
import logging import re from grr.lib import utils class Token(object): state_regex = None def __init__(self, state_regex, regex, actions, next_state, flags=re.I): if state_regex: self.state_regex = re.compile(state_regex, re.DOTALL | re.M | re.S | re.U | flags)...
true
true
f72c5f21b10b223a9ba7876395cff13950f436cd
5,375
py
Python
hw2skeleton/k_means.py
egilbertson-ucsf/algHW2
eec0f4e42e27d4c7633cc907d6f523285fadd79c
[ "Apache-2.0" ]
1
2022-02-07T21:00:46.000Z
2022-02-07T21:00:46.000Z
hw2skeleton/k_means.py
egilbertson-ucsf/algHW2
eec0f4e42e27d4c7633cc907d6f523285fadd79c
[ "Apache-2.0" ]
null
null
null
hw2skeleton/k_means.py
egilbertson-ucsf/algHW2
eec0f4e42e27d4c7633cc907d6f523285fadd79c
[ "Apache-2.0" ]
null
null
null
from hw2skeleton import cluster as cl from hw2skeleton import io import sklearn.metrics as sk import os import pandas as pd import numpy as np import math aa3 = "ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR".split() aa_df = pd.DataFrame(0, index=list(aa3), columns=['Count']) def cal...
31.25
101
0.661767
from hw2skeleton import cluster as cl from hw2skeleton import io import sklearn.metrics as sk import os import pandas as pd import numpy as np import math aa3 = "ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR".split() aa_df = pd.DataFrame(0, index=list(aa3), columns=['Count']) def cal...
true
true
f72c5fd356bc70a6fedc8a393b6f0f7e3a5126db
3,817
py
Python
zester/client.py
Rahul09123/zester
e878ba5ce66156a642bc7513a69dc4175f9393be
[ "ISC" ]
10
2015-10-17T16:12:30.000Z
2021-12-09T04:08:47.000Z
zester/client.py
Rahul09123/zester
e878ba5ce66156a642bc7513a69dc4175f9393be
[ "ISC" ]
null
null
null
zester/client.py
Rahul09123/zester
e878ba5ce66156a642bc7513a69dc4175f9393be
[ "ISC" ]
2
2020-05-05T04:04:28.000Z
2020-09-30T14:19:16.000Z
from collections import namedtuple import inspect import os from ghost import Ghost class Client(object): def __init__(self, url=None): if url: self.url = url assert self.url, "All clients must have a URL attribute" self._attributes = self._collect_attributes() self._c...
34.387387
78
0.637674
from collections import namedtuple import inspect import os from ghost import Ghost class Client(object): def __init__(self, url=None): if url: self.url = url assert self.url, "All clients must have a URL attribute" self._attributes = self._collect_attributes() self._c...
true
true
f72c603dfc8ecbd5f63c67e5d3ff1d9b9f2bae6b
662
py
Python
rotateMatrix90/rotMat90.py
lowylow/InterviewQuestions
e267a601ff336b0a2a581db4ae985283a29fed51
[ "MIT" ]
null
null
null
rotateMatrix90/rotMat90.py
lowylow/InterviewQuestions
e267a601ff336b0a2a581db4ae985283a29fed51
[ "MIT" ]
null
null
null
rotateMatrix90/rotMat90.py
lowylow/InterviewQuestions
e267a601ff336b0a2a581db4ae985283a29fed51
[ "MIT" ]
null
null
null
def rotate90acw(matrix): outMatrix = [] for x in range(len(matrix)): outArray = [] for y in range(len(matrix)): outArray.append(matrix[len(matrix)-1-y][len(matrix)-1-x]) outMatrix.append(outArray[::-1]) return outMatrix def rotate90cw(matrix): ...
23.642857
70
0.5
def rotate90acw(matrix): outMatrix = [] for x in range(len(matrix)): outArray = [] for y in range(len(matrix)): outArray.append(matrix[len(matrix)-1-y][len(matrix)-1-x]) outMatrix.append(outArray[::-1]) return outMatrix def rotate90cw(matrix): ...
true
true
f72c60682595bfbd3fa6b5191c70b2cc02dd5f4c
36,930
py
Python
tests/hwsim/test_owe.py
cschuber/hostap
b26f5c0fe35cd0472ea43f533b981ac2d91cdf1f
[ "Unlicense" ]
21
2018-11-25T17:42:48.000Z
2021-12-17T11:04:56.000Z
tests/hwsim/test_owe.py
cschuber/hostap
b26f5c0fe35cd0472ea43f533b981ac2d91cdf1f
[ "Unlicense" ]
3
2017-08-11T16:48:19.000Z
2020-03-10T21:18:17.000Z
tests/hwsim/test_owe.py
cschuber/hostap
b26f5c0fe35cd0472ea43f533b981ac2d91cdf1f
[ "Unlicense" ]
18
2015-03-11T07:09:31.000Z
2022-03-25T08:29:18.000Z
# Test cases for Opportunistic Wireless Encryption (OWE) # Copyright (c) 2017, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import binascii import logging logger = logging.getLogger() import time import os import struct import hostapd ...
38.710692
115
0.616951
import binascii import logging logger = logging.getLogger() import time import os import struct import hostapd from wpasupplicant import WpaSupplicant import hwsim_utils from tshark import run_tshark from utils import HwsimSkip, fail_test, alloc_fail, wait_fail_trigger from test_ap_acs import wait_acs def test_owe(d...
true
true
f72c6125a11e0ae38fd3d3c079c6d6047cfb6b22
2,373
py
Python
backend/alembic/env.py
jflad17/pilot_logbook
f75c9866d073c33d001ae2d0eb0994496eb49045
[ "MIT" ]
1
2022-03-25T23:41:37.000Z
2022-03-25T23:41:37.000Z
backend/alembic/env.py
jflad17/pilot_logbook
f75c9866d073c33d001ae2d0eb0994496eb49045
[ "MIT" ]
null
null
null
backend/alembic/env.py
jflad17/pilot_logbook
f75c9866d073c33d001ae2d0eb0994496eb49045
[ "MIT" ]
null
null
null
from logging.config import fileConfig from sqlalchemy import engine_from_config from sqlalchemy import pool from models import * from db.base import Base from core.config import settings from alembic import context from models import * # this is the Alembic Config object, which provides # access to the values within t...
27.275862
74
0.714286
from logging.config import fileConfig from sqlalchemy import engine_from_config from sqlalchemy import pool from models import * from db.base import Base from core.config import settings from alembic import context from models import * config = context.config fileConfig(config.config_file_name) # for 'autogenerate' ...
true
true
f72c61450c801c44dc77e1b98289e540685b544a
1,343
py
Python
bootleg/embeddings/word_embeddings/base_word_emb.py
mleszczy/bootleg
162d74001cdfbbe146753393641d549e0328acb1
[ "Apache-2.0" ]
1
2021-01-11T18:40:09.000Z
2021-01-11T18:40:09.000Z
bootleg/embeddings/word_embeddings/base_word_emb.py
mleszczy/bootleg
162d74001cdfbbe146753393641d549e0328acb1
[ "Apache-2.0" ]
null
null
null
bootleg/embeddings/word_embeddings/base_word_emb.py
mleszczy/bootleg
162d74001cdfbbe146753393641d549e0328acb1
[ "Apache-2.0" ]
null
null
null
"""Base word embedding""" import torch import torch.nn as nn import os from bootleg.utils import logging_utils class BaseWordEmbedding(nn.Module): """ Base word embedding class. We split the word embedding from the sentence encoder, similar to BERT. Attributes: pad_id: id of the pad word index ...
32.756098
138
0.684289
import torch import torch.nn as nn import os from bootleg.utils import logging_utils class BaseWordEmbedding(nn.Module): def __init__(self, args, main_args, word_symbols): super(BaseWordEmbedding, self).__init__() self.logger = logging_utils.get_logger(main_args) self._key = "word" ...
true
true
f72c63c7014f8654c874d4b6bc686d7d1259981c
1,815
py
Python
exampleapp/view1/views.py
thomasjiangcy/django-rest-mock
09e91de20d1a5efd5c47c6e3d7fe979443012e2c
[ "MIT" ]
9
2018-03-05T12:45:07.000Z
2021-11-15T15:22:18.000Z
exampleapp/view1/views.py
thomasjiangcy/django-rest-mock
09e91de20d1a5efd5c47c6e3d7fe979443012e2c
[ "MIT" ]
null
null
null
exampleapp/view1/views.py
thomasjiangcy/django-rest-mock
09e91de20d1a5efd5c47c6e3d7fe979443012e2c
[ "MIT" ]
null
null
null
from rest_framework import generics, views from rest_framework.response import Response class SomeView(views.APIView): """ URL: /api/someview """ def get(self, request, *args, **kwargs): """ ``` { "success": "Hello, world!" } ``` """ ...
21.86747
84
0.406061
from rest_framework import generics, views from rest_framework.response import Response class SomeView(views.APIView): def get(self, request, *args, **kwargs): pass class ResourceListView(generics.ListCreateAPIView): def post(self, request, *args, **kwargs): pass class ResourceView(gener...
true
true
f72c64df1da4e00b9d299b8a5608883b2530e2c8
7,812
py
Python
scons/scons-local-4.1.0/SCons/Tool/mingw.py
vishalbelsare/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
[ "BSD-2-Clause" ]
null
null
null
scons/scons-local-4.1.0/SCons/Tool/mingw.py
vishalbelsare/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
[ "BSD-2-Clause" ]
null
null
null
scons/scons-local-4.1.0/SCons/Tool/mingw.py
vishalbelsare/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
[ "BSD-2-Clause" ]
null
null
null
# MIT License # # Copyright The SCons Foundation # # 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, merge, ...
36.166667
110
0.670123
import os import os.path import glob import SCons.Action import SCons.Builder import SCons.Defaults import SCons.Tool import SCons.Util mingw_paths = [ r'c:\MinGW\bin', r'C:\cygwin64\bin', r'C:\msys64', r'C:\msys64\mingw64\bin', r'C:\cygwin\bin', r'C:\msys', r'C:\ProgramData\chocolatey\l...
true
true
f72c66e743146c7a5b70a5440e9ab5459f10245b
6,426
py
Python
Lib/site-packages/pyparsing/actions.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1
2020-10-05T05:38:26.000Z
2020-10-05T05:38:26.000Z
Lib/site-packages/pyparsing/actions.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/pyparsing/actions.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
# actions.py from .exceptions import ParseException from .util import col class OnlyOnce: """ Wrapper for parse actions, to ensure they are only called once. """ def __init__(self, method_call): from .core import _trim_arity self.callable = _trim_arity(method_call) self.call...
30.894231
122
0.613601
from .exceptions import ParseException from .util import col class OnlyOnce: def __init__(self, method_call): from .core import _trim_arity self.callable = _trim_arity(method_call) self.called = False def __call__(self, s, l, t): if not self.called: results = se...
true
true
f72c68b5184364eaf2b32e9631fcdb1b88247b70
702
py
Python
setup.py
luk036/ellpy
07fe4377a18ae9b38be9ad34eceb701f26873607
[ "MIT" ]
7
2019-01-01T00:30:03.000Z
2021-07-11T12:54:46.000Z
setup.py
luk036/ellpy
07fe4377a18ae9b38be9ad34eceb701f26873607
[ "MIT" ]
1
2018-06-03T09:01:26.000Z
2018-06-03T09:01:26.000Z
setup.py
luk036/ellpy
07fe4377a18ae9b38be9ad34eceb701f26873607
[ "MIT" ]
1
2018-06-03T08:59:05.000Z
2018-06-03T08:59:05.000Z
""" Setup file for ellpy. Use setup.cfg to configure your project. This file was generated with PyScaffold 4.0.2. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: https://pyscaffold.org/ """ from setuptools import setup if __name__ == "__main__": try: ...
31.909091
77
0.638177
from setuptools import setup if __name__ == "__main__": try: setup(use_scm_version={"version_scheme": "no-guess-dev"}) except: print( "\n\nAn error occurred while building the project, " "please ensure you have the most updated version of setuptools, " "setu...
true
true
f72c692cf8cf1539d1b99caf1dd1a442c8da420c
7,899
py
Python
lib/modeling/keypoint_rcnn_heads.py
skokec/detectron-villard
9e420bf3fb75a8f06f6e3fd970fc2600d8969d10
[ "Apache-2.0" ]
287
2018-12-23T08:31:09.000Z
2022-02-27T14:52:21.000Z
lib/modeling/keypoint_rcnn_heads.py
absorbguo/Detectron
2f8161edc3092b0382cab535c977a180a8b3cc4d
[ "Apache-2.0" ]
54
2018-12-26T13:04:32.000Z
2020-04-24T04:09:30.000Z
lib/modeling/keypoint_rcnn_heads.py
absorbguo/Detectron
2f8161edc3092b0382cab535c977a180a8b3cc4d
[ "Apache-2.0" ]
96
2018-12-24T05:12:36.000Z
2021-04-23T15:51:21.000Z
# Copyright (c) 2017-present, Facebook, 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...
36.233945
80
0.617547
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from core.config import cfg from utils.c2 import const_fill from utils.c2 import gauss_fill import modeling.ResNet as ResNet import utils.blob as blob_utils def add_...
true
true
f72c69bd895eea56254b314d4418757ffc5e1cbe
1,266
py
Python
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
4
2019-01-04T21:11:03.000Z
2020-12-11T16:56:15.000Z
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
null
null
null
Scripts/Legacy/line1prep.py
rhong3/CPTAC-UCEC
ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9
[ "MIT" ]
null
null
null
import pandas as pd labels = pd.read_csv('../Fusion_dummy_His_MUT_joined.csv', header=0) # line = pd.read_csv('../../Line1.csv', header=0) line = pd.read_csv('../EC_cyclin_expression.csv', header=0) # line['name'] = line['Proteomics_Participant_ID'] # line = line.drop(['Proteomics_Participant_ID', 'Histologic_type', ...
48.692308
109
0.671406
import pandas as pd labels = pd.read_csv('../Fusion_dummy_His_MUT_joined.csv', header=0) line = pd.read_csv('../EC_cyclin_expression.csv', header=0) line['name'] = line['Sample_ID'].str.slice(start=0, stop=9) line = line.drop(['Sample_ID', 'Genomic_subtype'], axis=1) labels = labels.join(line.set_index('name'), on=...
true
true
f72c6a4e0c25397651cfa6ffd566d94b400550f8
87,446
py
Python
Lib/zipfile.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
Lib/zipfile.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
Lib/zipfile.py
fochoao/CPython
c92e0770af558fe3e440e44d3605c3acaf3c5b68
[ "TCL", "0BSD" ]
null
null
null
""" Read and write ZIP files. XXX references to utf-8 need further investigation. """ import binascii import importlib.util import io import itertools import os import posixpath import shutil import stat import struct import sys import threading import time import contextlib try: import zlib # We may need its com...
35.897373
102
0.569471
import binascii import importlib.util import io import itertools import os import posixpath import shutil import stat import struct import sys import threading import time import contextlib try: import zlib crc32 = zlib.crc32 except ImportError: zlib = None crc32 = binascii.crc32 try: import bz2 e...
true
true
f72c6a5b0a88709c33bc15b7b8f421bdb28239fe
806
py
Python
Scripts/bulk_image_download.py
POSCON-United-Kingdom/UK-Radar-Data
6a020b03fbfeffe9f7eb53e4b4559de48134e351
[ "Apache-2.0" ]
2
2022-01-15T14:01:36.000Z
2022-01-15T22:54:40.000Z
Scripts/bulk_image_download.py
POSCON-United-Kingdom/UK-Radar-Data
6a020b03fbfeffe9f7eb53e4b4559de48134e351
[ "Apache-2.0" ]
null
null
null
Scripts/bulk_image_download.py
POSCON-United-Kingdom/UK-Radar-Data
6a020b03fbfeffe9f7eb53e4b4559de48134e351
[ "Apache-2.0" ]
null
null
null
import re import requests import urllib.request import urllib3 from bs4 import BeautifulSoup print('Beginning file download with urllib2...') url = "https://www.aurora.nats.co.uk/htmlAIP/Publications/2020-04-09/html/eSUP/EG-eSUP-2020-017-en-GB.html" """Parse the given table into a beautifulsoup object""" count = 0 ht...
29.851852
107
0.69727
import re import requests import urllib.request import urllib3 from bs4 import BeautifulSoup print('Beginning file download with urllib2...') url = "https://www.aurora.nats.co.uk/htmlAIP/Publications/2020-04-09/html/eSUP/EG-eSUP-2020-017-en-GB.html" count = 0 http = urllib3.PoolManager() error = http.request("GET", u...
true
true
f72c6be17e996073ee98833c5d3263506ac82ca5
987
py
Python
test/unit/sorting/test_wordle_solver.py
bestpersonyes2/algorithms
4225b3ebcdcbd29c80abe0b086d986875526dfcc
[ "MIT" ]
null
null
null
test/unit/sorting/test_wordle_solver.py
bestpersonyes2/algorithms
4225b3ebcdcbd29c80abe0b086d986875526dfcc
[ "MIT" ]
null
null
null
test/unit/sorting/test_wordle_solver.py
bestpersonyes2/algorithms
4225b3ebcdcbd29c80abe0b086d986875526dfcc
[ "MIT" ]
null
null
null
import os from algorithms.sorting.wordle_solver import _read_file, get_best_guess, get_most_common def test_get_most_common(): file_data = _read_file(os.path.join('algorithms', 'assets', 'wordle_answer_list.json')) most_common_start, most_common_letters, possible_words = get_most_common(file_data) asser...
32.9
98
0.749747
import os from algorithms.sorting.wordle_solver import _read_file, get_best_guess, get_most_common def test_get_most_common(): file_data = _read_file(os.path.join('algorithms', 'assets', 'wordle_answer_list.json')) most_common_start, most_common_letters, possible_words = get_most_common(file_data) asser...
true
true
f72c6c14815e59ace61d84641f721f81f31b67ac
8,156
py
Python
sentence_transformers/datasets/SentenceLabelDataset.py
dd-dos/sentence-transformers
8f9c36b788e15141f723d80fea67ed16785cd18e
[ "Apache-2.0" ]
31
2021-04-06T16:20:30.000Z
2022-02-16T08:29:24.000Z
sentence_transformers/datasets/SentenceLabelDataset.py
dd-dos/sentence-transformers
8f9c36b788e15141f723d80fea67ed16785cd18e
[ "Apache-2.0" ]
5
2021-07-02T04:37:04.000Z
2021-07-21T00:02:58.000Z
sentence_transformers/datasets/SentenceLabelDataset.py
dd-dos/sentence-transformers
8f9c36b788e15141f723d80fea67ed16785cd18e
[ "Apache-2.0" ]
5
2021-04-07T08:35:06.000Z
2022-03-08T08:33:05.000Z
from torch.utils.data import Dataset from typing import List import bisect import torch import logging import numpy as np from tqdm import tqdm from .. import SentenceTransformer from ..readers.InputExample import InputExample from multiprocessing import Pool, cpu_count import multiprocessing class SentenceLabelDatase...
44.086486
161
0.676067
from torch.utils.data import Dataset from typing import List import bisect import torch import logging import numpy as np from tqdm import tqdm from .. import SentenceTransformer from ..readers.InputExample import InputExample from multiprocessing import Pool, cpu_count import multiprocessing class SentenceLabelDatase...
true
true
f72c6cbe53ce184511d53967dee75da42ddc4cbb
11,828
py
Python
main_multi.py
erfanMhi/Cooperative-Coevolution-Transfer-Optimization
e75b7930bd8b55a160668b1039ac154a0d0270d7
[ "MIT" ]
3
2019-08-04T18:37:58.000Z
2020-08-16T13:01:40.000Z
main_multi.py
erfanMhi/Cooperative-Coevolution-Transfer-Optimization
e75b7930bd8b55a160668b1039ac154a0d0270d7
[ "MIT" ]
null
null
null
main_multi.py
erfanMhi/Cooperative-Coevolution-Transfer-Optimization
e75b7930bd8b55a160668b1039ac154a0d0270d7
[ "MIT" ]
null
null
null
import argparse import os import queue import multiprocessing as mp # import SharedArray as sa import numpy as np from copy import deepcopy from time import time from pprint import pprint from utils.data_manipulators import * from evolution.operators import * from to.probabilistic_model import ProbabilisticModel fr...
34.086455
179
0.633581
import argparse import os import queue import multiprocessing as mp import numpy as np from copy import deepcopy from time import time from pprint import pprint from utils.data_manipulators import * from evolution.operators import * from to.probabilistic_model import ProbabilisticModel from to.mixture_model import ...
true
true
f72c6d1c6f29288f9f93496e8adfb3d17d94900b
291
py
Python
orb_simulator/other_language/testing_ast/Div.py
dmguezjaviersnet/IA-Sim-Comp-Project
8165b9546efc45f98091a3774e2dae4f45942048
[ "MIT" ]
1
2022-01-19T22:49:09.000Z
2022-01-19T22:49:09.000Z
orb_simulator/other_language/testing_ast/Div.py
dmguezjaviersnet/IA-Sim-Comp-Project
8165b9546efc45f98091a3774e2dae4f45942048
[ "MIT" ]
15
2021-11-10T14:25:02.000Z
2022-02-12T19:17:11.000Z
orb_simulator/other_language/testing_ast/Div.py
dmguezjaviersnet/IA-Sim-Comp-Project
8165b9546efc45f98091a3774e2dae4f45942048
[ "MIT" ]
null
null
null
from other_language.testing_ast.BinaryExpression import * class Div(BinaryExpression): def __init__(self, left: Expression, right: Expression): super().__init__(left, right) def eval(self): self.left.eval() // self.right.eval()
19.4
60
0.608247
from other_language.testing_ast.BinaryExpression import * class Div(BinaryExpression): def __init__(self, left: Expression, right: Expression): super().__init__(left, right) def eval(self): self.left.eval() // self.right.eval()
true
true
f72c6dc05c0249cca7efdc46371d16e808b21190
7,782
py
Python
tests/dataset.py
Juan0001/yellowbrick-docs-zh
36275d9704fc2a946c5bec5f802106bb5281efd1
[ "Apache-2.0" ]
20
2018-03-24T02:29:20.000Z
2022-03-03T05:01:40.000Z
tests/dataset.py
Juan0001/yellowbrick-docs-zh
36275d9704fc2a946c5bec5f802106bb5281efd1
[ "Apache-2.0" ]
4
2018-03-20T12:01:17.000Z
2019-04-07T16:02:19.000Z
tests/dataset.py
Juan0001/yellowbrick-docs-zh
36275d9704fc2a946c5bec5f802106bb5281efd1
[ "Apache-2.0" ]
5
2018-03-17T08:18:57.000Z
2019-11-15T02:20:20.000Z
# tests.dataset # Helper functions for tests that utilize downloadable datasets. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Thu Oct 13 19:55:53 2016 -0400 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: dataset.py [8f4de77] benjamin@bengfort...
34.741071
88
0.585582
import os import shutil import hashlib import zipfile import numpy as np from sklearn.datasets.base import Bunch try: import requests except ImportError: requests = None DATASETS = { 'concrete': { 'url': 'https://s3.amazonaws.com/ddl-data-lake/yellowbrick/concrete.zip', 'signature': ...
true
true
f72c705b69032d729b976d015ba6742b4d314c78
17,180
py
Python
src/olympia/files/tests/test_file_viewer.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_file_viewer.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_file_viewer.py
shashwatsingh/addons-server
8fce98901104349055a828b5a47865f5e8f4120b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import mimetypes import os import shutil import zipfile from django import forms from django.conf import settings from django.core.cache import cache from django.core.files.storage import default_storage as storage import pytest from freezegun import freeze_time from unittest.mock import Mock...
35.349794
79
0.626659
import mimetypes import os import shutil import zipfile from django import forms from django.conf import settings from django.core.cache import cache from django.core.files.storage import default_storage as storage import pytest from freezegun import freeze_time from unittest.mock import Mock, patch from olympia im...
true
true
f72c7105b40a75a34bc96103e54bc62ef812eb03
4,785
py
Python
rapvis/rapvis_process.py
liuwell/rapvis
a69d06a31b1d7fe4510c1c90bfeee22b68a9b3b9
[ "MIT" ]
1
2020-10-25T10:23:45.000Z
2020-10-25T10:23:45.000Z
rapvis/rapvis_process.py
liuwell/rapvis
a69d06a31b1d7fe4510c1c90bfeee22b68a9b3b9
[ "MIT" ]
null
null
null
rapvis/rapvis_process.py
liuwell/rapvis
a69d06a31b1d7fe4510c1c90bfeee22b68a9b3b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import glob import argparse import numpy as np import subprocess import os import time import sys #from rapvis_merge import merge_profiles, merge_gene_counts #from rapvis_gene_dis import gene_dis #from rapvis_quality import rRNAratio from rapvis_general import current_time import rapvis_rRNA d...
47.376238
366
0.708255
import glob import argparse import numpy as np import subprocess import os import time import sys from rapvis_general import current_time import rapvis_rRNA def process2(R1, R2, output, adapter, threads, libpath, mapper, minlen, trim5, counts, rRNA): file_name = R1.split("/")[-1].split("_")[0] outdir = os.path.jo...
true
true
f72c731f3e730de450ee248c0486bff1226a032a
322
py
Python
bin/gen-nfs-fstab.py
french-tries/auto-distro
bd2fccd7862f97b0f91e742b3c53af045b0a4475
[ "MIT" ]
null
null
null
bin/gen-nfs-fstab.py
french-tries/auto-distro
bd2fccd7862f97b0f91e742b3c53af045b0a4475
[ "MIT" ]
null
null
null
bin/gen-nfs-fstab.py
french-tries/auto-distro
bd2fccd7862f97b0f91e742b3c53af045b0a4475
[ "MIT" ]
null
null
null
import os import configuration output = '/etc/fstab' with open(output, mode='a') as fstab: fstab.write('\n\n') for entry in configuration.nfs_entries: os.makedirs(entry[1], exist_ok=True) fstab.write(entry[0].ljust(50) + entry[1].ljust(40) + 'nfs'.ljust(10) + 'noauto'.ljust(30) + '0 0\n') ...
24.769231
109
0.630435
import os import configuration output = '/etc/fstab' with open(output, mode='a') as fstab: fstab.write('\n\n') for entry in configuration.nfs_entries: os.makedirs(entry[1], exist_ok=True) fstab.write(entry[0].ljust(50) + entry[1].ljust(40) + 'nfs'.ljust(10) + 'noauto'.ljust(30) + '0 0\n') ...
true
true
f72c73488e94790062a1acf9156e490fc7770946
7,753
py
Python
sdk/python/pulumi_azure_native/datalakeanalytics/compute_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/datalakeanalytics/compute_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/datalakeanalytics/compute_policy.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
47.564417
601
0.665549
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ._enums import * __all__ = ['ComputePolicy'] class ComputePolicy(pulumi.CustomResource): def __init__(__self__, resource_name: str, ...
true
true
f72c7352f5956d525aae8e8f597fdae21fe13578
547
py
Python
examples/get_server_info.py
edvinerikson/frostbite-rcon-utils
089e1a59b7fcd72b8d8d3153fb396cfd8d4869f3
[ "MIT" ]
7
2016-10-10T08:21:15.000Z
2022-03-12T23:45:24.000Z
examples/get_server_info.py
EdvinErikson/frostbite-rcon-utils
089e1a59b7fcd72b8d8d3153fb396cfd8d4869f3
[ "MIT" ]
2
2016-02-18T16:11:48.000Z
2016-02-18T17:24:14.000Z
examples/get_server_info.py
EdvinErikson/frostbite-rcon-utils
089e1a59b7fcd72b8d8d3153fb396cfd8d4869f3
[ "MIT" ]
2
2016-02-17T22:14:47.000Z
2016-08-13T01:52:32.000Z
import socket from frostbite_rcon_utils import create_packet, encode_packet, decode_packet, contains_complete_packet connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM) connection.settimeout(1) connection.connect(('188.126.64.4', 47215)) connection.setblocking(1) packet_to_send = encode_packet(create_pac...
30.388889
102
0.8117
import socket from frostbite_rcon_utils import create_packet, encode_packet, decode_packet, contains_complete_packet connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM) connection.settimeout(1) connection.connect(('188.126.64.4', 47215)) connection.setblocking(1) packet_to_send = encode_packet(create_pac...
true
true
f72c73592fff23ee5fe753971e6446fe835d7fc5
1,158
py
Python
sympy/strategies/branch/tests/test_traverse.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2016-02-22T22:46:50.000Z
2016-02-22T22:46:50.000Z
sympy/strategies/branch/tests/test_traverse.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
7
2017-05-01T14:15:32.000Z
2017-09-06T20:44:24.000Z
sympy/strategies/branch/tests/test_traverse.py
ovolve/sympy
0a15782f20505673466b940454b33b8014a25c13
[ "BSD-3-Clause" ]
1
2020-09-09T15:20:27.000Z
2020-09-09T15:20:27.000Z
from sympy import Basic from sympy.strategies.branch.traverse import top_down, sall from sympy.strategies.branch.core import do_one, identity def inc(x): if isinstance(x, int): yield x + 1 def test_top_down_easy(): expr = Basic(1, 2) expected = Basic(2, 3) brl = top_down(inc) assert s...
24.638298
66
0.58981
from sympy import Basic from sympy.strategies.branch.traverse import top_down, sall from sympy.strategies.branch.core import do_one, identity def inc(x): if isinstance(x, int): yield x + 1 def test_top_down_easy(): expr = Basic(1, 2) expected = Basic(2, 3) brl = top_down(inc) assert s...
true
true
f72c73b22f0837188e5fc58d0e9f23032e5dba90
2,695
py
Python
data/p4VQE/R4/benchmark/startQiskit_QC277.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_QC277.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startQiskit_QC277.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=15 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
28.072917
118
0.636735
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test....
true
true
f72c757fb6a92103d778c73856fcee6786544a37
6,342
py
Python
test/test_conventions.py
takluyver/xray
80c30ae343a2171c541da0387fed3926004030a7
[ "Apache-2.0" ]
null
null
null
test/test_conventions.py
takluyver/xray
80c30ae343a2171c541da0387fed3926004030a7
[ "Apache-2.0" ]
null
null
null
test/test_conventions.py
takluyver/xray
80c30ae343a2171c541da0387fed3926004030a7
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd from datetime import datetime import warnings from xray import conventions from . import TestCase, requires_netCDF4 class TestMaskedAndScaledArray(TestCase): def test(self): x = conventions.MaskedAndScaledArray(np.arange(3), fill_value=0) self.assertEqual(x....
46.291971
88
0.564018
import numpy as np import pandas as pd from datetime import datetime import warnings from xray import conventions from . import TestCase, requires_netCDF4 class TestMaskedAndScaledArray(TestCase): def test(self): x = conventions.MaskedAndScaledArray(np.arange(3), fill_value=0) self.assertEqual(x....
true
true
f72c7674672d02999eb1ca6e63915c7fe5ac8ab5
57
py
Python
Exp2/Strategy/StrategyManager.py
inventivejon/INPROLA-Python
8aab11a868b37a64c46e6287bf358b5b05673a28
[ "Apache-2.0" ]
null
null
null
Exp2/Strategy/StrategyManager.py
inventivejon/INPROLA-Python
8aab11a868b37a64c46e6287bf358b5b05673a28
[ "Apache-2.0" ]
null
null
null
Exp2/Strategy/StrategyManager.py
inventivejon/INPROLA-Python
8aab11a868b37a64c46e6287bf358b5b05673a28
[ "Apache-2.0" ]
null
null
null
class StrategyManager(): def __init__(): pass
19
24
0.614035
class StrategyManager(): def __init__(): pass
true
true
f72c7888070e1278b4c5a0b55319ce31c0795378
23,442
py
Python
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/sympy/printing/octave.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/sympy/printing/octave.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
null
null
null
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/sympy/printing/octave.py
MobileAnalytics/iPython-Framework
da0e598308c067cd5c5290a6364b3ffaf2d2418f
[ "MIT" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
""" Octave (and Matlab) code printer The `OctaveCodePrinter` converts SymPy expressions into Octave expressions. It uses a subset of the Octave language for Matlab compatibility. A complete code generator, which uses `octave_code` extensively, can be found in `sympy.utilities.codegen`. The `codegen` module can be us...
35.789313
80
0.569533
from __future__ import print_function, division from sympy.core import Mul, Pow, S, Rational from sympy.core.compatibility import string_types, range from sympy.core.mul import _keep_coeff from sympy.codegen.ast import Assignment from sympy.printing.codeprinter import CodePrinter from sympy.printing.precedence import ...
true
true
f72c79f3f9a9af03ac560d30164899d30e36c861
692
py
Python
src/examples/animations/AnimationGif.py
Gabvaztor/tensorflowCode
e206ea4544552b87c2d43274cea3182f6b385a87
[ "Apache-2.0" ]
4
2019-12-14T08:06:18.000Z
2020-09-12T10:09:31.000Z
src/examples/animations/AnimationGif.py
Gabvaztor/tensorflowCode
e206ea4544552b87c2d43274cea3182f6b385a87
[ "Apache-2.0" ]
null
null
null
src/examples/animations/AnimationGif.py
Gabvaztor/tensorflowCode
e206ea4544552b87c2d43274cea3182f6b385a87
[ "Apache-2.0" ]
2
2020-09-12T10:10:07.000Z
2021-09-15T11:58:37.000Z
#IMPORTAMOS LIBRERIAS. import numpy as np import matplotlib.pyplot as plt import animatplot as amp #INTRODUCIMOS DATOS. x = np.linspace(0, 1, 50) t = np.linspace(0, 1, 20) X, T = np.meshgrid(x, t) Y = np.zeros(int(51*(X+T))) #CREAMOS OBJETO "timeline". timeline = amp.Timeline(t, units='s', fps=60) #GENERAMOS ANIMA...
20.352941
67
0.710983
import numpy as np import matplotlib.pyplot as plt import animatplot as amp x = np.linspace(0, 1, 50) t = np.linspace(0, 1, 20) X, T = np.meshgrid(x, t) Y = np.zeros(int(51*(X+T))) timeline = amp.Timeline(t, units='s', fps=60) block = amp.blocks.Line(X, Y, marker=".", linestyle="-", color="r") anim = amp.Animation...
true
true
f72c7b00779b23f24e5f6b86d0f4c382d11780f4
4,931
py
Python
sdks/python/apache_beam/runners/worker/log_handler.py
dxichen/beam
d02b859cb37e3c9f565785e93384905f1078b409
[ "Apache-2.0", "BSD-3-Clause" ]
2
2018-12-08T05:19:04.000Z
2018-12-08T05:19:07.000Z
sdks/python/apache_beam/runners/worker/log_handler.py
dxichen/beam
d02b859cb37e3c9f565785e93384905f1078b409
[ "Apache-2.0", "BSD-3-Clause" ]
10
2016-03-21T22:50:43.000Z
2016-07-12T16:59:21.000Z
sdks/python/apache_beam/runners/worker/log_handler.py
swegner/incubator-beam
5466ac0b8819625b1d0ada3577c1fc103797f9a2
[ "Apache-2.0", "BSD-3-Clause" ]
1
2018-11-23T11:49:03.000Z
2018-11-23T11:49:03.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
35.47482
80
0.724599
from __future__ import absolute_import from __future__ import print_function import logging import math import queue import sys import threading from builtins import range import grpc from apache_beam.portability.api import beam_fn_api_pb2 from apache_beam.portability.api import beam_fn_api_pb2_grpc from apache_bea...
true
true
f72c7bed0beea334637a18a2edf4a3137820bc39
6,213
py
Python
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# 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 ...
47.792308
242
0.652503
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class PercentileSourceTargetOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._ser...
true
true
f72c7c71e236df55dac3c772bf1accd371c155c5
586
py
Python
python/sdssdb/__init__.py
albireox/sdssdb
02d165d3a4347e8241aacdbdca0cec86058c8d29
[ "BSD-3-Clause" ]
6
2019-04-10T21:28:44.000Z
2021-03-01T18:39:55.000Z
python/sdssdb/__init__.py
albireox/sdssdb
02d165d3a4347e8241aacdbdca0cec86058c8d29
[ "BSD-3-Clause" ]
44
2018-10-31T17:48:20.000Z
2022-01-27T20:52:26.000Z
python/sdssdb/__init__.py
albireox/sdssdb
02d165d3a4347e8241aacdbdca0cec86058c8d29
[ "BSD-3-Clause" ]
2
2021-07-13T17:09:43.000Z
2021-07-13T19:33:18.000Z
# encoding: utf-8 import warnings from sdsstools import get_config, get_logger, get_package_version warnings.filterwarnings( 'ignore', '.*Skipped unsupported reflection of expression-based index .*q3c.*') NAME = 'sdssdb' __version__ = get_package_version(path=__file__, package_name=NAME) log = get_logger(NA...
24.416667
83
0.776451
import warnings from sdsstools import get_config, get_logger, get_package_version warnings.filterwarnings( 'ignore', '.*Skipped unsupported reflection of expression-based index .*q3c.*') NAME = 'sdssdb' __version__ = get_package_version(path=__file__, package_name=NAME) log = get_logger(NAME) config = get_...
true
true
f72c7c8922dfe217f75499b4645d20bbcc563d6b
768
py
Python
saltapi/loader.py
techdragon/salt-api
e1ea6dd89bca61a7b8e885efcbc818faea33ea51
[ "Apache-2.0" ]
1
2019-06-27T13:05:14.000Z
2019-06-27T13:05:14.000Z
saltapi/loader.py
techdragon/salt-api
e1ea6dd89bca61a7b8e885efcbc818faea33ea51
[ "Apache-2.0" ]
null
null
null
saltapi/loader.py
techdragon/salt-api
e1ea6dd89bca61a7b8e885efcbc818faea33ea51
[ "Apache-2.0" ]
null
null
null
''' The salt api module loader interface ''' # Import python libs import os # Import Salt libs import salt.loader import saltapi def netapi(opts): ''' Return the network api functions ''' load = salt.loader._create_loader( opts, 'netapi', 'netapi', base...
20.756757
71
0.580729
import os import salt.loader import saltapi def netapi(opts): load = salt.loader._create_loader( opts, 'netapi', 'netapi', base_path=os.path.dirname(saltapi.__file__) ) return load.gen_functions() def runner(opts): load = salt.loader._create_lo...
true
true
f72c7ca68f363a382646aaf1c7a8b8116abf92d5
51,548
py
Python
Lib/test/test_compile.py
emontnemery/cpython
99fcf1505218464c489d419d4500f126b6d6dc28
[ "0BSD" ]
18
2017-09-21T18:22:31.000Z
2022-02-22T19:40:01.000Z
Lib/test/test_compile.py
emontnemery/cpython
99fcf1505218464c489d419d4500f126b6d6dc28
[ "0BSD" ]
25
2020-04-16T17:21:30.000Z
2022-03-01T05:00:45.000Z
Lib/test/test_compile.py
emontnemery/cpython
99fcf1505218464c489d419d4500f126b6d6dc28
[ "0BSD" ]
8
2018-08-31T07:49:21.000Z
2020-11-21T21:31:48.000Z
import dis import math import os import unittest import sys import ast import _ast import tempfile import types import textwrap from test import support from test.support import script_helper, requires_debug_ranges from test.support.os_helper import FakePath class TestSpecifics(unittest.TestCase): def compile_si...
34.782726
95
0.536122
import dis import math import os import unittest import sys import ast import _ast import tempfile import types import textwrap from test import support from test.support import script_helper, requires_debug_ranges from test.support.os_helper import FakePath class TestSpecifics(unittest.TestCase): def compile_si...
true
true
f72c7e77f2ce593a9f65d35942b6d6d6225b5155
1,001
py
Python
audiovisual_stream.py
yagguc/deep_impression
ad45d6640cdb46ff68dd44d8055b53ac57f3d342
[ "MIT" ]
36
2016-11-10T08:05:08.000Z
2022-03-25T12:55:55.000Z
audiovisual_stream.py
yagguc/deep_impression
ad45d6640cdb46ff68dd44d8055b53ac57f3d342
[ "MIT" ]
5
2018-01-04T02:03:21.000Z
2022-03-13T13:04:56.000Z
audiovisual_stream.py
yagguc/deep_impression
ad45d6640cdb46ff68dd44d8055b53ac57f3d342
[ "MIT" ]
24
2016-09-26T01:41:31.000Z
2022-03-07T08:16:58.000Z
import auditory_stream import chainer import visual_stream ### MODEL ### class ResNet18(chainer.Chain): def __init__(self): super(ResNet18, self).__init__( aud = auditory_stream.ResNet18(), vis = visual_stream.ResNet18(), fc = chainer.links.Linear(512, 5, initialW = chai...
41.708333
212
0.621379
import auditory_stream import chainer import visual_stream class ResNet18(chainer.Chain): def __init__(self): super(ResNet18, self).__init__( aud = auditory_stream.ResNet18(), vis = visual_stream.ResNet18(), fc = chainer.links.Linear(512, 5, initialW = chainer.initialize...
true
true