hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
a6b94cef82a627df04c84937f9c36f847cd8a358
534
py
Python
facebook_sdk/constants.py
zetahernandez/facebook-py-sdk
ab41452b884592f3330336d173fe99491979e1b8
[ "MIT" ]
17
2017-09-29T20:14:36.000Z
2018-12-19T19:57:01.000Z
facebook_sdk/constants.py
zetahernandez/facebook-py-sdk
ab41452b884592f3330336d173fe99491979e1b8
[ "MIT" ]
18
2017-10-10T14:20:31.000Z
2020-10-15T17:06:50.000Z
facebook_sdk/constants.py
zetahernandez/facebook-py-sdk
ab41452b884592f3330336d173fe99491979e1b8
[ "MIT" ]
10
2017-10-31T22:59:49.000Z
2021-09-08T11:22:16.000Z
BASE_GRAPH_URL = 'https://graph.facebook.com' BASE_AUTHORIZATION_URL = 'https://www.facebook.com' GRAPH_VERSION_V2_5 = 'v2.5' GRAPH_VERSION_V2_6 = 'v2.6' GRAPH_VERSION_V2_7 = 'v2.7' GRAPH_VERSION_V2_8 = 'v2.8' GRAPH_VERSION_V2_9 = 'v2.9' GRAPH_VERSION_V2_10 = 'v2.10' GRAPH_VERSION_V2_11 = 'v2.11' GRAPH_VERSION_V2_12 =...
24.272727
51
0.754682
BASE_GRAPH_URL = 'https://graph.facebook.com' BASE_AUTHORIZATION_URL = 'https://www.facebook.com' GRAPH_VERSION_V2_5 = 'v2.5' GRAPH_VERSION_V2_6 = 'v2.6' GRAPH_VERSION_V2_7 = 'v2.7' GRAPH_VERSION_V2_8 = 'v2.8' GRAPH_VERSION_V2_9 = 'v2.9' GRAPH_VERSION_V2_10 = 'v2.10' GRAPH_VERSION_V2_11 = 'v2.11' GRAPH_VERSION_V2_12 =...
0
0
0
97656c44c6efd1260688e2504da0149385039b77
4,988
py
Python
train_dtp.py
lnsndn/neural-word-search
cae82593a546590ff272b6062004d66dd2497337
[ "MIT" ]
5
2018-12-15T00:02:05.000Z
2021-07-06T14:40:32.000Z
train_dtp.py
lnsndn/neural-word-search
cae82593a546590ff272b6062004d66dd2497337
[ "MIT" ]
4
2019-07-31T15:43:41.000Z
2022-03-09T09:57:48.000Z
train_dtp.py
lnsndn/neural-word-search
cae82593a546590ff272b6062004d66dd2497337
[ "MIT" ]
7
2019-01-04T10:50:20.000Z
2022-01-18T18:03:01.000Z
import warnings warnings.filterwarnings("ignore") import os import json import easydict import time import torch from misc.dataloader import DataLoader import torch.optim as optim import misc.datasets as datasets import ctrlfnet_model_dtp as ctrlf from misc.h5_dataset import H5Dataset from train_opts import parse_args...
30.790123
111
0.65838
import warnings warnings.filterwarnings("ignore") import os import json import easydict import time import torch from misc.dataloader import DataLoader import torch.optim as optim import misc.datasets as datasets import ctrlfnet_model_dtp as ctrlf from misc.h5_dataset import H5Dataset from train_opts import parse_args...
0
0
0
8684acb247e85075aa50f50171da10a5939759a9
1,043
py
Python
Chapter10/mandelbrot_ctypes.py
gyf135/Hands-On-GPU-Programming-with-Python-and-CUDA
4fbd14d3a9fbc68305ffaa16490221b1ef49a934
[ "MIT" ]
164
2018-11-25T19:03:58.000Z
2022-03-30T12:02:40.000Z
Chapter10/mandelbrot_ctypes.py
gyf135/Hands-On-GPU-Programming-with-Python-and-CUDA
4fbd14d3a9fbc68305ffaa16490221b1ef49a934
[ "MIT" ]
2
2020-05-16T19:25:23.000Z
2021-06-24T15:29:56.000Z
Chapter10/mandelbrot_ctypes.py
gyf135/Hands-On-GPU-Programming-with-Python-and-CUDA
4fbd14d3a9fbc68305ffaa16490221b1ef49a934
[ "MIT" ]
89
2018-11-29T12:44:26.000Z
2022-03-03T04:56:01.000Z
from __future__ import division from time import time import matplotlib from matplotlib import pyplot as plt import numpy as np from ctypes import * # Linux users: change the filename below to './mandelbrot.so' mandel_dll = CDLL('./mandelbrot.dll') mandel_c = mandel_dll.launch_mandelbrot mandel_c.argtypes = [POINTER(c...
27.447368
156
0.705657
from __future__ import division from time import time import matplotlib from matplotlib import pyplot as plt import numpy as np from ctypes import * # Linux users: change the filename below to './mandelbrot.so' mandel_dll = CDLL('./mandelbrot.dll') mandel_c = mandel_dll.launch_mandelbrot mandel_c.argtypes = [POINTER(c...
352
0
23
c074b4532136d0952920ebc3ea17b89e1c9e86fe
4,241
py
Python
igor/std-plugins/ca/igorplugin.py
cwi-dis/igor
1d973731a8e9378c8609401fe9fd5be963b54233
[ "MIT" ]
5
2017-09-05T12:13:50.000Z
2020-07-15T15:12:08.000Z
igor/std-plugins/ca/igorplugin.py
cwi-dis/igor
1d973731a8e9378c8609401fe9fd5be963b54233
[ "MIT" ]
75
2017-05-22T13:19:58.000Z
2021-01-25T00:22:12.000Z
igor/std-plugins/ca/igorplugin.py
cwi-dis/igor
1d973731a8e9378c8609401fe9fd5be963b54233
[ "MIT" ]
3
2017-06-11T19:50:41.000Z
2019-04-29T13:30:59.000Z
import json import igorCA import os import sys import tempfile import urllib DEBUG=False
37.866071
178
0.618486
import json import igorCA import os import sys import tempfile import urllib DEBUG=False class CAPlugin: def __init__(self, igor, pluginData): self.igor = igor self.ca = None self.caServerUrl = pluginData.get('ca') def initCA(self): if self.ca: return self.ca =...
3,702
-6
449
8a4e73ba3400822aae8cc18de0cacf63e102fbb5
3,493
py
Python
19_blastomatic/solution3_pandas.py
ilaydabozan/biofx_python
b7bef85dcf0b0a9e049f10a0766b9da20bf676c7
[ "MIT" ]
74
2020-12-18T16:04:31.000Z
2022-03-02T09:05:54.000Z
19_blastomatic/solution3_pandas.py
ilaydabozan/biofx_python
b7bef85dcf0b0a9e049f10a0766b9da20bf676c7
[ "MIT" ]
6
2021-06-30T19:42:04.000Z
2022-02-07T04:45:31.000Z
19_blastomatic/solution3_pandas.py
ilaydabozan/biofx_python
b7bef85dcf0b0a9e049f10a0766b9da20bf676c7
[ "MIT" ]
169
2020-11-06T19:44:36.000Z
2022-03-30T08:38:42.000Z
#!/usr/bin/env python3 """ Annotate BLAST output """ import argparse import pandas as pd import os from typing import NamedTuple, TextIO class Args(NamedTuple): """ Command-line arguments """ hits: TextIO annotations: TextIO outfile: TextIO delimiter: str pctid: float # --------------------...
30.640351
79
0.442599
#!/usr/bin/env python3 """ Annotate BLAST output """ import argparse import pandas as pd import os from typing import NamedTuple, TextIO class Args(NamedTuple): """ Command-line arguments """ hits: TextIO annotations: TextIO outfile: TextIO delimiter: str pctid: float # --------------------...
0
0
0
a6521ff210264e8d0cd6c6236416f25a7b2ea2f9
2,385
py
Python
echopype/convert/convert.py
emiliom/echopype
3665faeb251d4db4bd8e1dfe05f41942c86f10ea
[ "Apache-2.0" ]
null
null
null
echopype/convert/convert.py
emiliom/echopype
3665faeb251d4db4bd8e1dfe05f41942c86f10ea
[ "Apache-2.0" ]
null
null
null
echopype/convert/convert.py
emiliom/echopype
3665faeb251d4db4bd8e1dfe05f41942c86f10ea
[ "Apache-2.0" ]
null
null
null
""" This file provides a wrapper for the convert objects and functions. Users will not need to know the names of the specific objects they need to create. """ import os from echopype.convert.azfp import ConvertAZFP from echopype.convert.ek60 import ConvertEK60
39.098361
109
0.607128
""" This file provides a wrapper for the convert objects and functions. Users will not need to know the names of the specific objects they need to create. """ import os from echopype.convert.azfp import ConvertAZFP from echopype.convert.ek60 import ConvertEK60 class Convert: def __new__(cls, path='', xml_path='')...
0
2,100
23
86fcd9bd06f46da62a3b3763f7736ab6a9c8ff6a
200
py
Python
src/sylenium/helper/_filesystem_helper.py
symonk/browzer
4d9ee5adba6819d787357247da69b5429af9cde1
[ "MIT" ]
6
2018-07-25T09:14:08.000Z
2020-12-18T21:25:28.000Z
src/sylenium/helper/_filesystem_helper.py
symonk/sylenium
4d9ee5adba6819d787357247da69b5429af9cde1
[ "MIT" ]
32
2018-07-23T19:34:27.000Z
2020-11-18T01:38:42.000Z
src/sylenium/helper/_filesystem_helper.py
symonk/browzer
4d9ee5adba6819d787357247da69b5429af9cde1
[ "MIT" ]
3
2018-10-10T07:43:55.000Z
2020-01-10T21:50:24.000Z
import pathlib def does_file_exist(path_to_file: str) -> bool: """ Performs a simple exists check on a given file path """ path = pathlib.Path(path_to_file) return path.exists()
20
55
0.675
import pathlib def does_file_exist(path_to_file: str) -> bool: """ Performs a simple exists check on a given file path """ path = pathlib.Path(path_to_file) return path.exists()
0
0
0
2f5cb5ebfe13e26f81d8752aef7ba96356b7b2ba
2,224
py
Python
slack-bot/app.py
rapid7/alcide-github-actions
527ca967441fe3b4602f0f411fdd8b89877e04ea
[ "MIT" ]
null
null
null
slack-bot/app.py
rapid7/alcide-github-actions
527ca967441fe3b4602f0f411fdd8b89877e04ea
[ "MIT" ]
null
null
null
slack-bot/app.py
rapid7/alcide-github-actions
527ca967441fe3b4602f0f411fdd8b89877e04ea
[ "MIT" ]
1
2022-03-23T19:38:38.000Z
2022-03-23T19:38:38.000Z
import os from slack_sdk import WebClient from slack_sdk.errors import SlackApiError token=os.environ['token'] channel=os.environ['channel'] header=os.environ['header'] pre_message=os.environ['pre_message'] message=os.environ['message'] post_message=os.environ['post_message'] actor=os.environ['actor'] release=os.envir...
25.860465
78
0.42491
import os from slack_sdk import WebClient from slack_sdk.errors import SlackApiError token=os.environ['token'] channel=os.environ['channel'] header=os.environ['header'] pre_message=os.environ['pre_message'] message=os.environ['message'] post_message=os.environ['post_message'] actor=os.environ['actor'] release=os.envir...
0
0
0
11c05e8758fb0f8afb9345dabfa5b5692215485a
118
py
Python
tests/data/addons/addon_success/tests/test_success.py
OCA/oca-ci
9eff1d7235a52bde738b6ed1503e766a38f6dd70
[ "MIT" ]
8
2021-04-25T13:20:17.000Z
2022-02-25T01:22:14.000Z
tests/data/addons/addon_success/tests/test_success.py
enigmista91/oca-ci
c45bf299bed93dcf89a2d24c030ab81e729cb57f
[ "MIT" ]
8
2021-08-31T15:28:37.000Z
2022-03-13T17:46:56.000Z
tests/data/addons/addon_success/tests/test_success.py
enigmista91/oca-ci
c45bf299bed93dcf89a2d24c030ab81e729cb57f
[ "MIT" ]
5
2021-04-25T19:10:26.000Z
2022-03-24T21:00:13.000Z
from odoo.tests.common import TransactionCase
16.857143
45
0.737288
from odoo.tests.common import TransactionCase class Test(TransactionCase): def test_success(self): pass
15
7
49
cb8a9ee76940cfbe1fd57da3582d246bbc92f52a
3,866
py
Python
ophthalmology/models/heads.py
LaurenzBeck/ophthalmology
4648e74e7ae997582d835555fb81a67cf861dcc1
[ "MIT" ]
4
2022-01-16T17:00:49.000Z
2022-03-31T09:24:19.000Z
ophthalmology/models/heads.py
LaurenzBeck/ophthalmology
4648e74e7ae997582d835555fb81a67cf861dcc1
[ "MIT" ]
null
null
null
ophthalmology/models/heads.py
LaurenzBeck/ophthalmology
4648e74e7ae997582d835555fb81a67cf861dcc1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """## Task-specific heads Different heads that expect their inputs to be flattened. """ from collections import OrderedDict from typing import List, Optional import torch.nn as nn import torch.nn.functional as F from ophthalmology.layers import activations
34.212389
115
0.54656
# -*- coding: utf-8 -*- """## Task-specific heads Different heads that expect their inputs to be flattened. """ from collections import OrderedDict from typing import List, Optional import torch.nn as nn import torch.nn.functional as F from ophthalmology.layers import activations class MultilayerHe...
188
3,328
48
c517b82b69d1346a5efbd9c857d25ef318f0b9c8
4,538
py
Python
provis/utils/__init__.py
czirjakkethz/provis
f442205e0a9e6c6c780eb0c00803af51755d44dd
[ "Apache-2.0" ]
3
2021-12-08T22:37:48.000Z
2022-01-11T15:15:54.000Z
provis/utils/__init__.py
czirjakkethz/provis
f442205e0a9e6c6c780eb0c00803af51755d44dd
[ "Apache-2.0" ]
null
null
null
provis/utils/__init__.py
czirjakkethz/provis
f442205e0a9e6c6c780eb0c00803af51755d44dd
[ "Apache-2.0" ]
null
null
null
import argparse import numpy as np import os from Bio.PDB import PDBParser, Selection parser = PDBParser() # RADII for atoms in explicit case. RADII = {} RADII["N"] = "1.540000" RADII["O"] = "1.400000" RADII["C"] = "1.740000" RADII["H"] = "1.200000" RADII["S"] = "1.800000" RADII["P"] = "1.800000" RADII["Z"] = "1.39" ...
24.663043
79
0.64015
import argparse import numpy as np import os from Bio.PDB import PDBParser, Selection parser = PDBParser() # RADII for atoms in explicit case. RADII = {} RADII["N"] = "1.540000" RADII["O"] = "1.400000" RADII["C"] = "1.740000" RADII["H"] = "1.200000" RADII["S"] = "1.800000" RADII["P"] = "1.800000" RADII["Z"] = "1.39" ...
410
0
23
af2a2709e2e18e9e7f7e321fcb2d07855fe5b2cc
447
py
Python
src/course/migrations/0009_course_summary.py
sacids/acdc-el
ffaeee2fcd1ba7c7daf4b15cf2203295b70c09e5
[ "MIT" ]
null
null
null
src/course/migrations/0009_course_summary.py
sacids/acdc-el
ffaeee2fcd1ba7c7daf4b15cf2203295b70c09e5
[ "MIT" ]
4
2021-06-08T22:09:55.000Z
2022-03-12T00:44:10.000Z
src/course/migrations/0009_course_summary.py
sacids/acdc-el
ffaeee2fcd1ba7c7daf4b15cf2203295b70c09e5
[ "MIT" ]
null
null
null
# Generated by Django 2.0.9 on 2020-07-24 07:52 from django.db import migrations, models
22.35
77
0.606264
# Generated by Django 2.0.9 on 2020-07-24 07:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0008_auto_20200724_0717'), ] operations = [ migrations.AddField( model_name='course', name='summary', ...
0
333
23
78c9a990d66d75157be9f16f796bfbf10e895b0a
295
py
Python
bot/util/enums.py
dead-beef/telegram-bot
3abe33e179ddc65093ec55a4fb53d64d948d4e86
[ "MIT" ]
null
null
null
bot/util/enums.py
dead-beef/telegram-bot
3abe33e179ddc65093ec55a4fb53d64d948d4e86
[ "MIT" ]
null
null
null
bot/util/enums.py
dead-beef/telegram-bot
3abe33e179ddc65093ec55a4fb53d64d948d4e86
[ "MIT" ]
null
null
null
import enum
14.75
32
0.60678
import enum class Permission(enum.IntEnum): IGNORED = -2 BANNED = -1 USER = 0 USER_2 = 1 ADMIN = 255 ROOT = 256 class CommandType(enum.IntEnum): NONE = 0 REPLY_TEXT = 1 REPLY_STICKER = 2 GET_OPTIONS = 3 SET_OPTION = 4 REPLY_TEXT_PAGINATED = 5
0
235
46
0428e6ea8b7d37ab7939174584641388a6b49043
3,337
py
Python
src/digitizer/canvas_draw.py
magonzal/CSMJobe
87b873e3448071b9e9a5732c1ec52a7f6f4bc960
[ "MIT" ]
null
null
null
src/digitizer/canvas_draw.py
magonzal/CSMJobe
87b873e3448071b9e9a5732c1ec52a7f6f4bc960
[ "MIT" ]
4
2021-03-19T01:57:14.000Z
2022-03-11T23:53:05.000Z
src/digitizer/canvas_draw.py
magonzal/CSMJobe
87b873e3448071b9e9a5732c1ec52a7f6f4bc960
[ "MIT" ]
null
null
null
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction, QFileDialog import sys from PyQt5.QtGui import QImage, QPainter, QPen from PyQt5.QtCore import Qt, QPoint if __name__ == "__main__": app = QApplication(sys.argv) window = Window() window.show() app.exec()
30.063063
124
0.625712
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction, QFileDialog import sys from PyQt5.QtGui import QImage, QPainter, QPen from PyQt5.QtCore import Qt, QPoint class Window(QMainWindow): def __init__(self): super().__init__() top = 400 left = 400 width = 800 he...
2,854
5
185
e6843e8c809f8c8fbf6545cc3eb19e2004ca240a
20,283
py
Python
astropy/convolution/tests/test_kernel_class.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
null
null
null
astropy/convolution/tests/test_kernel_class.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
2
2016-11-30T20:31:42.000Z
2016-12-02T23:50:10.000Z
astropy/convolution/tests/test_kernel_class.py
guntbert/astropy
f2d2add09e5b1638b2698f19a4d46fcca19e82be
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst import itertools import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_allclose from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import ( Gaussian1DKernel, Gaussian2DKe...
36.611913
108
0.624365
# Licensed under a 3-clause BSD style license - see LICENSE.rst import itertools import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_allclose from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import ( Gaussian1DKernel, Gaussian2DKe...
760
0
26
2f3951c4ff177d54f1fe4c26689995c77d9575f0
13,089
py
Python
mlem/hype.py
tlby/rnd-html
66239829d262bf83a7f4dd1b2968e0c14a7543e8
[ "MIT" ]
1
2021-09-01T10:39:05.000Z
2021-09-01T10:39:05.000Z
mlem/hype.py
tlby/rnd-html
66239829d262bf83a7f4dd1b2968e0c14a7543e8
[ "MIT" ]
null
null
null
mlem/hype.py
tlby/rnd-html
66239829d262bf83a7f4dd1b2968e0c14a7543e8
[ "MIT" ]
null
null
null
import contextlib import itertools import json import os import pathlib import shutil import sys import typing import datasets import numpy import ray.tune import transformers from . import metric from . import tok from . import train class TailScheduler(ray.tune.schedulers.trial_scheduler.FIFOScheduler): ''' T...
41.031348
91
0.597219
import contextlib import itertools import json import os import pathlib import shutil import sys import typing import datasets import numpy import ray.tune import transformers from . import metric from . import tok from . import train class TailScheduler(ray.tune.schedulers.trial_scheduler.FIFOScheduler): ''' T...
8,690
56
589
dfba30065a5a2e18aec5ac97bf1f35aa4ad5b532
428
py
Python
project/tests/kernel_test.py
arkravitz/CLNN
01d77c2da9418cbf92a63c1d7e27446c8a51a45a
[ "MIT" ]
null
null
null
project/tests/kernel_test.py
arkravitz/CLNN
01d77c2da9418cbf92a63c1d7e27446c8a51a45a
[ "MIT" ]
null
null
null
project/tests/kernel_test.py
arkravitz/CLNN
01d77c2da9418cbf92a63c1d7e27446c8a51a45a
[ "MIT" ]
null
null
null
import unittest import numpy as np from lib import Kernel
20.380952
55
0.642523
import unittest import numpy as np from lib import Kernel class TestKernelOps(unittest.TestCase): def setUp(self): self.kernel = Kernel() def test_add(self): a = np.random.rand(50000).astype(np.float32) b = np.random.rand(50000).astype(np.float32) sum_gpu = self.kernel.sum(a...
274
18
76
eed150cea8d8cc14e4e707364618e2738e45cf7f
359
py
Python
exercises/practice/darts/.meta/example.py
samr1ddh1/python-1
8998d30bb0d6665dd233354670f21c4d11c2f1a0
[ "MIT" ]
1,177
2017-06-21T20:24:06.000Z
2022-03-29T02:30:55.000Z
exercises/practice/darts/.meta/example.py
samr1ddh1/python-1
8998d30bb0d6665dd233354670f21c4d11c2f1a0
[ "MIT" ]
1,890
2017-06-18T20:06:10.000Z
2022-03-31T18:35:51.000Z
exercises/practice/darts/.meta/example.py
samr1ddh1/python-1
8998d30bb0d6665dd233354670f21c4d11c2f1a0
[ "MIT" ]
1,095
2017-06-26T23:06:19.000Z
2022-03-29T03:25:38.000Z
from math import sqrt # X, and Y variable names against [pylint]: C0104, but is the same as the stub, advise not to change this.
23.933333
106
0.601671
from math import sqrt # X, and Y variable names against [pylint]: C0104, but is the same as the stub, advise not to change this. def score(x, y): dart_location = sqrt(x * x + y * y) if dart_location <= 1.0: return 10 elif dart_location <= 5.0: return 5 elif dart_location <= 10.0: ...
207
0
22
7e7837359fb10b6c29fffd94ffb552dcc18ee3d0
4,426
py
Python
kme/models/tabular_nets.py
phineasng/FLAN
84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9
[ "Apache-2.0" ]
null
null
null
kme/models/tabular_nets.py
phineasng/FLAN
84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9
[ "Apache-2.0" ]
null
null
null
kme/models/tabular_nets.py
phineasng/FLAN
84c0fb7ea57d5730eb19fdaa25d705a4ec7490c9
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn from kme.models.base import FeatureNetBase class RiskFeatNet1(FeatureNetBase): """ Simple network for risk score datasets """ class SmallTabFeatNet1(FeatureNetBase): """ Simple network for risk score datasets """ class SmallTabFeatNet2(FeatureNetBase): ...
36.578512
107
0.599413
import torch from torch import nn from kme.models.base import FeatureNetBase class RiskFeatNet1(FeatureNetBase): """ Simple network for risk score datasets """ def __init__(self, n_feats, latent_dim, device='cpu'): super(RiskFeatNet1, self).__init__() self._hidden_sz = 64 self....
3,707
0
212
d9be3572d7e803358eec7d2a525f2fbbaccad773
1,999
py
Python
pages/predictions.py
geraldm24/Sherrif-Sale
0332146d0b7d069dcf1f1ee574c75870f6d95962
[ "MIT" ]
null
null
null
pages/predictions.py
geraldm24/Sherrif-Sale
0332146d0b7d069dcf1f1ee574c75870f6d95962
[ "MIT" ]
null
null
null
pages/predictions.py
geraldm24/Sherrif-Sale
0332146d0b7d069dcf1f1ee574c75870f6d95962
[ "MIT" ]
null
null
null
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output # Imports from this application from app import app # 2 column layout. 1st column width = 4/12 # https://dash-bootst...
29.835821
105
0.565283
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output # Imports from this application from app import app # 2 column layout. 1st column width = 4/12 # https://dash-bootst...
312
0
22
522c1b3143648ec771e92b1c9ef79cc1e16c0474
8,719
py
Python
processor/processor.py
maxingan2412/CIL-ReID
0307ca57a5da9cfcb30fc3810469b0a953c77bfb
[ "MIT" ]
58
2021-09-02T13:09:57.000Z
2022-03-20T06:44:56.000Z
processor/processor.py
maxingan2412/CIL-ReID
0307ca57a5da9cfcb30fc3810469b0a953c77bfb
[ "MIT" ]
5
2021-11-19T06:38:43.000Z
2022-03-31T13:48:11.000Z
processor/processor.py
maxingan2412/CIL-ReID
0307ca57a5da9cfcb30fc3810469b0a953c77bfb
[ "MIT" ]
12
2021-11-03T21:32:12.000Z
2022-03-19T07:55:08.000Z
import logging import os import time import torch import torch.nn as nn from utils.meter import AverageMeter from utils.metrics import R1_mAP_eval from torch.cuda import amp import torchvision import torch.nn.functional as F import numpy as np import math import random
41.127358
91
0.487097
import logging import os import time import torch import torch.nn as nn from utils.meter import AverageMeter from utils.metrics import R1_mAP_eval from torch.cuda import amp import torchvision import torch.nn.functional as F import numpy as np import math import random def do_train(cfg, model, center_criterion, trai...
8,400
0
46
4aa024d92f1a117221be8e1029557157ddb4ecd1
2,428
py
Python
interfaces/python/tests/mocks/mock_subprocess.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
13
2018-07-04T16:35:37.000Z
2021-03-03T10:41:07.000Z
interfaces/python/tests/mocks/mock_subprocess.py
iotile/baBLE
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
11
2018-06-01T20:32:32.000Z
2019-01-21T17:03:47.000Z
interfaces/python/tests/mocks/mock_subprocess.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
null
null
null
import threading from bable_interface.models import Packet from bable_interface.flatbuffers_functions import build_packet from bable_interface.BaBLE.Payload import Payload
26.107527
74
0.620264
import threading from bable_interface.models import Packet from bable_interface.flatbuffers_functions import build_packet from bable_interface.BaBLE.Payload import Payload class MockStdIO(object): def __init__(self, process): self.process = process self.callbacks = {} self.lock = threadi...
1,846
11
397
3386bb8e72b59228558867ce6d016eb0556a45ff
11,620
py
Python
deepreg/dataset/preprocess.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
deepreg/dataset/preprocess.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
deepreg/dataset/preprocess.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
""" Module containing data augmentation techniques. - 3D Affine/DDF Transforms for moving and fixed images. """ from abc import abstractmethod from typing import Dict import tensorflow as tf from deepreg.model.layer_util import ( gen_rand_affine_transform, gen_rand_ddf, get_reference_grid, resample...
35.319149
88
0.629604
""" Module containing data augmentation techniques. - 3D Affine/DDF Transforms for moving and fixed images. """ from abc import abstractmethod from typing import Dict import tensorflow as tf from deepreg.model.layer_util import ( gen_rand_affine_transform, gen_rand_ddf, get_reference_grid, resample...
0
0
0
3d30934d590182a66314e5ed5cf4a07887f68276
3,400
py
Python
tests/color_seg_test.py
osrf/baxter_demos
1678291de6addb7c3d5ac0391ccd5917398ab195
[ "Apache-2.0" ]
29
2015-03-05T19:03:00.000Z
2021-08-11T05:48:51.000Z
tests/color_seg_test.py
rethink-imcmahon/baxter_demos
1678291de6addb7c3d5ac0391ccd5917398ab195
[ "Apache-2.0" ]
1
2016-01-30T21:22:07.000Z
2016-02-04T19:33:24.000Z
tests/color_seg_test.py
rethink-imcmahon/baxter_demos
1678291de6addb7c3d5ac0391ccd5917398ab195
[ "Apache-2.0" ]
12
2015-01-30T17:14:15.000Z
2021-01-27T07:54:54.000Z
#!/usr/bin/env python import os import sys import rospy import cv, cv2, cv_bridge import numpy from baxter_demos.msg import BlobInfo, BlobInfoArray from sensor_msgs.msg import Image import argparse """Script to test functionality of object_finder color segmentation User needs to manually run object_finder and subscri...
34.343434
95
0.635294
#!/usr/bin/env python import os import sys import rospy import cv, cv2, cv_bridge import numpy from baxter_demos.msg import BlobInfo, BlobInfoArray from sensor_msgs.msg import Image import argparse """Script to test functionality of object_finder color segmentation User needs to manually run object_finder and subscri...
2,890
0
23
428f0920eed0cf67809036bf2a2b9352b10760a0
362
py
Python
app/admin/__init__.py
crudgenerator-io/django-admin-panel
b0f2d6a3ffd73a4b6e0608de486aff2cdb046222
[ "CC-BY-4.0" ]
1
2021-06-23T20:17:01.000Z
2021-06-23T20:17:01.000Z
app/admin/__init__.py
crudgenerator-io/django-admin-panel
b0f2d6a3ffd73a4b6e0608de486aff2cdb046222
[ "CC-BY-4.0" ]
null
null
null
app/admin/__init__.py
crudgenerator-io/django-admin-panel
b0f2d6a3ffd73a4b6e0608de486aff2cdb046222
[ "CC-BY-4.0" ]
null
null
null
from .sites import site from django.utils.module_loading import autodiscover_modules from .options import ModelAdmin from django.contrib.admin import register __all__ = ["site", 'register', 'autodiscover', 'ModelAdmin']
30.166667
66
0.790055
from .sites import site from django.utils.module_loading import autodiscover_modules from .options import ModelAdmin from django.contrib.admin import register def autodiscover(): autodiscover_modules('admin', register_to=site) autodiscover_modules('django.contrib.admin', register_to=site) __all__ = ["site", ...
117
0
23
bb690f26bd5f0581b1c0c1e8c3fb65fcff126d2e
1,663
py
Python
tests/orca_unit_testing/test_function_binary_operator_mul.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
20
2019-12-02T11:49:12.000Z
2021-12-24T19:34:32.000Z
tests/orca_unit_testing/test_function_binary_operator_mul.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
null
null
null
tests/orca_unit_testing/test_function_binary_operator_mul.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
5
2019-12-02T12:16:22.000Z
2021-10-22T02:27:47.000Z
import unittest import orca from setup.settings import * from pandas.util.testing import * if __name__ == '__main__': unittest.main()
35.382979
120
0.594708
import unittest import orca from setup.settings import * from pandas.util.testing import * class FunctionMulTest(unittest.TestCase): @classmethod def setUpClass(cls): # connect to a DolphinDB server orca.connect(HOST, PORT, "admin", "123456") @property def pdf(self): return pd...
1,327
172
23
3c268e4f8083266094f8b9d84282315b5a5ef55c
11,999
py
Python
src/photometry/QueryCatalogue.py
nblago/utils
862a34eb9820474d1071e5ac2eec58d66d297649
[ "MIT" ]
1
2021-02-25T11:18:20.000Z
2021-02-25T11:18:20.000Z
src/photometry/QueryCatalogue.py
nblago/utils
862a34eb9820474d1071e5ac2eec58d66d297649
[ "MIT" ]
null
null
null
src/photometry/QueryCatalogue.py
nblago/utils
862a34eb9820474d1071e5ac2eec58d66d297649
[ "MIT" ]
1
2020-01-27T03:45:18.000Z
2020-01-27T03:45:18.000Z
# -*- coding: utf-8 -*- """ Created on Tue Mar 7 13:26:06 2017 @author: nblago """ from __future__ import print_function import datetime from astropy.io import votable import numpy as np import os import logging import warnings from astropy import units as u from astropy.coordinates import SkyCoord from astropy.tab...
41.375862
328
0.574798
# -*- coding: utf-8 -*- """ Created on Tue Mar 7 13:26:06 2017 @author: nblago """ from __future__ import print_function import datetime from astropy.io import votable import numpy as np import os import logging import warnings from astropy import units as u from astropy.coordinates import SkyCoord from astropy.tab...
1,729
9,474
25
8746143745c244455ade1c1fc288e9483445b512
417
py
Python
ocv05-03.py
LeeCheahyun/20210823-0930
12927fe918452b3e7da5fcd4d31da6095c400106
[ "Apache-2.0" ]
null
null
null
ocv05-03.py
LeeCheahyun/20210823-0930
12927fe918452b3e7da5fcd4d31da6095c400106
[ "Apache-2.0" ]
null
null
null
ocv05-03.py
LeeCheahyun/20210823-0930
12927fe918452b3e7da5fcd4d31da6095c400106
[ "Apache-2.0" ]
null
null
null
import cv2 cap = cv2.VideoCapture(0) w = round(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) h = round(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) fourcc = cv2.VideoWriter_fourcc(*'DIVX') # *'DIVX' == 'D','I','V','X' out = cv2.VideoWriter('output.avi', fourcc, 30, (w, h)) while True: # 카메라 프레임 처리 ret, frame = cap.read() out.wr...
21.947368
69
0.621103
import cv2 cap = cv2.VideoCapture(0) w = round(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) h = round(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) fourcc = cv2.VideoWriter_fourcc(*'DIVX') # *'DIVX' == 'D','I','V','X' out = cv2.VideoWriter('output.avi', fourcc, 30, (w, h)) while True: # 카메라 프레임 처리 ret, frame = cap.read() out.wr...
0
0
0
3efb0f4e68fa2469df0b36b596c81774fdf9a7bc
3,241
py
Python
packages/w3af/w3af/plugins/tests/audit/test_rosetta_flash.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
tools/w3af/w3af/plugins/tests/audit/test_rosetta_flash.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
tools/w3af/w3af/plugins/tests/audit/test_rosetta_flash.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
""" test_rosetta_flash.py Copyright 2015 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the ho...
33.071429
79
0.630052
""" test_rosetta_flash.py Copyright 2015 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the ho...
1,519
763
46
c69bf6e7f07c44751e177c6adab9529d91097593
1,309
py
Python
tests/test_check_pesel.py
gunater/check-personal-identity-number-and-credit-card
41a0241a84b7ffb7852dcaa3a5a8989e02c93709
[ "MIT" ]
null
null
null
tests/test_check_pesel.py
gunater/check-personal-identity-number-and-credit-card
41a0241a84b7ffb7852dcaa3a5a8989e02c93709
[ "MIT" ]
null
null
null
tests/test_check_pesel.py
gunater/check-personal-identity-number-and-credit-card
41a0241a84b7ffb7852dcaa3a5a8989e02c93709
[ "MIT" ]
null
null
null
from check_personal_identity_number_and_credit_card.check_Pesel import ( valid_pesel, check_control_sum_pesel, check_age, pesel, ) correct_pesel = ["53052486359", "94120679457", "01240316649"] too_long_pesel = "5305248635923" too_short_pesel = "530524863" with_letters_pesel = "530524d6a59" bad_pesel = ...
32.725
72
0.680672
from check_personal_identity_number_and_credit_card.check_Pesel import ( valid_pesel, check_control_sum_pesel, check_age, pesel, ) correct_pesel = ["53052486359", "94120679457", "01240316649"] too_long_pesel = "5305248635923" too_short_pesel = "530524863" with_letters_pesel = "530524d6a59" bad_pesel = ...
849
-5
130
d0ea0f81ad41b5fd3a5b1d8e6250b27779b573b0
4,230
py
Python
modules/python/ircd/channel.py
oftc/oftc-ircd
4d03219f6b7e2aeda8b7848eea4294b7b85aad12
[ "MIT" ]
2
2015-01-11T19:14:24.000Z
2016-12-08T16:00:10.000Z
modules/python/ircd/channel.py
oftc/oftc-ircd
4d03219f6b7e2aeda8b7848eea4294b7b85aad12
[ "MIT" ]
null
null
null
modules/python/ircd/channel.py
oftc/oftc-ircd
4d03219f6b7e2aeda8b7848eea4294b7b85aad12
[ "MIT" ]
3
2021-05-02T17:15:51.000Z
2021-05-02T17:16:04.000Z
# Copyright (c) 2012 Stuart Walsh # # 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, publish...
25.792683
114
0.661702
# Copyright (c) 2012 Stuart Walsh # # 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, publish...
2,957
0
92
5bfaaef406adc5205b6eadfd38c9c70fb073c4e4
457
py
Python
source/convert.py
sanixa/GS-WGAN-custom
77660d4ba9f0e8ae949d76c29bb1b11d0afd9f96
[ "MIT" ]
null
null
null
source/convert.py
sanixa/GS-WGAN-custom
77660d4ba9f0e8ae949d76c29bb1b11d0afd9f96
[ "MIT" ]
null
null
null
source/convert.py
sanixa/GS-WGAN-custom
77660d4ba9f0e8ae949d76c29bb1b11d0afd9f96
[ "MIT" ]
null
null
null
import os, sys import torch import torch.nn as nn from models import * from config import * args = parse_arguments() if not os.path.isfile(args.checkpoint): sys.exit("model does not exist") print(f"converting {args.checkpoint}...") model = GeneratorDCGAN(z_dim=args.z_dim, model_dim=args.model_dim, num_cl...
30.466667
86
0.752735
import os, sys import torch import torch.nn as nn from models import * from config import * args = parse_arguments() if not os.path.isfile(args.checkpoint): sys.exit("model does not exist") print(f"converting {args.checkpoint}...") model = GeneratorDCGAN(z_dim=args.z_dim, model_dim=args.model_dim, num_cl...
0
0
0
d388bef2e8272db16390467dbcf230825fe941af
1,712
py
Python
theano/sandbox/mkl/tests/gen_relu_graph.py
intel/Theano-dev
6ca6fd4646f9e958058c7bce52cd51923c05c2f4
[ "BSD-3-Clause" ]
64
2016-10-02T20:41:56.000Z
2020-03-11T14:59:40.000Z
theano/sandbox/mkl/tests/gen_relu_graph.py
intel/Theano-dev
6ca6fd4646f9e958058c7bce52cd51923c05c2f4
[ "BSD-3-Clause" ]
4
2017-06-12T05:12:38.000Z
2018-03-15T03:16:30.000Z
theano/sandbox/mkl/tests/gen_relu_graph.py
intel/Theano-dev
6ca6fd4646f9e958058c7bce52cd51923c05c2f4
[ "BSD-3-Clause" ]
30
2016-10-27T21:59:00.000Z
2021-02-20T09:55:14.000Z
import numpy as np from nose.plugins.skip import SkipTest import theano from theano import tensor as T from theano.sandbox import mkl if not mkl.mkl_available: raise SkipTest('Optional package MKL disabled') if __name__ == '__main__': x = T.ftensor4('x_4D') run_test('forward', x) run_test('backward...
34.24
127
0.672897
import numpy as np from nose.plugins.skip import SkipTest import theano from theano import tensor as T from theano.sandbox import mkl if not mkl.mkl_available: raise SkipTest('Optional package MKL disabled') def run_test(direction='forward', x=T.ftensor4('x')): print ('=' * 60) print ('generate relu gra...
1,281
0
23
ee86da67b9084c628346ac2c39f027c911d95b44
1,874
py
Python
plugins/google_drive/komand_google_drive/actions/move_file/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/google_drive/komand_google_drive/actions/move_file/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/google_drive/komand_google_drive/actions/move_file/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json
20.822222
113
0.548559
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Move a file to a different folder" class Input: FILE_ID = "file_id" FOLDER_ID = "folder_id" class Output: RESULT = "result" class MoveFileInput(insightconnect_plugin_r...
112
1,545
115
090bb49c88937ae4b1c640c78bdf2f197dc7e4fb
339
py
Python
smartmirror/mod_uber/utils/__init__.py
nirmitdesai/smartmirror
e4973e02469989501e8b9a5c6aa05d7228b06cf2
[ "BSD-3-Clause" ]
null
null
null
smartmirror/mod_uber/utils/__init__.py
nirmitdesai/smartmirror
e4973e02469989501e8b9a5c6aa05d7228b06cf2
[ "BSD-3-Clause" ]
null
null
null
smartmirror/mod_uber/utils/__init__.py
nirmitdesai/smartmirror
e4973e02469989501e8b9a5c6aa05d7228b06cf2
[ "BSD-3-Clause" ]
null
null
null
from uberUtils import * '''curl -F 'client_id=M5TNy7T9h9n8xUOQ_uWSHVLdGvfw7u6H' \ -F 'client_secret=w5P7E4Ld54d_ai3lJRhAgkU_9oWbKd9kkTJHfPgf' \ -F 'grant_type=authorization_code' \ -F 'redirect_uri=https://9bbc25ce.ngrok.io' \ -F 'code=fMiym9aqxIPA6aEIDgZcHRk0BBwVM4' \ https://login.uber.com/o...
33.9
66
0.722714
from uberUtils import * '''curl -F 'client_id=M5TNy7T9h9n8xUOQ_uWSHVLdGvfw7u6H' \ -F 'client_secret=w5P7E4Ld54d_ai3lJRhAgkU_9oWbKd9kkTJHfPgf' \ -F 'grant_type=authorization_code' \ -F 'redirect_uri=https://9bbc25ce.ngrok.io' \ -F 'code=fMiym9aqxIPA6aEIDgZcHRk0BBwVM4' \ https://login.uber.com/o...
0
0
0
e495962ef8e4e01ab3563b0bde8ad2b71a3bb4ea
1,470
py
Python
horizon/openstack_dashboard/dashboards/admin/cdn/urls.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/admin/cdn/urls.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/admin/cdn/urls.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
42
82
0.708844
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
0
0
0
6c42976620655f375bda0227097f091d6e6fda10
1,946
py
Python
chapter_10/rad.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_10/rad.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
chapter_10/rad.py
bimri/programming_python
ba52ccd18b9b4e6c5387bf4032f381ae816b5e77
[ "MIT" ]
null
null
null
"Reloading Callback Handlers Dynamically" # reload callback handlers dynamically from tkinter import * import radactions # get initial callback handlers from importlib import reload Hello().mainloop() ''' You can change this file any number of times while the rad script’s ...
37.423077
106
0.656732
"Reloading Callback Handlers Dynamically" # reload callback handlers dynamically from tkinter import * import radactions # get initial callback handlers from importlib import reload class Hello(Frame): def __init__(self, master=None): Frame.__init__(self, master)...
763
-2
173
8b319d24da7fff6704db8b2901eaa45b96cb330d
5,447
py
Python
homopolymer_fit/generate_fitting_eqns.py
barricklab-at-jhu/Ising_programs
95313e3e9c783251859c6b79110cacce15d30e30
[ "Apache-2.0" ]
4
2020-06-15T00:27:43.000Z
2021-03-01T15:59:12.000Z
homopolymer_fit/generate_fitting_eqns.py
barricklab-at-jhu/Ising_programs
95313e3e9c783251859c6b79110cacce15d30e30
[ "Apache-2.0" ]
2
2020-06-07T23:05:26.000Z
2020-06-17T12:02:26.000Z
homopolymer_fit/generate_fitting_eqns.py
barricklab-at-jhu/Ising_programs
95313e3e9c783251859c6b79110cacce15d30e30
[ "Apache-2.0" ]
3
2020-05-21T13:54:18.000Z
2021-03-08T13:00:44.000Z
""" Generates partition function and fraction folded expressions for an NRC capped homopolymer series, and generates a list of experiment filenames (melts) and a constructs list. """ from __future__ import division import sympy as sp import numpy as np import json import os import time start = time.time() print("\nG...
33.832298
119
0.649165
""" Generates partition function and fraction folded expressions for an NRC capped homopolymer series, and generates a list of experiment filenames (melts) and a constructs list. """ from __future__ import division import sympy as sp import numpy as np import json import os import time start = time.time() print("\nG...
0
0
0
2abbec530b0b19f720dbd1fb7fdd515eee75a2fb
1,131
py
Python
vis.py
heyfaraday/FORTCMB
56366423546ca73e876eda58dc8a01a25e640098
[ "MIT" ]
null
null
null
vis.py
heyfaraday/FORTCMB
56366423546ca73e876eda58dc8a01a25e640098
[ "MIT" ]
null
null
null
vis.py
heyfaraday/FORTCMB
56366423546ca73e876eda58dc8a01a25e640098
[ "MIT" ]
1
2022-02-13T04:26:12.000Z
2022-02-13T04:26:12.000Z
from numpy import genfromtxt, zeros from math import pi import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap map = genfromtxt('out.dat') N = 512 projection = 'cyl' # 'cyl', 'moll', 'ortho' save_as_png = False save_as_svg = False inside_map = zeros((int(N + 1), int(N / 2 + 1))) x = zeros((int(N ...
25.133333
78
0.59328
from numpy import genfromtxt, zeros from math import pi import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap map = genfromtxt('out.dat') N = 512 projection = 'cyl' # 'cyl', 'moll', 'ortho' save_as_png = False save_as_svg = False inside_map = zeros((int(N + 1), int(N / 2 + 1))) x = zeros((int(N ...
0
0
0
f976c62eb02030389333a34d112076202fe4c488
19,495
py
Python
mtrack/track.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
mtrack/track.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
mtrack/track.py
nilsec/mtrack
76652c468417c7e3ac9903586c0127b884d6b032
[ "MIT" ]
null
null
null
from mtrack.cores import CoreSolver, CoreBuilder, DB from mtrack.preprocessing import g1_to_nml, Chunker, extract_maxima_candidates from mtrack.mt_utils import read_config, check_overlap from mtrack.graphs.g1_graph import G1 from solve import solve import numpy as np import h5py import os import multiprocessing, loggi...
40.195876
104
0.435086
from mtrack.cores import CoreSolver, CoreBuilder, DB from mtrack.preprocessing import g1_to_nml, Chunker, extract_maxima_candidates from mtrack.mt_utils import read_config, check_overlap from mtrack.graphs.g1_graph import G1 from solve import solve import numpy as np import h5py import os import multiprocessing, loggi...
18,359
0
115
1eab90f1fd53a4ac5c846f2d750d464eed7f1363
11,872
py
Python
lib/model/test_table.py
acetal/rcnn_edit
e46387069ac24866706af611de4080a067372c24
[ "MIT" ]
null
null
null
lib/model/test_table.py
acetal/rcnn_edit
e46387069ac24866706af611de4080a067372c24
[ "MIT" ]
null
null
null
lib/model/test_table.py
acetal/rcnn_edit
e46387069ac24866706af611de4080a067372c24
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ impor...
35.020649
149
0.624158
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ impor...
6,949
0
46
bcc137f145313c8049b02eb3ca4c6ca9ac2fd6ce
1,644
py
Python
preprocessing/data_dist.py
SLAB-NLP/Akk
baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d
[ "MIT" ]
5
2021-09-14T07:09:07.000Z
2021-11-15T19:43:13.000Z
preprocessing/data_dist.py
SLAB-NLP/Akk
baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d
[ "MIT" ]
null
null
null
preprocessing/data_dist.py
SLAB-NLP/Akk
baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d
[ "MIT" ]
1
2021-11-15T19:43:19.000Z
2021-11-15T19:43:19.000Z
import glob from collections import Counter from typing import List import sys import os import json from preprocessing.scraping import JSONS_DIR sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
35.73913
111
0.627737
import glob from collections import Counter from typing import List import sys import os import json from preprocessing.scraping import JSONS_DIR sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) def split_data_by_properties(preprocessed_data_path: str, properties: List[str]...
1,357
0
46
6b23d6692add9b9a98b483da8e2817f82a552379
1,102
py
Python
expenses_trasker/expenses_tracker/main_app/validators.py
ivailoiliev84/Web_basic_exams_preparation_and_exam
411cc7b737fc5044029a52bd14a5d75ce79cd39e
[ "MIT" ]
null
null
null
expenses_trasker/expenses_tracker/main_app/validators.py
ivailoiliev84/Web_basic_exams_preparation_and_exam
411cc7b737fc5044029a52bd14a5d75ce79cd39e
[ "MIT" ]
null
null
null
expenses_trasker/expenses_tracker/main_app/validators.py
ivailoiliev84/Web_basic_exams_preparation_and_exam
411cc7b737fc5044029a52bd14a5d75ce79cd39e
[ "MIT" ]
null
null
null
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible # def validator_file_max_size_in_mb(max_size): # def validate_image(fieldfile_obj): # filesize = fieldfile_obj.file.size # megabyte_limit = 5.0 # if filesize > megabyte_limit * 1024 * 1...
29.783784
77
0.696915
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible def validator_only_letters(value): for letter in value: if not letter.isalpha(): raise ValidationError("Ensure this value contains only letters.") # def validator_file_max_size_in_mb(max_s...
492
6
152
02fac01352c9e17a2b3caa741b698c373c5dc2b6
87
py
Python
RecSys/RecApp/apps.py
Vaibhavnaudiyal92/Netflix-Recommendations-System
05b8ee045c5df14002b287bf991d2ee9c9299433
[ "Apache-2.0" ]
null
null
null
RecSys/RecApp/apps.py
Vaibhavnaudiyal92/Netflix-Recommendations-System
05b8ee045c5df14002b287bf991d2ee9c9299433
[ "Apache-2.0" ]
null
null
null
RecSys/RecApp/apps.py
Vaibhavnaudiyal92/Netflix-Recommendations-System
05b8ee045c5df14002b287bf991d2ee9c9299433
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig
14.5
33
0.747126
from django.apps import AppConfig class RecappConfig(AppConfig): name = 'RecApp'
0
29
23
1fab464dec76210051981c698a37ce8f75459807
1,588
py
Python
tests/smoke/test_supplier_redirects.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
4
2017-06-02T09:09:10.000Z
2018-01-25T19:06:12.000Z
tests/smoke/test_supplier_redirects.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
53
2016-10-27T22:31:03.000Z
2022-03-07T11:18:25.000Z
tests/smoke/test_supplier_redirects.py
mayank-sfdc/directory-tests
6e978bc1a27c19389e99e454143122aa27e47b85
[ "MIT" ]
3
2017-11-22T11:42:40.000Z
2022-02-21T01:20:04.000Z
# -*- coding: utf-8 -*- import pytest from rest_framework.status import HTTP_302_FOUND import allure from directory_tests_shared import URLs from tests.smoke.cms_api_helpers import get_and_assert pytestmark = [allure.suite("FAS redirects"), allure.feature("FAS redirects")] @allure.issue("CMS-1834", "Links to legacy...
31.76
87
0.657431
# -*- coding: utf-8 -*- import pytest from rest_framework.status import HTTP_302_FOUND import allure from directory_tests_shared import URLs from tests.smoke.cms_api_helpers import get_and_assert pytestmark = [allure.suite("FAS redirects"), allure.feature("FAS redirects")] @allure.issue("CMS-1834", "Links to legacy...
474
0
22
8dd6f051e01a06aeb045a540a5929cb21ec06c98
1,477
py
Python
plot_bw.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
3
2018-06-11T05:34:05.000Z
2020-11-06T05:23:34.000Z
plot_bw.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
1
2021-11-09T12:25:13.000Z
2021-11-09T12:25:13.000Z
plot_bw.py
hotpxl/low-rate-tcp-dos
25cf181080e4ff759edef438982b5e3d811797e7
[ "MIT" ]
4
2019-08-24T12:55:53.000Z
2022-03-07T12:03:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import math import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np import sys TRANSFER_MB = 2 # Data transfered in me...
30.770833
78
0.602573
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import math import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np import sys TRANSFER_MB = 2 # Data transfered in me...
1,055
0
23
309ef6cad1487772dcd56122ffc13161cac69638
1,786
py
Python
setup.py
LimnoTech/ODM2PythonAPI
a5088ac8ecee9213e994fc0a71831825a9e05541
[ "BSD-3-Clause" ]
4
2018-11-30T04:04:16.000Z
2021-07-09T07:29:23.000Z
setup.py
LimnoTech/ODM2PythonAPI
a5088ac8ecee9213e994fc0a71831825a9e05541
[ "BSD-3-Clause" ]
156
2015-05-20T00:17:08.000Z
2019-05-11T06:13:50.000Z
setup.py
LimnoTech/ODM2PythonAPI
a5088ac8ecee9213e994fc0a71831825a9e05541
[ "BSD-3-Clause" ]
13
2015-06-28T04:16:05.000Z
2020-04-02T08:08:19.000Z
from __future__ import (absolute_import, division, print_function) """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ import os from codecs import open from setuptools import find_packages, setup import versioneer here = os.p...
30.793103
80
0.679171
from __future__ import (absolute_import, division, print_function) """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ import os from codecs import open from setuptools import find_packages, setup import versioneer here = os.p...
0
0
0
5c35a52458575245235118efec3d3bd1bbf76d61
9,151
py
Python
src/zptess/gui/preferences/base.py
STARS4ALL/zptess
9bbe91720f283756a0938c7ac4dde180c1e1eda2
[ "MIT" ]
null
null
null
src/zptess/gui/preferences/base.py
STARS4ALL/zptess
9bbe91720f283756a0938c7ac4dde180c1e1eda2
[ "MIT" ]
null
null
null
src/zptess/gui/preferences/base.py
STARS4ALL/zptess
9bbe91720f283756a0938c7ac4dde180c1e1eda2
[ "MIT" ]
null
null
null
# ---------------------------------------------------------------------- # Copyright (c) 2022 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- ################################# ## APPLICATION SPECIFIC WIDGETS # ############...
36.751004
151
0.592176
# ---------------------------------------------------------------------- # Copyright (c) 2022 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- ################################# ## APPLICATION SPECIFIC WIDGETS # ############...
6,678
840
341
2d4c5d177119cdc4f9418e772326973cfca6b69d
291
py
Python
fontFeatures/ttLib/Chaining.py
chrissimpkins/fontFeatures
5e9187066fe431d3cacb30c605da4104f78692e6
[ "BSD-3-Clause" ]
51
2020-01-15T09:28:51.000Z
2022-03-30T06:48:36.000Z
fontFeatures/ttLib/Chaining.py
chrissimpkins/fontFeatures
5e9187066fe431d3cacb30c605da4104f78692e6
[ "BSD-3-Clause" ]
51
2020-05-11T18:51:25.000Z
2021-12-20T12:55:08.000Z
fontFeatures/ttLib/Chaining.py
chrissimpkins/fontFeatures
5e9187066fe431d3cacb30c605da4104f78692e6
[ "BSD-3-Clause" ]
8
2020-08-28T20:03:14.000Z
2021-12-08T01:22:28.000Z
"""ttLib.Chaining: Converting Chaining rules to TrueType.""" def lookup_type(self): """Mixin to determine the GSUB/GPOS lookup type of a fontFeatures.Chaining object Returns: integer GSUB/GPOS lookup type.""" if self.stage == "pos": return 8 else: return 6
26.454545
85
0.666667
"""ttLib.Chaining: Converting Chaining rules to TrueType.""" def lookup_type(self): """Mixin to determine the GSUB/GPOS lookup type of a fontFeatures.Chaining object Returns: integer GSUB/GPOS lookup type.""" if self.stage == "pos": return 8 else: return 6
0
0
0
864718a7faa2a31e72476dc90b9d51129a5954d8
6,151
py
Python
apps/greencheck/forms.py
thegreenwebfoundation/greenwebfoundation-admin
4ecf087fc7a305b410fe9dc5c13c721f98755ad7
[ "Apache-2.0" ]
10
2020-11-23T22:47:26.000Z
2022-01-28T16:26:50.000Z
apps/greencheck/forms.py
thegreenwebfoundation/admin-portal
65882871bd8c7a088127dcaf25aa534753cf51fa
[ "Apache-2.0" ]
83
2020-05-17T20:25:50.000Z
2022-03-29T18:11:50.000Z
apps/greencheck/forms.py
thegreenwebfoundation/greenwebfoundation-admin
4ecf087fc7a305b410fe9dc5c13c721f98755ad7
[ "Apache-2.0" ]
3
2020-11-30T00:13:45.000Z
2021-06-11T13:42:04.000Z
import logging from django import forms from django.forms import ModelForm from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from .choices import ActionChoice from .choices import StatusApproval from .models import GreencheckIp from .models import GreencheckIpApprove fr...
29.859223
87
0.603154
import logging from django import forms from django.forms import ModelForm from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from .choices import ActionChoice from .choices import StatusApproval from .models import GreencheckIp from .models import GreencheckIpApprove fr...
791
1,631
123
b1eddf2df04b0568d966ac65af3e212970d3380f
1,452
py
Python
Task/Variable-length-quantity/Python/variable-length-quantity-2.py
LaudateCorpus1/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
Task/Variable-length-quantity/Python/variable-length-quantity-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Variable-length-quantity/Python/variable-length-quantity-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
>>> for n in (254, 255, 256, 257, -2+(1<<16), -1+(1<<16), 1<<16, 1+(1<<16), 0x200000, 0x1fffff ): print('int: %7i bin: %26s vlq: %35s vlq->int: %7i' % (n, tobits(n,_pad=True), tovlq(n), toint(tovlq(n)))) int: 254 bin: 11111110 vlq: 00000001_11111110 vlq->int: 254 int: ...
58.08
109
0.623967
>>> for n in (254, 255, 256, 257, -2+(1<<16), -1+(1<<16), 1<<16, 1+(1<<16), 0x200000, 0x1fffff ): print('int: %7i bin: %26s vlq: %35s vlq->int: %7i' % (n, tobits(n,_pad=True), tovlq(n), toint(tovlq(n)))) int: 254 bin: 11111110 vlq: 00000001_11111110 vlq->int: 254 int: ...
0
0
0
2f50ba581140ad3227f6a245aa81600c4d646bb7
7,386
py
Python
get-embeddings.py
bayesgroup/semi-supervised-NFs
8ef6a481389810988c3ffe09a228f814d2de008b
[ "BSD-2-Clause" ]
19
2020-01-30T07:25:23.000Z
2021-02-06T23:23:06.000Z
get-embeddings.py
bayesgroup/semi-supervised-NFs
8ef6a481389810988c3ffe09a228f814d2de008b
[ "BSD-2-Clause" ]
1
2021-06-04T11:01:40.000Z
2021-06-04T11:01:40.000Z
get-embeddings.py
SamsungLabs/semi-supervised-NFs
8ef6a481389810988c3ffe09a228f814d2de008b
[ "BSD-2-Clause" ]
1
2021-06-04T10:59:32.000Z
2021-06-04T10:59:32.000Z
import myexman import torch import utils import datautils import os from logger import Logger import time import numpy as np from models import flows, distributions import matplotlib.pyplot as plt from algo.em import init_kmeans2plus_mu import warnings from sklearn.mixture import GaussianMixture import torch.nn.functio...
40.582418
106
0.701056
import myexman import torch import utils import datautils import os from logger import Logger import time import numpy as np from models import flows, distributions import matplotlib.pyplot as plt from algo.em import init_kmeans2plus_mu import warnings from sklearn.mixture import GaussianMixture import torch.nn.functio...
764
0
46
4d979201085d2e229bfe8b5fe03865b07c10d070
16,437
py
Python
web_scrapers.py
zhiose91/web_fetcher
ffff20d4801bf08096a8c37ee7aefea6259c5701
[ "MIT" ]
null
null
null
web_scrapers.py
zhiose91/web_fetcher
ffff20d4801bf08096a8c37ee7aefea6259c5701
[ "MIT" ]
null
null
null
web_scrapers.py
zhiose91/web_fetcher
ffff20d4801bf08096a8c37ee7aefea6259c5701
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from datetime import datetime, timedelta from src.misc import check_n_mkdir, Logger from collections...
40.090244
153
0.636856
#!/usr/bin/env python3 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from datetime import datetime, timedelta from src.misc import check_n_mkdir, Logger from collections...
487
15,530
46
fea13b4789cde31dd2da3a096142c61c1892bdf1
514
py
Python
tests/test_generics.py
danpoland/slacktools
0a66f7dd7bbc32ac70f3c4855e5af51bf7d3d1c5
[ "MIT" ]
7
2020-02-28T17:31:41.000Z
2021-08-23T17:57:47.000Z
tests/test_generics.py
danpoland/slacktools
0a66f7dd7bbc32ac70f3c4855e5af51bf7d3d1c5
[ "MIT" ]
2
2020-03-31T11:13:49.000Z
2021-02-02T22:42:54.000Z
tests/test_generics.py
danpoland/slacktools
0a66f7dd7bbc32ac70f3c4855e5af51bf7d3d1c5
[ "MIT" ]
null
null
null
from blockkit.attributes import TextAttr from blockkit.generics import *
27.052632
61
0.682879
from blockkit.attributes import TextAttr from blockkit.generics import * class MockSlackObject(SlackObject): block_id = TextAttr() action_id = TextAttr(required=False) class TestSlackObject: def test(self): obj = MockSlackObject(block_id="1", action_id=None) assert obj["block_id"] == "1"...
258
82
99
90aab228d34738b1fc25e428ebfea63ae7a6aa80
1,881
py
Python
zabby/tests/items/net/test_tcp.py
blin/zabby
0f9358ca435ea7368202a6d0fc20cea749f896e1
[ "MIT" ]
4
2016-04-23T13:26:43.000Z
2017-11-19T14:07:36.000Z
zabby/tests/items/net/test_tcp.py
blin/zabby
0f9358ca435ea7368202a6d0fc20cea749f896e1
[ "MIT" ]
null
null
null
zabby/tests/items/net/test_tcp.py
blin/zabby
0f9358ca435ea7368202a6d0fc20cea749f896e1
[ "MIT" ]
4
2015-09-07T05:55:57.000Z
2022-02-14T13:54:14.000Z
from mock import patch from nose.tools import assert_true, assert_false, assert_raises from zabby.core.exceptions import WrongArgumentError from zabby.core.six import b from zabby.items.net import tcp
38.387755
77
0.695375
from mock import patch from nose.tools import assert_true, assert_false, assert_raises from zabby.core.exceptions import WrongArgumentError from zabby.core.six import b from zabby.items.net import tcp class TestServiceSSH(): def setup(self): self._patcher_tcp_communication = patch( 'zabby.ite...
1,465
2
211
1e06c961a46def55ffde95f51cb96237e6d9a612
5,659
py
Python
tests/test_acl.py
pypeclub/openpype4-tests
c0c32b643f63e66609772270fff71e88dcd5b922
[ "Apache-2.0" ]
null
null
null
tests/test_acl.py
pypeclub/openpype4-tests
c0c32b643f63e66609772270fff71e88dcd5b922
[ "Apache-2.0" ]
null
null
null
tests/test_acl.py
pypeclub/openpype4-tests
c0c32b643f63e66609772270fff71e88dcd5b922
[ "Apache-2.0" ]
null
null
null
import pytest from client.api import API PROJECT_NAME = "test_acl" USER_NAME = "test_artist" PASSWORD = "123.456.AbCd" ROLE_NAME = "test_artist_role" @pytest.fixture @pytest.mark.order(-1)
32.153409
85
0.6434
import pytest from client.api import API PROJECT_NAME = "test_acl" USER_NAME = "test_artist" PASSWORD = "123.456.AbCd" ROLE_NAME = "test_artist_role" def create_entity(api, entity_type: str, **kwargs): response = api.post(f"projects/{PROJECT_NAME}/{entity_type}s", **kwargs) assert response return respon...
5,348
0
113
bf2e6f8f6d58ec2adac40bbca33ccffc49f6f7cb
15,254
py
Python
RRCS_based/RRCS_change.py
GiantFurosemide/scripts_work_parric
da73dfa701f7591f1a6c769fcbb73792a5f1a0e3
[ "MIT" ]
null
null
null
RRCS_based/RRCS_change.py
GiantFurosemide/scripts_work_parric
da73dfa701f7591f1a6c769fcbb73792a5f1a0e3
[ "MIT" ]
null
null
null
RRCS_based/RRCS_change.py
GiantFurosemide/scripts_work_parric
da73dfa701f7591f1a6c769fcbb73792a5f1a0e3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' process pdb file to calculate contact score and write to csv. main function is prosess_save2csv() usage: python3 RRCS_change.py file.pdb input .pdb output .csv ''' import sys # 当所有atom距离都大于 4.63 是不被记录的,应该计为0 # a function to eliminate 0 score from calc_contact() ...
41.227027
117
0.566409
# -*- coding: utf-8 -*- ''' process pdb file to calculate contact score and write to csv. main function is prosess_save2csv() usage: python3 RRCS_change.py file.pdb input .pdb output .csv ''' import sys def calc_contact(pdbbase: "pdb file") -> (dict, dict): fi = open(pdbbase, 'r') all_lin...
6,751
0
73
b083fde9e425f414d2d430ae2e469990e3d9d778
51
py
Python
leo/test/unittest/at-shadow-unlink-clones.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
2
2020-01-19T18:11:05.000Z
2020-01-19T18:12:07.000Z
leo/test/unittest/at-shadow-unlink-clones.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
1
2020-06-19T02:28:25.000Z
2020-06-19T02:28:25.000Z
leo/test/unittest/at-shadow-unlink-clones.py
ATikhonov2/leo-editor
225aac990a9b2804aaa9dea29574d6e072e30474
[ "MIT" ]
null
null
null
# Begin # node 1 text A. # node 2 text B. # End
6.375
16
0.54902
# Begin # node 1 text A. # node 2 text B. # End
0
0
0
13a2885f6e9ce0af1911261a49ae96c3f5cf9bc8
242
py
Python
Python/ArrayQueueMain.py
i-love-linux/BasicDataStructure
7853e14053d3425c836b6164cc1c78c9ee68213b
[ "MIT" ]
null
null
null
Python/ArrayQueueMain.py
i-love-linux/BasicDataStructure
7853e14053d3425c836b6164cc1c78c9ee68213b
[ "MIT" ]
null
null
null
Python/ArrayQueueMain.py
i-love-linux/BasicDataStructure
7853e14053d3425c836b6164cc1c78c9ee68213b
[ "MIT" ]
null
null
null
from BasicDS.ArrayQueue import ArrayQueue if __name__ == "__main__": queue = ArrayQueue() for i in range(10): queue.enqueue(i) print(queue) if i % 3 == 2: queue.dequeue() print(queue)
20.166667
41
0.549587
from BasicDS.ArrayQueue import ArrayQueue if __name__ == "__main__": queue = ArrayQueue() for i in range(10): queue.enqueue(i) print(queue) if i % 3 == 2: queue.dequeue() print(queue)
0
0
0
345129245b461f44ef58538f02a08c3684d33f31
2,289
py
Python
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
1,711
2018-11-22T08:56:26.000Z
2022-03-30T21:03:58.000Z
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
54
2020-04-07T23:32:19.000Z
2022-03-27T15:06:26.000Z
netdissect/acesummarize.py
priyaravichander/ganspace
fefc001fabf6986a98da4df3166fc31693a4c26b
[ "Apache-2.0" ]
284
2018-11-27T02:05:21.000Z
2021-12-19T05:41:21.000Z
import os, sys, numpy, torch, argparse, skimage, json, shutil from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.ticker import MaxNLocator import matplotlib if __name__ == '__main__': main()
36.333333
80
0.602883
import os, sys, numpy, torch, argparse, skimage, json, shutil from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.ticker import MaxNLocator import matplotlib def main(): parser = argparse.ArgumentParser(description='ACE optimization utili...
1,969
0
46
9c4d850bdefd749768f01ac9217c8649aea40380
2,690
py
Python
src/sage/combinat/root_system/type_I.py
bopopescu/sage
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
[ "BSL-1.0" ]
4
2020-07-17T04:49:44.000Z
2020-07-29T06:33:51.000Z
src/sage/combinat/root_system/type_I.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/combinat/root_system/type_I.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
""" Root system data for type I """ from __future__ import absolute_import #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of the GNU General Public License (GPL) # ...
24.454545
78
0.454647
""" Root system data for type I """ from __future__ import absolute_import #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of the GNU General Public License (GPL) # ...
0
2,164
22
a4b9815d03a75fa1aae1485266e983d7acb14a6e
346
py
Python
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
fpdb/common/util.py
xvzezi/filedb-python
513de426976e2782aa9aced1a2bf522db7aae51d
[ "MIT" ]
null
null
null
# coding=utf-8 ########################### # file: util.py # date: 2021-7-16 # author: Sturmfy # desc: utility # version: # 2021-7-16 init design ###########################
21.625
37
0.528902
# coding=utf-8 ########################### # file: util.py # date: 2021-7-16 # author: Sturmfy # desc: utility # version: # 2021-7-16 init design ########################### def path_stitch(dir_name, file_name): # type: (str, str) -> str if not dir_name.endswith('/'): dir_name = dir_name + '/' r...
147
0
23
6cfba856eccf9697a5c0bedb864ea116614eaa65
12,421
py
Python
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
Experiments_Pseudo/df_unify_5m.py
markus93/fit-on-the-test
e8e4ddda1ba52582920bdf0585314702c8b65892
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 5m - Df unification (10 calib. fn-s) import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from os.path import join import pickle from copy import copy # In[7]: # MAIN IDENT_TAG = "28_05_pre" PATH_res = "data_1m_final_2805" COLUMNS = ["mod...
30.975062
162
0.632638
#!/usr/bin/env python # coding: utf-8 # # 5m - Df unification (10 calib. fn-s) import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from os.path import join import pickle from copy import copy def get_data_name(file): if "resnet110" in file: return "resnet110" elif ...
8,830
0
161
e1486d9dbc7c678e499d8061c350dda681a214ea
792
py
Python
users/urls.py
raikasdev/app
6686db149c493a605c0f73056a3db1516f77e1b6
[ "MIT" ]
1
2021-05-09T14:20:52.000Z
2021-05-09T14:20:52.000Z
users/urls.py
jounile/qlma
dac96622d47bc3b5f04ad220322313b2676e2c26
[ "MIT" ]
19
2020-12-22T20:50:32.000Z
2021-07-10T19:37:46.000Z
users/urls.py
jounile/qlma
dac96622d47bc3b5f04ad220322313b2676e2c26
[ "MIT" ]
3
2021-05-08T17:57:50.000Z
2021-05-16T15:21:41.000Z
from django.conf.urls.static import static from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('add_user', views.UserCreateView.as_view(), name="add_user"), path('edit_user/<str:user_id>', views.UserEditView.as_view(), name="edit_user"), path('manag...
39.6
95
0.72096
from django.conf.urls.static import static from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('add_user', views.UserCreateView.as_view(), name="add_user"), path('edit_user/<str:user_id>', views.UserEditView.as_view(), name="edit_user"), path('manag...
0
0
0
e865b182f333bf7fe025c15259e02b930037edd3
5,682
py
Python
libmc.py
totu/mcbot
cd31932765c3c8091cb968231c4a7fd105226cb4
[ "Unlicense" ]
1
2020-11-19T12:02:43.000Z
2020-11-19T12:02:43.000Z
libmc.py
totu/mcbot
cd31932765c3c8091cb968231c4a7fd105226cb4
[ "Unlicense" ]
null
null
null
libmc.py
totu/mcbot
cd31932765c3c8091cb968231c4a7fd105226cb4
[ "Unlicense" ]
null
null
null
import _thread import time import socket import copy from mctypes import ParseVarInt, PackVarInt from enums import Play, Login from handlers import Handler from senders import Sender from helpers import calculate_yaw_and_pitch
33.034884
88
0.480641
import _thread import time import socket import copy from mctypes import ParseVarInt, PackVarInt from enums import Play, Login from handlers import Handler from senders import Sender from helpers import calculate_yaw_and_pitch class libmc(Handler, Sender): def __init__(self, name, host, port): self.names ...
3,855
1,576
23
3796753eb177e2bfc5e0369e3a3f7acdcff7b4b7
2,652
py
Python
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
null
null
null
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
null
null
null
Deployment of Mini Project 2 using Flask/app.py
ynpreet/Technocolabs-data-science-internship
cb520f96ed825765ad140ab31af09b98a2511127
[ "MIT" ]
1
2021-02-16T05:07:31.000Z
2021-02-16T05:07:31.000Z
from flask import Flask, render_template, request, flash, redirect import pickle import numpy as np app = Flask(__name__) model = pickle.load(open("final_model.pkl", "rb")) @app.route("/", methods = ['GET','POST']) if __name__ == '__main__': app.run(debug = True)
42.095238
240
0.642157
from flask import Flask, render_template, request, flash, redirect import pickle import numpy as np app = Flask(__name__) model = pickle.load(open("final_model.pkl", "rb")) def predict_default(features): features = np.array(features).astype(np.float64).reshape(1,-1) prediction = model.predi...
2,322
0
48
3de1ba95b3d8e62cb61c3e0e82403f46c9ad773c
467
py
Python
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
2
2020-04-24T23:03:41.000Z
2020-11-10T15:08:38.000Z
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
5
2021-03-10T11:42:15.000Z
2022-02-10T21:38:54.000Z
2021-08-31 - Python Medellin - aiohttp Asynchronous HTTP Requests/Examples/Pokemon/pokemon_aiohttp.py
williamegomezo/Talks
0b123c6c8dec9c1a2357c142b617109068caf060
[ "MIT" ]
4
2020-10-01T04:32:27.000Z
2022-02-14T15:08:16.000Z
import aiohttp import asyncio import time start_time = time.time() asyncio.run(main()) print("--- %s seconds ---" % (time.time() - start_time))
24.578947
71
0.610278
import aiohttp import asyncio import time start_time = time.time() async def main(): async with aiohttp.ClientSession() as session: for number in range(1, 151): pokemon_url = f'https://pokeapi.co/api/v2/pokemon/{number}' async with session.get(pokemon_url) as resp: ...
296
0
23
5da44211934a15e4da52cce4b451c12fad31632f
21,537
py
Python
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
11
2020-06-22T16:20:15.000Z
2022-03-20T22:54:40.000Z
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
86
2019-10-24T07:43:05.000Z
2022-03-28T05:20:17.000Z
parla/tasks.py
nicelhc13/Parla.py
45a4e9e3835b096c6f3c7421a19bdc8629eaedf9
[ "BSD-3-Clause" ]
7
2019-10-24T05:46:27.000Z
2022-02-09T19:47:58.000Z
""" Parla supports simple task parallelism. .. testsetup:: T0 = None code = None from .cpu import cpu """ import logging import threading import inspect from abc import abstractmethod, ABCMeta from contextlib import asynccontextmanager, contextmanager, ExitStack from typing import Awaitable, Collection, ...
35.539604
180
0.623392
""" Parla supports simple task parallelism. .. testsetup:: T0 = None code = None from .cpu import cpu """ import logging import threading import inspect from abc import abstractmethod, ABCMeta from contextlib import asynccontextmanager, contextmanager, ExitStack from typing import Awaitable, Collection, ...
5,772
217
642
8719d165a390a1e9c956a3a3422cc5a6e92ff548
366
py
Python
src/utils/file_utils.py
abhmul/aws-python-utils
6201b1a2612d3f5a81f2a8d6f7ac754d18434660
[ "MIT" ]
null
null
null
src/utils/file_utils.py
abhmul/aws-python-utils
6201b1a2612d3f5a81f2a8d6f7ac754d18434660
[ "MIT" ]
null
null
null
src/utils/file_utils.py
abhmul/aws-python-utils
6201b1a2612d3f5a81f2a8d6f7ac754d18434660
[ "MIT" ]
null
null
null
import os import logging
22.875
72
0.696721
import os import logging def safe_open_dir(dirpath: str) -> str: if not os.path.isdir(dirpath): logging.info(f"Directory {dirpath} does not exist, creating it") os.makedirs(dirpath) return dirpath def safe_create_file(filepath: str) -> str: dirpath = os.path.dirname(filepath) dirpath...
293
0
46
aebe595e4af6bd51e96e3fc0e0868d4c5c25470f
24,324
py
Python
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
mesxr/calibration/plots.py
pdvanmeter/meSXR
c281e15c5fd01591bba9e0c1510f83c5f7ef771a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Package: mesxr.calibration Module: plots Author: Patrick VanMeter Affiliation: Department of Physics, University of Wisconsin-Madison Last Updated: November 2018 Description: This module is used to generate common plots to analyse the ressults of the ME-SXR calibra...
41.865749
150
0.60245
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Package: mesxr.calibration Module: plots Author: Patrick VanMeter Affiliation: Department of Physics, University of Wisconsin-Madison Last Updated: November 2018 Description: This module is used to generate common plots to analyse the ressults of the ME-SXR calibra...
0
0
0
ac9657a422b46b935b62bce15f92796f3fe1a2b7
3,219
py
Python
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
6
2018-11-09T22:37:07.000Z
2021-11-15T11:26:54.000Z
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
1
2021-01-13T11:02:41.000Z
2021-01-21T16:37:02.000Z
admin.py
carterbrwn2/greyfish
6b43f2fc7b7560d9ad13516cb67089bf8b1f15ca
[ "BSD-3-Clause" ]
3
2019-06-20T04:27:07.000Z
2019-08-02T20:22:39.000Z
#!/usr/bin/env python3 """ BASICS Admin functionalities """ from flask import Flask, request import glob import os import time import base_functions as bf import remove_files as rmf app = Flask(__name__) GREYFISH_FOLDER = os.environ['greyfish_path']+"/sandbox/" # Gets a list of all available users, comma-se...
28.486726
131
0.66822
#!/usr/bin/env python3 """ BASICS Admin functionalities """ from flask import Flask, request import glob import os import time import base_functions as bf import remove_files as rmf app = Flask(__name__) GREYFISH_FOLDER = os.environ['greyfish_path']+"/sandbox/" # Gets a list of all available users, comma-se...
2,561
0
48
bcd6e37b1e2ddd8a3033cd21f1b7d3fe4afc4341
19
py
Python
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
setup.py
snrakshith/chipsy
7bde3f90dc1aee953ed1c89071bce230b4613635
[ "MIT" ]
null
null
null
""" Setup file"""
9.5
18
0.473684
""" Setup file"""
0
0
0
51ea294cb5057066f289ae35171953e5ab6bf905
3,052
py
Python
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
admin/c2cgeoportal_admin/__init__.py
vvmruder/c2cgeoportal
2aa1cfbfa3872fb745db6dae1e0c4ae9a0692542
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from translationstring import TranslationStringFactory from pyramid.config import Configurator from c2cwsgiutils.health_check import HealthCheck from pyramid.events import BeforeRender, NewRequest import c2cgeoform from pkg_resources import resource_filename from c2c.template.config import config as configuration fro...
31.791667
105
0.742136
from translationstring import TranslationStringFactory from pyramid.config import Configurator from c2cwsgiutils.health_check import HealthCheck from pyramid.events import BeforeRender, NewRequest import c2cgeoform from pkg_resources import resource_filename from c2c.template.config import config as configuration fro...
994
2
127
a72e41eedab2083459339756e892886f9163c467
4,445
py
Python
Baseball-5501/BaseballSerialParserCOM.py
MSOInfinite/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
2
2020-11-24T01:08:56.000Z
2021-09-25T16:15:53.000Z
Baseball-5501/BaseballSerialParserCOM.py
Bristol-Tennessee-City-Schools/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
null
null
null
Baseball-5501/BaseballSerialParserCOM.py
Bristol-Tennessee-City-Schools/DaktronicsCGSerialParser
6df702fe429822eceab42a1a3ab2dd66176b38e1
[ "MIT" ]
1
2021-02-21T19:11:42.000Z
2021-02-21T19:11:42.000Z
#!/usr/bin/env python """BaseballSerialParserCOM.py: Collects data from a Daktronics All Sport 5000 connected via port J2 to a Daktronics All Sport CG connected to a computer on COM port (defined on line 56), then parses data to a .csv readable by broadcasting programs. This file has only been tested using game code...
32.210145
129
0.682115
#!/usr/bin/env python """BaseballSerialParserCOM.py: Collects data from a Daktronics All Sport 5000 connected via port J2 to a Daktronics All Sport CG connected to a computer on COM port (defined on line 56), then parses data to a .csv readable by broadcasting programs. This file has only been tested using game code...
0
0
0
222e8b789c7ed3d0400b46d86c0b4d01de5fa5cf
1,415
py
Python
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
1
2018-02-08T19:47:04.000Z
2018-02-08T19:47:04.000Z
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
null
null
null
setup.py
timofurrer/pylemon
48fb6a4792450c86d091e50848760aff5b5f6123
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from imp import load_source from setuptools import setup version = load_source("version", "pylemon/__init__.py") setup( name="pylemon", version=version.__version__, license="MIT", description="python daemon to monitor specific directories and react on changes...
33.690476
85
0.633216
#!/usr/bin/python # -*- coding: utf-8 -*- from imp import load_source from setuptools import setup version = load_source("version", "pylemon/__init__.py") setup( name="pylemon", version=version.__version__, license="MIT", description="python daemon to monitor specific directories and react on changes...
0
0
0
6964e6c91a17b83171913f53519b538e1b2d9588
415
py
Python
round-all-kerns.py
thundernixon/thundernixon-glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
3
2019-02-22T06:52:31.000Z
2019-09-09T01:31:34.000Z
round-all-kerns.py
thundernixon/glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
null
null
null
round-all-kerns.py
thundernixon/glyphs_scripts
42e89a654fbadfa222ce7bf0723420585d05b9ef
[ "Apache-2.0" ]
2
2019-01-27T17:00:10.000Z
2019-02-22T06:54:38.000Z
#MenuTitle: Round All Kerns # -*- coding: utf-8 -*- __doc__=""" If there are any floating-point kern values in the font, this will round them to the nearest integer. """ font = Glyphs.font # print(font.kerning) # for each value in kerning dictionary for key, value in font.kerning.items(): for key, value in font....
25.9375
101
0.662651
#MenuTitle: Round All Kerns # -*- coding: utf-8 -*- __doc__=""" If there are any floating-point kern values in the font, this will round them to the nearest integer. """ font = Glyphs.font # print(font.kerning) # for each value in kerning dictionary for key, value in font.kerning.items(): for key, value in font....
0
0
0
f00738dbb83576f11e2dc73109618a3cd1be6fa7
60,289
py
Python
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/cognito/_inputs.py
jen20/pulumi-aws
172e00c642adc03238f89cc9c5a16b914a77c2b1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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, overload from .. import...
44.460914
383
0.683475
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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, overload from .. import...
7,010
51,025
484
ff4fb2f52439b1efcb49f46bb18f2a9d76da96e2
583
py
Python
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
servlets/pushitems.py
fhats/pushmanager
91fb61d400622477b9f1b3902c9dc77aff983be4
[ "Apache-2.0" ]
null
null
null
import tornado.gen import tornado.web from core.requesthandler import RequestHandler import core.util
26.5
66
0.607204
import tornado.gen import tornado.web from core.requesthandler import RequestHandler import core.util class PushItemsServlet(RequestHandler): @tornado.web.asynchronous @tornado.gen.engine def get(self): pushid = core.util.get_int_arg(self.request, 'push', None) response = yield tornado.g...
358
99
23
211439202792f9f3367480fc0fbaf452afd57f1b
836
py
Python
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
src/MonotoneStack.py
ArkiWang/LeetcodePy
6b4af8da843910823f7f53989bbda4ec8e6dad15
[ "MIT" ]
null
null
null
#monotonous increase stack
24.588235
61
0.532297
#monotonous increase stack class MonotonStack(object): def __init__(self): self.stack = [int] self.pointer = -1 def push(self, e: int) -> []: pop = [] while self.stack[self.pointer] < e: pop.append(self.stack.pop(self.pointer)) self.pointer -= 1 s...
620
6
183
29c6d38134cb96da5a7ef2a274974210ea412ddb
2,165
py
Python
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob24.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
"""Problem 24: Lexographic permutations. Iteratively generate permutations""" import unittest def is_permutation(n, d): """Checks to see if n is a permutation of the digits 0-d.""" n = [int(i) for i in str(n)] if len(n) < d or len(n) > d+1: return False elif len(n) < d+1: n.insert(0, 0...
28.116883
64
0.563048
"""Problem 24: Lexographic permutations. Iteratively generate permutations""" import unittest def is_permutation(n, d): """Checks to see if n is a permutation of the digits 0-d.""" n = [int(i) for i in str(n)] if len(n) < d or len(n) > d+1: return False elif len(n) < d+1: n.insert(0, 0...
1,000
17
149
6d920bdccc2fe19aa21bd966b7946d23dddecdf2
3,975
py
Python
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
ipycli/tests/test_cli.py
dalejung/ipycli
eee39731d6fd437cac0ccdc1a84d17f30e3881ac
[ "Apache-2.0" ]
null
null
null
import os.path from unittest import TestCase import numpy as np import pandas as pd from ipycli.notebookmanager import NotebookManager from IPython.utils.tempdir import TemporaryDirectory if __name__ == '__main__': import n...
37.149533
116
0.601258
import os.path from unittest import TestCase import numpy as np import pandas as pd from ipycli.notebookmanager import NotebookManager from IPython.utils.tempdir import TemporaryDirectory class TestCLI(TestCase): def __init__(self, *args, **kwargs): TestCase.__init__(self, *args, **kwargs) def runT...
3,233
3
239
d23dcc7c087f9e606a97f89051d516ff7ec87597
360
py
Python
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
main.py
niesuch/ftp-backup
60dea63f5b77fded3ae03041d6c590e3833aa535
[ "MIT" ]
null
null
null
import ftplib import sys import os from lib.FTPUpload import FTPUpload if __name__ == '__main__': try: ftp_upload = FTPUpload(os.path.abspath('config/config.json')) ftp_upload.upload() except FileNotFoundError as error: sys.exit(f'File `{error.filename}` does not exist.') except ftp...
27.692308
69
0.680556
import ftplib import sys import os from lib.FTPUpload import FTPUpload if __name__ == '__main__': try: ftp_upload = FTPUpload(os.path.abspath('config/config.json')) ftp_upload.upload() except FileNotFoundError as error: sys.exit(f'File `{error.filename}` does not exist.') except ftp...
0
0
0
d297524cb61305cbbbc64fb60a791267557ad237
7,407
py
Python
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
gigliovale/h2o
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
882
2015-05-22T02:59:21.000Z
2022-02-17T05:02:48.000Z
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
1
2015-01-14T23:54:56.000Z
2015-01-15T20:04:17.000Z
py/testdir_release/c5/test_c5_KMeans_sphere_h1m_fvec.py
VonRosenchild/h2o-2
be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1
[ "Apache-2.0" ]
392
2015-05-22T17:04:11.000Z
2022-02-22T09:04:39.000Z
import unittest, time, sys, random, math, json sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_import as h2i, h2o_common import socket print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" DELETE_KEYS_EACH_ITER = True DO_KMEANS...
51.4375
142
0.590928
import unittest, time, sys, random, math, json sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_import as h2i, h2o_common import socket print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" DELETE_KEYS_EACH_ITER = True DO_KMEANS...
6,814
42
49
6ef795e30f4b23602565feb5a83126c90d675ae5
4,273
py
Python
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
src/rd_math.py
leahpar/RainDrop
cb7f43bd1b18841341ba7b812009038b545111c4
[ "MIT" ]
null
null
null
from scipy.optimize import fsolve # apt-get install python-scipy #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # REFLEX TIMING #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # | R0u R0d R1u ...
30.963768
87
0.37538
from scipy.optimize import fsolve # apt-get install python-scipy #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # REFLEX TIMING #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # | R0u R0d R1u ...
0
0
0
37a601c88c5e8196f43b23230a5cd91b7562bf83
762
py
Python
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
pmpapp/models.py
mani0608/DjangoProjectManager
41c5d7b16db8df01a79cb8722851325ef85b5010
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here.
31.75
72
0.74147
from django.db import models from django.contrib.auth.models import User # Create your models here. class UserInfo(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) website = models.URLField(blank=True) profile_picture = models.ImageField(upload_to='images', blank=True) def _...
53
561
45
caedfc9ca4d335bf9a6a0bb330a7d228fed7431b
4,163
py
Python
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
mouselight/visualizations/view_ng_mouselight_n5.py
pattonw/mouselight
296e6df7d4e79776ed9f8533d17d937bb6866082
[ "MIT" ]
null
null
null
from funlib.show.neuroglancer import add_layer, ScalePyramid import argparse import daisy import glob import neuroglancer import numpy as np import os import webbrowser from swc_parser import _parse_swc from pathlib import Path import itertools import random import logging ngid = itertools.count(start=1) parser = arg...
24.779762
119
0.665866
from funlib.show.neuroglancer import add_layer, ScalePyramid import argparse import daisy import glob import neuroglancer import numpy as np import os import webbrowser from swc_parser import _parse_swc from pathlib import Path import itertools import random import logging ngid = itertools.count(start=1) parser = arg...
648
0
46
1b515003b261436128953a65288c4fe53580d5c5
121
py
Python
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
11
2021-09-01T23:10:51.000Z
2022-03-20T07:39:37.000Z
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
22
2021-05-18T14:10:27.000Z
2021-10-04T15:06:27.000Z
oremda/event_loops/__init__.py
OpenChemistry/oremda
3fb4cb8318713b87ecd7999ee2b725da745dd023
[ "BSD-3-Clause" ]
2
2021-09-01T22:11:13.000Z
2021-10-30T09:12:36.000Z
from .mpi import MPINonRootEventLoop, MPIRootEventLoop __all__ = [ "MPINonRootEventLoop", "MPIRootEventLoop", ]
17.285714
54
0.743802
from .mpi import MPINonRootEventLoop, MPIRootEventLoop __all__ = [ "MPINonRootEventLoop", "MPIRootEventLoop", ]
0
0
0
8c50bb3aec8aade33d39e6f2be7cc79a8286f00b
3,351
py
Python
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
null
null
null
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
null
null
null
systemtimer.py
eyespied/F.R.A.M.E
5b52cd2a03bb6cd2c8dab7ba9e9e0166f35b195b
[ "MIT" ]
1
2020-02-20T16:29:23.000Z
2020-02-20T16:29:23.000Z
__author__ = "James Clark" __copyright__ = "Copyright 2020, F.R.A.M.E Project" __credits__ = ["James Clark"] __version__ = "1.0" # Import in necessary libraries import threading import time import sqlForGui import gui from datetime import datetime, date current_time_and_date = '' # Function that runs the system tim...
28.398305
102
0.718591
__author__ = "James Clark" __copyright__ = "Copyright 2020, F.R.A.M.E Project" __credits__ = ["James Clark"] __version__ = "1.0" # Import in necessary libraries import threading import time import sqlForGui import gui from datetime import datetime, date current_time_and_date = '' # Function that runs the system tim...
2,053
0
115
16b96fe856e7e2032cbc02a1cd8e01350f4797d1
4,663
py
Python
samples/aci_demo_contract.py
michsmit99/snapback
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
1
2020-08-19T13:48:40.000Z
2020-08-19T13:48:40.000Z
samples/aci_demo_contract.py
michsmit99/development
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
null
null
null
samples/aci_demo_contract.py
michsmit99/development
a1ba92b3a73cfa20144f6a6f45a7d3ce893ee5b4
[ "Apache-2.0" ]
null
null
null
################################################################################ # _ ____ ___ _____ _ _ _ _ # # / \ / ___|_ _| |_ _|__ ___ | | | _(_) |_ # # / _ \| | | | | |/ _ \ / _ \| | |/ / | __| ...
46.168317
80
0.43234
################################################################################ # _ ____ ___ _____ _ _ _ _ # # / \ / ___|_ _| |_ _|__ ___ | | | _(_) |_ # # / _ \| | | | | |/ _ \ / _ \| | |/ / | __| ...
0
0
0
10fc91fbb02e7c36e489e3fffd3f00edd172bd34
151
py
Python
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
pure_aionsq/log.py
RafRaf/pure-aionsq
b22defeb52393d3ffea71845fa73591731a88c3f
[ "MIT" ]
null
null
null
import logging from pure_aionsq.settings import loggerName _logger = logging.getLogger(loggerName) _logger.setLevel(logging.DEBUG) logger = _logger
16.777778
43
0.827815
import logging from pure_aionsq.settings import loggerName _logger = logging.getLogger(loggerName) _logger.setLevel(logging.DEBUG) logger = _logger
0
0
0
2c76d9fd7275046201d22b0f3439688b107cac98
2,175
py
Python
nhc2_coco/coco_profiles.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
4
2020-04-15T11:33:31.000Z
2022-03-04T17:20:26.000Z
nhc2_coco/coco_profiles.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
5
2021-01-28T22:01:57.000Z
2021-12-19T14:56:56.000Z
nhc2_coco/coco_profiles.py
nielsvissers/nhc2-coco
4afd0ef568a72c9e6a4ad68e56467aaf62044c53
[ "MIT" ]
12
2020-01-15T19:49:55.000Z
2022-03-04T17:20:27.000Z
import json import os from time import sleep import paho.mqtt.client as mqtt from nhc2_coco.const import MQTT_TOPIC_PUBLIC_AUTH_RSP, MQTT_PROTOCOL, MQTT_TRANSPORT, MQTT_TOPIC_PUBLIC_AUTH_CMD class CoCoProfiles: """CoCoDiscover will collect a list of profiles on a NHC2 """
36.864407
113
0.638621
import json import os from time import sleep import paho.mqtt.client as mqtt from nhc2_coco.const import MQTT_TOPIC_PUBLIC_AUTH_RSP, MQTT_PROTOCOL, MQTT_TRANSPORT, MQTT_TOPIC_PUBLIC_AUTH_CMD class CoCoProfiles: """CoCoDiscover will collect a list of profiles on a NHC2 """ def __init__(self, callback, a...
1,809
0
81
6d86c80ac6abf9907c11d4d63b0e2161e290cde9
8,100
py
Python
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
279
2015-01-10T09:55:35.000Z
2022-03-28T02:34:03.000Z
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
10
2017-10-05T15:48:50.000Z
2021-09-20T12:06:52.000Z
google_or_tools/einav_puzzle_sat.py
tias/hakank
87b7f180c9393afce440864eb9e5fb119bdec1a4
[ "MIT" ]
83
2015-01-20T03:44:00.000Z
2022-03-13T23:53:06.000Z
# Copyright 2021 Hakan Kjellerstrand hakank@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
34.468085
90
0.595309
# Copyright 2021 Hakan Kjellerstrand hakank@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
5,641
0
23
b4182e1459c54470017bc1fdd0a30555d4eabb91
4,767
py
Python
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
1
2022-03-15T03:21:44.000Z
2022-03-15T03:21:44.000Z
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
null
null
null
python/tink/streaming_aead/_decrypting_stream.py
fax001/tink
9f30c97cb84b10bbba6978bc9c12c86478024050
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.051471
80
0.707573
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
48
0
25
d373a091b51821f147d0f588f36e39588c7b42f1
1,164
py
Python
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
1
2017-11-01T15:19:10.000Z
2017-11-01T15:19:10.000Z
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
null
null
null
min_bias/min_bias_calc.py
victor-gil-sepulveda/PhD-ANMPythonHelpers
c0e15684cce4aa4da90141b51f043a567a5f8655
[ "MIT" ]
null
null
null
''' Created on 14/9/2015 @author: victor ''' import sys import numpy from nma_algo_char.data_retrieval import calculate_rmsds if __name__ == '__main__': current_coords = numpy.delete(numpy.loadtxt(sys.argv[1]),0,1) proposal_coords = numpy.delete(numpy.loadtxt(sys.argv[2]),0,1) anm_final_coords = numpy.del...
34.235294
72
0.659794
''' Created on 14/9/2015 @author: victor ''' import sys import numpy from nma_algo_char.data_retrieval import calculate_rmsds if __name__ == '__main__': current_coords = numpy.delete(numpy.loadtxt(sys.argv[1]),0,1) proposal_coords = numpy.delete(numpy.loadtxt(sys.argv[2]),0,1) anm_final_coords = numpy.del...
0
0
0
be5511693a45ec4ffc03246aea2338dbb036fe3f
2,402
py
Python
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
Python3/355.design-twitter.py
610yilingliu/leetcode
30d071b3685c2131bd3462ba77c6c05114f3f227
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=355 lang=python3 # # [355] Design Twitter # import collections import heapq # @lc code=start # Your Twitter object will be instantiated and called as such: # obj = Twitter() # obj.postTweet(1,5) # param_2 = obj.getNewsFeed(1) # obj.follow(1,2) # obj.postTweet(2,6) # param_2 = obj.getNewsFeed(1...
34.314286
224
0.628643
# # @lc app=leetcode id=355 lang=python3 # # [355] Design Twitter # import collections import heapq # @lc code=start class Twitter: def __init__(self): """ Initialize your data structure here. """ self.user_and_posts = collections.defaultdict(list) self.user_and_followers = ...
0
1,987
22
315e53cbb30810268cbe2e7fbc7e5ed76c295e5f
578
py
Python
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
407
2015-01-04T22:57:08.000Z
2022-01-11T18:39:15.000Z
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
23
2015-01-05T02:45:00.000Z
2020-12-23T14:15:14.000Z
chartkick/options.py
anuragverma65/chartkick.py
4d0f2f78fd580c3c81fe8417b9c0e0d01a53c32a
[ "MIT" ]
104
2015-01-04T17:38:20.000Z
2021-08-01T20:01:26.000Z
from __future__ import absolute_import import json import logging
27.52381
72
0.544983
from __future__ import absolute_import import json import logging class Options(dict): def __init__(self, *args, **kwargs) : dict.__init__(self, *args, **kwargs) def load(self, filename): with open(filename) as jsonfile: options = json.loads(jsonfile.read()) self.clea...
435
-1
76
679613bd12fecb378a8099413ced54a7d7b835e4
85
py
Python
rider/apps.py
garvinipkiss/the-ride
7662cf4d27b6f42ade45446f36573d73f337d3df
[ "Unlicense" ]
null
null
null
rider/apps.py
garvinipkiss/the-ride
7662cf4d27b6f42ade45446f36573d73f337d3df
[ "Unlicense" ]
null
null
null
rider/apps.py
garvinipkiss/the-ride
7662cf4d27b6f42ade45446f36573d73f337d3df
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig
14.166667
33
0.741176
from django.apps import AppConfig class riderConfig(AppConfig): name = 'rider'
0
27
23
c1b4e83ebdecf306834ecc00b17106d9265eea49
359
py
Python
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
null
null
null
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
1
2020-12-08T09:51:42.000Z
2020-12-08T09:51:42.000Z
tests/generate_testdata.py
slub/es2json
be22a193c615043693d580ff73f89adf4c0fe8f1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import json import gzip MAX = 1000 if __name__ == "__main__": with gzip.open("./tests/testdata.ldj.gz", "wt") as outp: for n in range(0, MAX): print(json.dumps({"foo": n, "bar": MAX-n, "baz": "test{}".format(n) ...
25.642857
60
0.448468
#!/usr/bin/env python3 import json import gzip MAX = 1000 if __name__ == "__main__": with gzip.open("./tests/testdata.ldj.gz", "wt") as outp: for n in range(0, MAX): print(json.dumps({"foo": n, "bar": MAX-n, "baz": "test{}".format(n) ...
0
0
0
1b1149928c2a0eb24ac9ec2d170effc87cebd2bf
1,040
py
Python
cogs/util.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
1
2020-09-04T03:59:27.000Z
2020-09-04T03:59:27.000Z
cogs/util.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
null
null
null
cogs/util.py
sergenp/gladoidbot
6e450d8b379e2c8238e4cf32b3d71b2e13154034
[ "MIT" ]
1
2020-03-18T13:10:11.000Z
2020-03-18T13:10:11.000Z
from discord import Embed, DMChannel, File import os
43.333333
214
0.696154
from discord import Embed, DMChannel, File import os async def send_embed_message(ctx, content="", title="", colour=0x0080c0, thumbnail_link="", author_name="", author_icon_link="", field_list=[], title_url="", image_url = "", image_local_file=False, footer_text=""): em = Embed(title=title, description=content, co...
963
0
23
8a600accf720d7910edc329583e7353bf5eacf1e
824
py
Python
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
updateMathSciNet.py
musm/abbrv.jabref.org
97e28a876dd09149bf6fc974a960ac80408b17d9
[ "CC0-1.0" ]
null
null
null
import os import urllib.request import csv csv_file_path = 'mathscinet.csv' urllib.request.urlretrieve('https://mathscinet.ams.org/msnhtml/annser.csv', csv_file_path) with open(csv_file_path, mode='r') as csv_file, open('journal_abbreviations_mathematics.txt', mode='w') as abbreviations_file: abbreviations_file =...
35.826087
126
0.680825
import os import urllib.request import csv csv_file_path = 'mathscinet.csv' urllib.request.urlretrieve('https://mathscinet.ams.org/msnhtml/annser.csv', csv_file_path) with open(csv_file_path, mode='r') as csv_file, open('journal_abbreviations_mathematics.txt', mode='w') as abbreviations_file: abbreviations_file =...
0
0
0