hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fa5e14fa548e86ae6533ead8e6779b2df82b39
1,510
py
Python
data/menus/options_menu.py
ChristianD37/PyRacer
8f096723bdea95c3e918b2f70b01e3ed0b3f9fe1
[ "MIT" ]
4
2021-01-12T10:22:45.000Z
2021-02-17T04:49:59.000Z
data/menus/options_menu.py
ChristianD37/PyRacer
8f096723bdea95c3e918b2f70b01e3ed0b3f9fe1
[ "MIT" ]
null
null
null
data/menus/options_menu.py
ChristianD37/PyRacer
8f096723bdea95c3e918b2f70b01e3ed0b3f9fe1
[ "MIT" ]
1
2021-01-17T04:32:39.000Z
2021-01-17T04:32:39.000Z
from data.menus.menu import Menu class OptionsMenu(Menu): def __init__(self, game): Menu.__init__(self, game) self.states = {0 : "Volume", 1 : "Controls"} self.index, self.newline = 0, 40 self.cursor_rect.center = (self.game.DISPLAY_W/2, self.game.DISPLAY_H/2 ) def di...
44.411765
119
0.564238
from data.menus.menu import Menu class OptionsMenu(Menu): def __init__(self, game): Menu.__init__(self, game) self.states = {0 : "Volume", 1 : "Controls"} self.index, self.newline = 0, 40 self.cursor_rect.center = (self.game.DISPLAY_W/2, self.game.DISPLAY_H/2 ) def di...
true
true
f7fa5e91400000b4953ab8022408df2a80e3be82
3,388
py
Python
pypoca/cogs/general.py
leandcesar/PyPoca
416f690faad0b511ca9d04b012af35256ee95089
[ "MIT" ]
1
2021-11-22T04:22:08.000Z
2021-11-22T04:22:08.000Z
pypoca/cogs/general.py
leandcesar/PyPoca
416f690faad0b511ca9d04b012af35256ee95089
[ "MIT" ]
null
null
null
pypoca/cogs/general.py
leandcesar/PyPoca
416f690faad0b511ca9d04b012af35256ee95089
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import disnake from disnake.ext import commands from pypoca.config import COLOR, URLS from pypoca.database import Server from pypoca.ext import ALL, DEFAULT, Choice, Option class General(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot @commands.slash_comm...
47.055556
113
0.626328
import disnake from disnake.ext import commands from pypoca.config import COLOR, URLS from pypoca.database import Server from pypoca.ext import ALL, DEFAULT, Choice, Option class General(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot @commands.slash_command(name="ping", descri...
true
true
f7fa5ebc1de24bb058fb900810372a06231c2c5a
1,279
py
Python
___Python/Jonas/Python/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import random r= random.Random() def wuerfeln(): return r.randint(1, 6) # Augenzahl zwischen 1 und 6 def muenzwurf(): return r.randint(0,1) # 0 = Kopf, 1 = Zahl print(wuerfeln()) d = {} for i in range(10000): augenzahl = wuerfeln() if augenzahl in d: d[augenzahl] += 1 e...
24.596154
93
0.629398
import random r= random.Random() def wuerfeln(): return r.randint(1, 6) def muenzwurf(): return r.randint(0,1) print(wuerfeln()) d = {} for i in range(10000): augenzahl = wuerfeln() if augenzahl in d: d[augenzahl] += 1 else: d[augenzahl] = 1 print(d) def...
true
true
f7fa5f1642a150279cadce1f48333bb3cecfcb27
955
py
Python
button.py
DamianS6/Jordan-Catch
ff786527503ec3ddaa3856bc77eb8b919e69048d
[ "MIT" ]
null
null
null
button.py
DamianS6/Jordan-Catch
ff786527503ec3ddaa3856bc77eb8b919e69048d
[ "MIT" ]
null
null
null
button.py
DamianS6/Jordan-Catch
ff786527503ec3ddaa3856bc77eb8b919e69048d
[ "MIT" ]
null
null
null
import pygame.font class Button: def __init__(self, screen, msg): """Initialize button size and position.""" self.screen = screen self.screen_rect = screen.get_rect() self.width, self.height = 200, 50 self.button_color = (0, 0, 0) self.font_color = (200,...
32.931034
70
0.597906
import pygame.font class Button: def __init__(self, screen, msg): self.screen = screen self.screen_rect = screen.get_rect() self.width, self.height = 200, 50 self.button_color = (0, 0, 0) self.font_color = (200, 83, 65) self.font = pygame.font.SysFont(No...
true
true
f7fa5f37f12354bcee4297263876bb8a2f70c161
394
py
Python
examples/tutorials/04_1_line_2.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
5
2019-09-23T05:15:47.000Z
2021-01-17T08:06:47.000Z
examples/tutorials/04_1_line_2.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
3
2019-05-03T05:25:17.000Z
2021-04-15T04:53:16.000Z
examples/tutorials/04_1_line_2.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
4
2019-05-04T13:42:40.000Z
2021-04-15T10:38:48.000Z
from easygraphics import * import math as m def main(): init_graph(600, 400) translate(300, 200) # move origin to the center scale(100, -100) # zoom each axis 100 times, and make y-axis grow from bottom to top. x = -3 delta = 0.01 move_to(x, m.sin(x)) while x <= 3: line_to(x, m.s...
21.888889
90
0.593909
from easygraphics import * import math as m def main(): init_graph(600, 400) translate(300, 200) scale(100, -100) x = -3 delta = 0.01 move_to(x, m.sin(x)) while x <= 3: line_to(x, m.sin(x)) x = x + delta pause() close_graph() easy_run(main)
true
true
f7fa5fb35a032d36136d6c301dc8ea08f4be8ca9
172
py
Python
wrangle/utils/connection_check.py
abhijithneilabraham/wrangle
cff8f3232b6ec31a94f533f41a5f05a9aa1d4273
[ "MIT" ]
17
2018-07-29T20:02:55.000Z
2022-02-27T20:58:48.000Z
wrangle/utils/connection_check.py
abhijithneilabraham/wrangle
cff8f3232b6ec31a94f533f41a5f05a9aa1d4273
[ "MIT" ]
24
2018-07-10T14:41:40.000Z
2022-01-31T19:44:32.000Z
wrangle/utils/connection_check.py
abhijithneilabraham/wrangle
cff8f3232b6ec31a94f533f41a5f05a9aa1d4273
[ "MIT" ]
10
2019-07-29T03:36:47.000Z
2022-03-05T12:29:59.000Z
import socket def is_connected(): try: socket.create_connection(("www.google.com", 80)) return True except OSError: pass return False
15.636364
56
0.610465
import socket def is_connected(): try: socket.create_connection(("www.google.com", 80)) return True except OSError: pass return False
true
true
f7fa60b5e1ff37188d7b2c8d751957108f76b262
8,134
py
Python
satchmo/caching/__init__.py
sankroh/satchmo
e48df0c2a4be4ce14785d0a5d6dd1e516c57a838
[ "BSD-3-Clause" ]
1
2016-05-09T12:21:04.000Z
2016-05-09T12:21:04.000Z
satchmo/caching/__init__.py
sankroh/satchmo
e48df0c2a4be4ce14785d0a5d6dd1e516c57a838
[ "BSD-3-Clause" ]
null
null
null
satchmo/caching/__init__.py
sankroh/satchmo
e48df0c2a4be4ce14785d0a5d6dd1e516c57a838
[ "BSD-3-Clause" ]
null
null
null
"""A full cache system written on top of Django's rudimentary one.""" from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str import cPickle as pickle import md5 import types import logging from satchmo.utils import is_string_like, is_list_or_tuple log = loggin...
29.05
116
0.592328
"""A full cache system written on top of Django's rudimentary one.""" from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str import cPickle as pickle import md5 import types import logging from satchmo.utils import is_string_like, is_list_or_tuple log = loggin...
false
true
f7fa60c2eb33aa41af6762f478a7a41957396632
208
py
Python
projects/serializers.py
KeoH/orchestrapi
575e66a86c42b5c249fd943bb5f40c8c310139aa
[ "MIT" ]
1
2021-07-05T19:37:37.000Z
2021-07-05T19:37:37.000Z
projects/serializers.py
KeoH/orchestrapi
575e66a86c42b5c249fd943bb5f40c8c310139aa
[ "MIT" ]
6
2020-06-05T19:30:52.000Z
2021-07-05T19:28:53.000Z
projects/serializers.py
KeoH/orchestrapi
575e66a86c42b5c249fd943bb5f40c8c310139aa
[ "MIT" ]
1
2020-05-15T23:58:24.000Z
2020-05-15T23:58:24.000Z
from rest_framework import serializers from .models import Project class ProjectSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ['id', 'name', 'network']
18.909091
53
0.701923
from rest_framework import serializers from .models import Project class ProjectSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ['id', 'name', 'network']
true
true
f7fa60ee824b460f2c2497316b8fd85faa86e2e2
9,238
py
Python
transtory/shanghaimetro/publicdata.py
feynfan13/transtory
4dd48033fdcd95b4a0dbc19f5b26d15b4b533979
[ "MIT" ]
1
2018-12-20T08:05:11.000Z
2018-12-20T08:05:11.000Z
transtory/shanghaimetro/publicdata.py
feynfan13/transtory
4dd48033fdcd95b4a0dbc19f5b26d15b4b533979
[ "MIT" ]
null
null
null
transtory/shanghaimetro/publicdata.py
feynfan13/transtory
4dd48033fdcd95b4a0dbc19f5b26d15b4b533979
[ "MIT" ]
null
null
null
import os import pandas as pd from transtory.common import singleton from .configs import get_configs, ShmSysConfigs class ShmPublicData(object): """Public data, including -- Lines -- Stations -- Trains """ train_json_name = 'trains.json' def __init__(self): self.trai...
45.960199
103
0.638991
import os import pandas as pd from transtory.common import singleton from .configs import get_configs, ShmSysConfigs class ShmPublicData(object): train_json_name = 'trains.json' def __init__(self): self.train_vs_type = None @staticmethod def _get_train_sn_from_line_and_seq(line, seq, gen=No...
true
true
f7fa6325c0c66eb6dbf2dfdbe962e844e057f342
347
py
Python
docs/examples/expected_exceptions.py
vlcinsky/nameko
88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d
[ "Apache-2.0" ]
3,425
2016-11-10T17:12:42.000Z
2022-03-31T19:07:49.000Z
docs/examples/expected_exceptions.py
vlcinsky/nameko
88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d
[ "Apache-2.0" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
docs/examples/expected_exceptions.py
vlcinsky/nameko
88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d
[ "Apache-2.0" ]
420
2016-11-17T05:46:42.000Z
2022-03-23T12:36:06.000Z
from nameko.rpc import rpc from .auth import Auth, Unauthorized class Service: name = "service" auth = Auth() @rpc(expected_exceptions=Unauthorized) def update(self, data): if not self.auth.has_role("admin"): raise Unauthorized() # perform update raise TypeError...
19.277778
49
0.639769
from nameko.rpc import rpc from .auth import Auth, Unauthorized class Service: name = "service" auth = Auth() @rpc(expected_exceptions=Unauthorized) def update(self, data): if not self.auth.has_role("admin"): raise Unauthorized() raise TypeError("Whoops, genuin...
true
true
f7fa64a912a6fdf7458fa98f32593eb327eddb1b
7,960
py
Python
pyKinectTools/utils/AlignCameras.py
colincsl/pyKinectTools
a84bb5b7ff9dd613576415932865c2ad435520b3
[ "BSD-2-Clause-FreeBSD" ]
33
2015-04-07T16:28:04.000Z
2021-11-22T00:28:43.000Z
pyKinectTools/utils/AlignCameras.py
colincsl/pyKinectTools
a84bb5b7ff9dd613576415932865c2ad435520b3
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
pyKinectTools/utils/AlignCameras.py
colincsl/pyKinectTools
a84bb5b7ff9dd613576415932865c2ad435520b3
[ "BSD-2-Clause-FreeBSD" ]
13
2015-04-07T16:28:34.000Z
2021-04-26T08:04:36.000Z
''' Use this file to hand register multiple depth cameras with the 3D visualizer Procedure: 1) Modify the scrip below for your files 2) After adding points, click the mayavi button in the window and add Transformation to the scene. Drag the second points to the transformation. 3) Manually match the two scenes 4) Click...
44.222222
338
0.72098
from pyKinectTools.utils.DepthUtils import * from scipy.misc import imread from mayavi import mlab from mayavi.api import Engine import cPickle as pickle depthIm1 = imread(depthFile1) depthIm2 = imread(depthFile2) pts1 = depthIm2XYZ(depthIm1).astype(np.int) pts2 = depthIm2XYZ(depthIm2).astype(np.int) engine ...
true
true
f7fa64f8c250a5640d137418842647c5bfc14206
17,076
py
Python
env/lib/python3.6/site-packages/nacl/bindings/crypto_pwhash.py
escacan/GymTracker
cda8f821bf9e77fa442f778661fc2123cb590dc5
[ "Apache-2.0" ]
3
2018-07-04T12:21:31.000Z
2020-10-27T09:07:00.000Z
nacl/bindings/crypto_pwhash.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2018-04-04T12:13:40.000Z
2018-05-03T07:57:52.000Z
nacl/bindings/crypto_pwhash.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2020-05-03T01:13:16.000Z
2020-05-03T01:13:16.000Z
# Copyright 2013 Donald Stufft and individual contributors # # 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...
36.025316
78
0.685406
from __future__ import absolute_import, division, print_function import sys from six import integer_types import nacl.exceptions as exc from nacl._sodium import ffi, lib from nacl.exceptions import ensure crypto_pwhash_scryptsalsa208sha256_STRPREFIX = \ ffi.string(ffi.cast("char *", ...
true
true
f7fa6aa837d5ab35ff608cdc236096f65ff30d1e
1,373
py
Python
kbc/regularizers/__init__.py
AgaDob/concept_formation_in_knowledge_graphs
9d68981207dddecb5a5d7de2d016333fd44ee6dc
[ "MIT" ]
null
null
null
kbc/regularizers/__init__.py
AgaDob/concept_formation_in_knowledge_graphs
9d68981207dddecb5a5d7de2d016333fd44ee6dc
[ "MIT" ]
null
null
null
kbc/regularizers/__init__.py
AgaDob/concept_formation_in_knowledge_graphs
9d68981207dddecb5a5d7de2d016333fd44ee6dc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from kbc.regularizers.base import Regularizer from kbc.regularizers.base import F2 from kbc.regularizers.base import L1 from kbc.regularizers.base import N3 from kbc.regularizers.base import NX from kbc.regularizers.adaptive import AdaptiveRegularizer from kbc.regularizers.adaptive import NX...
33.487805
84
0.827385
from kbc.regularizers.base import Regularizer from kbc.regularizers.base import F2 from kbc.regularizers.base import L1 from kbc.regularizers.base import N3 from kbc.regularizers.base import NX from kbc.regularizers.adaptive import AdaptiveRegularizer from kbc.regularizers.adaptive import NXAdaptiveRegularizer fro...
true
true
f7fa6adce65db2cbd5a4497551024c1b89fa5087
1,645
py
Python
end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
172
2020-02-15T20:14:16.000Z
2021-06-09T07:09:15.000Z
end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
410
2020-02-15T19:39:29.000Z
2021-06-09T19:28:57.000Z
end_to_end_tests/golden-record/my_test_api_client/api/tests/post_form_data.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
38
2020-04-12T09:36:27.000Z
2021-06-11T08:57:07.000Z
from typing import Any, Dict import httpx from ...client import Client from ...models.a_form_data import AFormData from ...types import Response def _get_kwargs( *, client: Client, form_data: AFormData, ) -> Dict[str, Any]: url = "{}/tests/post_form_data".format(client.base_url) headers: Dict[s...
19.127907
70
0.617629
from typing import Any, Dict import httpx from ...client import Client from ...models.a_form_data import AFormData from ...types import Response def _get_kwargs( *, client: Client, form_data: AFormData, ) -> Dict[str, Any]: url = "{}/tests/post_form_data".format(client.base_url) headers: Dict[s...
true
true
f7fa6af0aa46bdc831e530ff8b6e10db81c4c085
4,621
py
Python
fetch_papers.py
pepicello/quant-arxiv-sanity-preserver
9a6920df359085c38133ee22a56a3b9610e3b8c2
[ "MIT" ]
6
2018-08-22T12:58:09.000Z
2021-05-28T17:33:29.000Z
fetch_papers.py
pepicello/quant-arxiv-sanity-preserver
9a6920df359085c38133ee22a56a3b9610e3b8c2
[ "MIT" ]
null
null
null
fetch_papers.py
pepicello/quant-arxiv-sanity-preserver
9a6920df359085c38133ee22a56a3b9610e3b8c2
[ "MIT" ]
null
null
null
""" Queries arxiv API and downloads papers (the query is a parameter). The script is intended to enrich an existing database pickle (by default db.p), so this file will be loaded first, and then new results will be added to it. """ import os import time import pickle import random import argparse import urllib.request...
36.968
149
0.652889
import os import time import pickle import random import argparse import urllib.request import feedparser from utils import Config, safe_pickle_dump def encode_feedparser_dict(d): if isinstance(d, feedparser.FeedParserDict) or isinstance(d, dict): j = {} for k in d.keys(): j[k] = encode_feedparser_di...
true
true
f7fa6af52227c61161fccc5f9a1d62a0c2f15438
14,085
py
Python
models/pointcnn.py
mhwasil/pointcloud_classification
c4dd36db556087cc90dca16e31958adfd3641482
[ "MIT" ]
4
2021-11-14T14:54:03.000Z
2022-01-26T14:47:17.000Z
models/pointcnn.py
mhwasil/cnn_pointcloud_classification
c4dd36db556087cc90dca16e31958adfd3641482
[ "MIT" ]
1
2019-09-17T09:54:34.000Z
2019-09-17T09:54:34.000Z
models/pointcnn.py
mhwasil/pointcloud_classification
c4dd36db556087cc90dca16e31958adfd3641482
[ "MIT" ]
1
2019-12-05T19:46:16.000Z
2019-12-05T19:46:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.join(BASE_DIR, '../../utils/pointcnn')) import math import pointfly as pf import ten...
49.770318
124
0.567483
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.join(BASE_DIR, '../../utils/pointcnn')) import math import pointfly as pf import ten...
true
true
f7fa6af915f71ef76d4daaa41ed41a3c60ba2778
118
py
Python
PythonClient/gym-car/gym_car/__init__.py
Yuchi94/CustomAirSim
8eec882e603c8c6cfdab8969b29daa02e2babc87
[ "MIT" ]
3
2020-12-18T07:07:44.000Z
2021-10-18T02:43:01.000Z
PythonClient/gym-car/gym_car/__init__.py
Yuchi94/CustomAirSim
8eec882e603c8c6cfdab8969b29daa02e2babc87
[ "MIT" ]
null
null
null
PythonClient/gym-car/gym_car/__init__.py
Yuchi94/CustomAirSim
8eec882e603c8c6cfdab8969b29daa02e2babc87
[ "MIT" ]
null
null
null
from gym.envs.registration import register register( id='carsim-v0', entry_point='gym_car.envs:CarSimEnv', )
16.857143
42
0.728814
from gym.envs.registration import register register( id='carsim-v0', entry_point='gym_car.envs:CarSimEnv', )
true
true
f7fa6b0f47dd67c4cc969147764ee845e362bd9d
11,089
py
Python
tests/terraform_compliance/common/test_helper.py
rileydak/terraform-compliance
6397b4b9b3ce7e23850c0ac0fb77d4bef044c266
[ "MIT" ]
1
2019-12-07T01:04:27.000Z
2019-12-07T01:04:27.000Z
tests/terraform_compliance/common/test_helper.py
rileydak/terraform-compliance
6397b4b9b3ce7e23850c0ac0fb77d4bef044c266
[ "MIT" ]
null
null
null
tests/terraform_compliance/common/test_helper.py
rileydak/terraform-compliance
6397b4b9b3ce7e23850c0ac0fb77d4bef044c266
[ "MIT" ]
null
null
null
from unittest import TestCase from terraform_compliance.common.helper import ( flatten_list, check_if_cidr, is_ip_in_cidr, assign_sg_params, validate_sg_rule, seek_key_in_dict, find_root_by_key, are_networks_same, convert_resource_type, seek_regex_key_in_dict_values, jsonify,...
43.83004
154
0.649202
from unittest import TestCase from terraform_compliance.common.helper import ( flatten_list, check_if_cidr, is_ip_in_cidr, assign_sg_params, validate_sg_rule, seek_key_in_dict, find_root_by_key, are_networks_same, convert_resource_type, seek_regex_key_in_dict_values, jsonify,...
true
true
f7fa6b1c4d8f9c99d2440254d038c5e0584a4b01
1,372
py
Python
logs/urls.py
huseyinyilmaz/worklogger
3ad66bd7f96e977f5d4a1adb2d3e419a08622cd0
[ "MIT" ]
1
2017-04-25T10:02:53.000Z
2017-04-25T10:02:53.000Z
logs/urls.py
huseyinyilmaz/worklogger
3ad66bd7f96e977f5d4a1adb2d3e419a08622cd0
[ "MIT" ]
null
null
null
logs/urls.py
huseyinyilmaz/worklogger
3ad66bd7f96e977f5d4a1adb2d3e419a08622cd0
[ "MIT" ]
null
null
null
from django.conf.urls import patterns, url from django.contrib import admin from logs import views admin.autodiscover() urlpatterns = patterns( '', # Examples: # url(r'^$', 'worklogger.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]+)/(...
28.583333
67
0.548834
from django.conf.urls import patterns, url from django.contrib import admin from logs import views admin.autodiscover() urlpatterns = patterns( '', url(r'^(?P<year>[0-9]{4})/(?P<month>[0-9]+)/(?P<day>[0-9]+)/$', views.LogDayArchiveView.as_view(), name="logs-day"), url(r'^(?...
true
true
f7fa6c8f5eed64b921de94a8e17b58be55e8dfd7
1,339
py
Python
sam-application/lambda_restapi/core/config.py
gbourniq/lambda-restapi
11d59bb7182fb8d2a0508399607724b9ac3c1601
[ "MIT" ]
2
2020-12-25T20:13:04.000Z
2021-02-04T19:09:11.000Z
sam-application/lambda_restapi/core/config.py
gbourniq/lambda-restapi
11d59bb7182fb8d2a0508399607724b9ac3c1601
[ "MIT" ]
null
null
null
sam-application/lambda_restapi/core/config.py
gbourniq/lambda-restapi
11d59bb7182fb8d2a0508399607724b9ac3c1601
[ "MIT" ]
null
null
null
"""Main configuration parameters for FastAPI and Lambda powertools""" from pathlib import Path from typing import List from starlette.config import Config from starlette.datastructures import URL, CommaSeparatedStrings, Secret # Paths SAM_APP_DIR = Path(__file__).resolve().parent.parent.parent ENV_PATH = SAM_APP_DIR ...
38.257143
79
0.78118
from pathlib import Path from typing import List from starlette.config import Config from starlette.datastructures import URL, CommaSeparatedStrings, Secret SAM_APP_DIR = Path(__file__).resolve().parent.parent.parent ENV_PATH = SAM_APP_DIR / ".env" print(f"Loading configs from {ENV_PATH}") config = Config(env_file=E...
true
true
f7fa6cb3492812d61ef4505d7530e8195aca21d3
9,760
py
Python
sawtooth/transaction_processor/enclave_registry_handler.py
cheevo/private-data-objects
a73f13633dc9e5d77cbd402645eb22f6d4086786
[ "Apache-2.0" ]
null
null
null
sawtooth/transaction_processor/enclave_registry_handler.py
cheevo/private-data-objects
a73f13633dc9e5d77cbd402645eb22f6d4086786
[ "Apache-2.0" ]
null
null
null
sawtooth/transaction_processor/enclave_registry_handler.py
cheevo/private-data-objects
a73f13633dc9e5d77cbd402645eb22f6d4086786
[ "Apache-2.0" ]
1
2018-06-20T18:15:32.000Z
2018-06-20T18:15:32.000Z
# Copyright 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
42.434783
107
0.619262
import logging import hashlib import base64 import json from cryptography.hazmat import backends from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.exceptions import Inv...
true
true
f7fa6d040b4db47c1bf0a94459d8562527bc40ad
1,982
py
Python
model_zoo/official/cv/resnet/postprocess.py
kungfu-team/mindspore-bert
71501cf52ae01db9d6a73fb64bcfe68a6509dc32
[ "Apache-2.0" ]
2
2021-07-08T13:10:42.000Z
2021-11-08T02:48:57.000Z
model_zoo/official/cv/resnet/postprocess.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
model_zoo/official/cv/resnet/postprocess.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # less required by applicable law or agreed to i...
38.115385
107
0.67003
import os import json import argparse import numpy as np from src.config import config2 as config batch_size = 1 parser = argparse.ArgumentParser(description="resnet inference") parser.add_argument("--result_path", type=str, required=True, help="result files path.") parser.add_argument("--label_path", ty...
true
true
f7fa6da328997d03e1055b10ed84423e5c467e8c
6,975
py
Python
my_vim_files/python27/Lib/idlelib/aboutDialog.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
81
2017-03-13T08:24:01.000Z
2021-04-02T09:48:38.000Z
my_vim_files/python27/Lib/idlelib/aboutDialog.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
6
2017-04-30T08:36:55.000Z
2017-09-22T01:37:28.000Z
my_vim_files/python27/Lib/idlelib/aboutDialog.py
satsaeid/dotfiles
401c3213b31dd941b44e553c6f0441187b01c19a
[ "MIT" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
"""About Dialog for IDLE """ from Tkinter import * import os from idlelib import textView from idlelib import idlever class AboutDialog(Toplevel): """Modal about dialog for idle """ def __init__(self,parent,title): Toplevel.__init__(self, parent) self.configure(borderwid...
46.192053
81
0.567742
from Tkinter import * import os from idlelib import textView from idlelib import idlever class AboutDialog(Toplevel): def __init__(self,parent,title): Toplevel.__init__(self, parent) self.configure(borderwidth=5) self.geometry("+%d+%d" % (parent.winfo_rootx()+30, ...
true
true
f7fa6ea6dec634b73f485ce2b463bbe044f12872
816
py
Python
src/srv_system.py
psby233/PiBot
1ef5e3dd27e852dabe8651bbfc4cf49aa162873b
[ "MIT" ]
null
null
null
src/srv_system.py
psby233/PiBot
1ef5e3dd27e852dabe8651bbfc4cf49aa162873b
[ "MIT" ]
null
null
null
src/srv_system.py
psby233/PiBot
1ef5e3dd27e852dabe8651bbfc4cf49aa162873b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import datetime from pibot import srv def get_cpu_temp(): file = open("/sys/class/thermal/thermal_zone0/temp") temp = float(file.read()) / 1000.0 file.close() return temp def handle_system_server(request): response = srv.systemResponse() now = datetime.date...
22.054054
69
0.693627
import rospy import datetime from pibot import srv def get_cpu_temp(): file = open("/sys/class/thermal/thermal_zone0/temp") temp = float(file.read()) / 1000.0 file.close() return temp def handle_system_server(request): response = srv.systemResponse() now = datetime.datetime.now() respon...
true
true
f7fa72b61a0fc514948f4fa888d4fa3dfce170f1
1,323
py
Python
edit_profile.py
GabrielGonzalezDiaz/friends_finder
4ee64c9feac2641a01856a889e03424b5fe52f36
[ "MIT" ]
2
2019-07-29T15:22:22.000Z
2019-07-30T04:07:15.000Z
edit_profile.py
GabrielGonzalezDiaz/friends_finder
4ee64c9feac2641a01856a889e03424b5fe52f36
[ "MIT" ]
null
null
null
edit_profile.py
GabrielGonzalezDiaz/friends_finder
4ee64c9feac2641a01856a889e03424b5fe52f36
[ "MIT" ]
null
null
null
import webapp2 import helper import renderer class Handler(webapp2.RequestHandler): def get(self): values = helper.get_template_parameters() email = helper.get_user_email() p = helper.get_user_profile(email) interest_list = helper.original_interest_list user_interest_state ...
38.911765
78
0.526077
import webapp2 import helper import renderer class Handler(webapp2.RequestHandler): def get(self): values = helper.get_template_parameters() email = helper.get_user_email() p = helper.get_user_profile(email) interest_list = helper.original_interest_list user_interest_state ...
false
true
f7fa735f09431fcc0dd003629de09296e40fb2f9
421
py
Python
libfuturize/fixes/fix_object.py
infoxchange/python-future
132e6c57947fe384eeef4402a3b5487431b7d86a
[ "MIT" ]
null
null
null
libfuturize/fixes/fix_object.py
infoxchange/python-future
132e6c57947fe384eeef4402a3b5487431b7d86a
[ "MIT" ]
null
null
null
libfuturize/fixes/fix_object.py
infoxchange/python-future
132e6c57947fe384eeef4402a3b5487431b7d86a
[ "MIT" ]
null
null
null
""" Fixer that adds ``from future.builtins import object`` if there is a line like this: class Foo(object): """ from lib2to3 import fixer_base from libfuturize.fixer_util import touch_import_top class FixObject(fixer_base.BaseFix): PATTERN = u"classdef< 'class' NAME '(' name='object' ')' colon=':' any >" ...
23.388889
77
0.700713
from lib2to3 import fixer_base from libfuturize.fixer_util import touch_import_top class FixObject(fixer_base.BaseFix): PATTERN = u"classdef< 'class' NAME '(' name='object' ')' colon=':' any >" def transform(self, node, results): touch_import_top(u'future.builtins', 'object', node)
true
true
f7fa73c9d4c81a932fe9b7e9d539cb883a11a7cd
2,979
py
Python
samples/client/petstore/python/petstore_api/models/dog.py
FantasyTeddy/openapi-generator
866dc03f4fda48800ba52e428f2f1010de8540c0
[ "Apache-2.0" ]
null
null
null
samples/client/petstore/python/petstore_api/models/dog.py
FantasyTeddy/openapi-generator
866dc03f4fda48800ba52e428f2f1010de8540c0
[ "Apache-2.0" ]
null
null
null
samples/client/petstore/python/petstore_api/models/dog.py
FantasyTeddy/openapi-generator
866dc03f4fda48800ba52e428f2f1010de8540c0
[ "Apache-2.0" ]
1
2019-11-25T15:03:05.000Z
2019-11-25T15:03:05.000Z
# coding: utf-8 """ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint ...
25.904348
174
0.548171
import pprint import re import six from petstore_api.models.animal import Animal class Dog(object): openapi_types = { 'breed': 'str' } attribute_map = { 'breed': 'breed' } def __init__(self, breed=None): self._breed = None self.discriminator = None ...
true
true
f7fa74956ef3c21187c738cd9caaf86dccfaca24
15,318
py
Python
experimental_generate.py
zhengxxn/adaptive-knn-mt
338ec0ddf02ed80b5cd4cbae922ad0ebe93e8339
[ "MIT" ]
35
2021-05-08T09:23:31.000Z
2022-03-25T06:19:48.000Z
experimental_generate.py
zhengxxn/adaptive-knn-mt
338ec0ddf02ed80b5cd4cbae922ad0ebe93e8339
[ "MIT" ]
4
2021-06-12T05:02:03.000Z
2021-12-19T08:53:46.000Z
experimental_generate.py
zhengxxn/adaptive-knn-mt
338ec0ddf02ed80b5cd4cbae922ad0ebe93e8339
[ "MIT" ]
3
2021-05-20T08:14:59.000Z
2022-03-01T04:49:50.000Z
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Translate pre-processed data with a trained model. """ import ast import logging import math import os import sy...
37.822222
180
0.526505
import ast import logging import math import os import sys from itertools import chain import numpy as np import torch from fairseq import checkpoint_utils, options, scoring, tasks, utils from fairseq.logging import progress_bar from fairseq.logging.meters import StopwatchMeter, TimeMeter def main(args): a...
true
true
f7fa74b32aa6d4dfd5968b9e503c8c5f93e6078b
21,581
py
Python
tool/darknet2pytorch.py
ajsanjoaquin/pytorch-YOLOv4
dbc10cdc43668f29647ea2019ec13c4109d590c1
[ "Apache-2.0" ]
null
null
null
tool/darknet2pytorch.py
ajsanjoaquin/pytorch-YOLOv4
dbc10cdc43668f29647ea2019ec13c4109d590c1
[ "Apache-2.0" ]
null
null
null
tool/darknet2pytorch.py
ajsanjoaquin/pytorch-YOLOv4
dbc10cdc43668f29647ea2019ec13c4109d590c1
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F import numpy as np from tool.region_loss import RegionLoss from tool.yolo_layer import YoloLayer from tool.config import * from tool.torch_utils import * class Mish(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x): ...
40.188082
119
0.481952
import torch.nn as nn import torch.nn.functional as F import numpy as np from tool.region_loss import RegionLoss from tool.yolo_layer import YoloLayer from tool.config import * from tool.torch_utils import * class Mish(torch.nn.Module): def __init__(self): super().__init__() def forward(self, x): ...
true
true
f7fa751aa4d051e7d640125056ad7b4a6cbbf91c
2,354
py
Python
migrate_dir.py
open-data/pd_warehouse
996251143702d1516f48f421aa9a8b933d86c04c
[ "MIT" ]
null
null
null
migrate_dir.py
open-data/pd_warehouse
996251143702d1516f48f421aa9a8b933d86c04c
[ "MIT" ]
null
null
null
migrate_dir.py
open-data/pd_warehouse
996251143702d1516f48f421aa9a8b933d86c04c
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 import argparse import os import shutil import subprocess import sys import tarfile import tempfile def run_migrations(source_dir, target_dir): for csvfile in os.listdir(source_dir): print("Migrating {0} from directory {1} to {2}".format(csvfile, source_dir, target_dir)) ...
34.617647
132
0.636364
import argparse import os import shutil import subprocess import sys import tarfile import tempfile def run_migrations(source_dir, target_dir): for csvfile in os.listdir(source_dir): print("Migrating {0} from directory {1} to {2}".format(csvfile, source_dir, target_dir)) file_size = os.path.g...
false
true
f7fa75aaa36b1502ddaa4d220d6445bce41c54f4
15,398
py
Python
tasks.py
nicoddemus/qmxgraph
87bc4ef121dd40ba82b6588ae43325225cd9a931
[ "MIT" ]
null
null
null
tasks.py
nicoddemus/qmxgraph
87bc4ef121dd40ba82b6588ae43325225cd9a931
[ "MIT" ]
null
null
null
tasks.py
nicoddemus/qmxgraph
87bc4ef121dd40ba82b6588ae43325225cd9a931
[ "MIT" ]
null
null
null
from __future__ import absolute_import, print_function import os import sys import invoke from colorama import Fore, Style @invoke.task def qrc( ctx, ): """ Compiles mxGraph and QmxGraph own static web files in Qt resource files. This simplifies a lot embedding these contents on Qt web views. It al...
30.796
108
0.641707
from __future__ import absolute_import, print_function import os import sys import invoke from colorama import Fore, Style @invoke.task def qrc( ctx, ): import qmxgraph from qmxgraph import deploy WEB_EXTENSIONS = ( '.js', '.gif', '.png', '.html', '.css', ...
true
true
f7fa7668ebbc49f146a4704ab24e3003bea753bf
1,984
py
Python
test/test_with_latest_from.py
dbrattli/aioreactive
e057264a5905964c68d443b98b3e602279b3b9ed
[ "MIT" ]
280
2016-10-08T11:01:11.000Z
2022-03-31T02:36:30.000Z
test/test_with_latest_from.py
webclinic017/aioreactive
e057264a5905964c68d443b98b3e602279b3b9ed
[ "MIT" ]
26
2016-10-22T09:14:47.000Z
2021-06-15T12:04:04.000Z
test/test_with_latest_from.py
webclinic017/aioreactive
e057264a5905964c68d443b98b3e602279b3b9ed
[ "MIT" ]
18
2017-01-15T15:29:15.000Z
2021-09-14T15:35:13.000Z
import asyncio import logging from asyncio.exceptions import CancelledError from typing import Tuple import aioreactive as rx import pytest from aioreactive.notification import OnCompleted, OnNext from aioreactive.testing import AsyncTestSubject, AsyncTestObserver, VirtualTimeEventLoop from aioreactive.types import As...
26.453333
89
0.714718
import asyncio import logging from asyncio.exceptions import CancelledError from typing import Tuple import aioreactive as rx import pytest from aioreactive.notification import OnCompleted, OnNext from aioreactive.testing import AsyncTestSubject, AsyncTestObserver, VirtualTimeEventLoop from aioreactive.types import As...
true
true
f7fa76fd1d4d983c072dd23016dc26b2ab036730
913
py
Python
test/unit/channel/channel_test.py
jstg004/fabric-sdk-py
d90faf65605e4bfffa7f2f49db415dae3ecc4438
[ "Apache-2.0" ]
389
2016-09-18T11:50:10.000Z
2022-03-29T21:45:40.000Z
test/unit/channel/channel_test.py
jstg004/fabric-sdk-py
d90faf65605e4bfffa7f2f49db415dae3ecc4438
[ "Apache-2.0" ]
112
2017-08-18T00:32:21.000Z
2022-02-25T18:55:57.000Z
test/unit/channel/channel_test.py
jstg004/fabric-sdk-py
d90faf65605e4bfffa7f2f49db415dae3ecc4438
[ "Apache-2.0" ]
268
2016-10-12T02:56:58.000Z
2022-03-30T09:50:54.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
30.433333
74
0.740416
import unittest from hfc.fabric.channel.channel import Channel from hfc.fabric.orderer import Orderer class ChannelTest(unittest.TestCase): def test_create_channel(self): channel = Channel('test-channel', None) channel.add_orderer(Orderer()) if __name__ == '__main__':...
true
true
f7fa777df5b464d3756faac74427e83bdedd37dd
101,615
py
Python
sdk/python/pulumi_kubernetes/apiextensions/v1/_inputs.py
axis-edge/pulumi-kubernetes
cb2803c54ec2131c04564f863dd3577284fa1650
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/apiextensions/v1/_inputs.py
axis-edge/pulumi-kubernetes
cb2803c54ec2131c04564f863dd3577284fa1650
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/apiextensions/v1/_inputs.py
axis-edge/pulumi-kubernetes
cb2803c54ec2131c04564f863dd3577284fa1650
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by pulumigen. *** # *** 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 _utilities from ... import me...
56.327605
2,114
0.683236
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from ... import meta as _meta __all__ = [ 'CustomResourceColumnDefinitionArgs', 'CustomResourceConversionArgs', 'CustomResourceDefinitionConditionArgs', ...
true
true
f7fa799f62c1cca171c6dbc0987d4bfd13654500
790
py
Python
setup.py
chrisemezue/joeynmt
9472d57b2956466db7dcf1eb184cfa7a0864ab4c
[ "Apache-2.0" ]
null
null
null
setup.py
chrisemezue/joeynmt
9472d57b2956466db7dcf1eb184cfa7a0864ab4c
[ "Apache-2.0" ]
null
null
null
setup.py
chrisemezue/joeynmt
9472d57b2956466db7dcf1eb184cfa7a0864ab4c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages with open("requirements.txt", encoding="utf-8") as req_fp: install_requires = req_fp.readlines() setup( name='joeynmt', version='1.4', description='Minimalist NMT for educational purposes', author='Jasmijn Bastings and Julia Kreutze...
29.259259
68
0.660759
from setuptools import setup, find_packages with open("requirements.txt", encoding="utf-8") as req_fp: install_requires = req_fp.readlines() setup( name='joeynmt', version='1.4', description='Minimalist NMT for educational purposes', author='Jasmijn Bastings and Julia Kreutzer', url='https://...
true
true
f7fa79a3091015a40aa9623cfce3fb7d9ba1b04a
6,181
py
Python
src/audio_library/views.py
Speccy-Rom/Soundclick
9cf51faf0d4721836663c0d66875785107729779
[ "MIT" ]
1
2021-12-15T16:49:51.000Z
2021-12-15T16:49:51.000Z
src/audio_library/views.py
Speccy-Rom/Soundclick
9cf51faf0d4721836663c0d66875785107729779
[ "MIT" ]
null
null
null
src/audio_library/views.py
Speccy-Rom/Soundclick
9cf51faf0d4721836663c0d66875785107729779
[ "MIT" ]
null
null
null
import os from django.http import FileResponse, Http404, HttpResponse from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import generics, parsers, views, viewsets from ..base.classes import MixedSerializer, Pagination from ..base.permission...
30.905
84
0.700857
import os from django.http import FileResponse, Http404, HttpResponse from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import generics, parsers, views, viewsets from ..base.classes import MixedSerializer, Pagination from ..base.permission...
true
true
f7fa79b877b13f10e1a1cb1711228985ba3c34cd
11,298
py
Python
modules/weather.py
AlexanderBaransky/PilotTelegramBot-telebot
009a99334e56c7129230106dc717358bcd894a85
[ "Apache-2.0" ]
null
null
null
modules/weather.py
AlexanderBaransky/PilotTelegramBot-telebot
009a99334e56c7129230106dc717358bcd894a85
[ "Apache-2.0" ]
null
null
null
modules/weather.py
AlexanderBaransky/PilotTelegramBot-telebot
009a99334e56c7129230106dc717358bcd894a85
[ "Apache-2.0" ]
null
null
null
import telebot import config from translation import tw from telebot import types import requests import json import time from geopy.geocoders import Nominatim bot = telebot.TeleBot(config.token) geolocator = Nominatim(user_agent="pilot_telegram_bot") forecasts = {} weathers = {} def weather(message): trans = t...
50.891892
148
0.531333
import telebot import config from translation import tw from telebot import types import requests import json import time from geopy.geocoders import Nominatim bot = telebot.TeleBot(config.token) geolocator = Nominatim(user_agent="pilot_telegram_bot") forecasts = {} weathers = {} def weather(message): trans = t...
true
true
f7fa79c2247902720dbec44baa642388affb4dfa
783
py
Python
handlers/users/echo.py
RSk141/exchange_bot
e84ca22c9421e984acd0f88df544ad4c7b025edc
[ "MIT" ]
2
2021-08-21T10:42:10.000Z
2021-08-23T09:55:55.000Z
handlers/users/echo.py
RSk141/exchange_bot
e84ca22c9421e984acd0f88df544ad4c7b025edc
[ "MIT" ]
1
2021-09-18T11:30:27.000Z
2021-09-18T18:05:44.000Z
handlers/users/echo.py
RSk141/exchange_bot
e84ca22c9421e984acd0f88df544ad4c7b025edc
[ "MIT" ]
1
2022-03-28T19:08:54.000Z
2022-03-28T19:08:54.000Z
from aiogram import types from aiogram.dispatcher import FSMContext from loader import dp # Эхо хендлер, куда летят текстовые сообщения без указанного состояния @dp.message_handler(state=None) async def bot_echo(message: types.Message): await message.answer(f"Эхо без состояния." f"Сообще...
35.590909
70
0.666667
from aiogram import types from aiogram.dispatcher import FSMContext from loader import dp @dp.message_handler(state=None) async def bot_echo(message: types.Message): await message.answer(f"Эхо без состояния." f"Сообщение:\n" f"{message.text}") @dp.message_han...
true
true
f7fa7a0e5238c7cc2555a16bf8a46974bafc591a
1,958
py
Python
ocbind/components/component/power_supply/__init__.py
SeanCondon/onos-config-demo
0789d397b46fd5cda512ae7fffe35e1a4bfdfdbe
[ "Apache-2.0" ]
1
2019-08-01T17:42:57.000Z
2019-08-01T17:42:57.000Z
ocbind/components/component/power_supply/__init__.py
SeanCondon/onos-config-demo
0789d397b46fd5cda512ae7fffe35e1a4bfdfdbe
[ "Apache-2.0" ]
1
2021-05-26T16:38:04.000Z
2021-05-26T16:38:04.000Z
ocbind/components/component/power_supply/__init__.py
SeanCondon/onos-config-demo
0789d397b46fd5cda512ae7fffe35e1a4bfdfdbe
[ "Apache-2.0" ]
4
2019-07-24T16:52:39.000Z
2021-12-03T02:08:13.000Z
# -*- coding: utf-8 -*- from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBoo...
31.079365
117
0.788049
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.ya...
true
true
f7fa7a5e8e3d92a05ebc6088b99cf4fa2718432f
27,146
py
Python
tools/odrive/utils.py
OstapFerensovych/ODrive
918240fe3323d7040d5b1f71f899afb78da1fe6a
[ "MIT" ]
null
null
null
tools/odrive/utils.py
OstapFerensovych/ODrive
918240fe3323d7040d5b1f71f899afb78da1fe6a
[ "MIT" ]
null
null
null
tools/odrive/utils.py
OstapFerensovych/ODrive
918240fe3323d7040d5b1f71f899afb78da1fe6a
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import time import threading import platform import subprocess import os import numpy as np from fibre.utils import Event import odrive.enums from odrive.enums import * try: if platform.system() == 'Windows': import win32console import colorama ...
43.996759
201
0.521366
from __future__ import print_function import sys import time import threading import platform import subprocess import os import numpy as np from fibre.utils import Event import odrive.enums from odrive.enums import * try: if platform.system() == 'Windows': import win32console import colorama ...
true
true
f7fa7aa48881472632355dbf397494aeb3465e23
825
py
Python
tests/integers.py
fuzziqersoftware/nemesys
ee6cc8e1fd804b5cfaa94a79e295770cadec8204
[ "MIT" ]
9
2018-02-05T06:52:02.000Z
2022-03-27T18:26:14.000Z
tests/integers.py
fuzziqersoftware/nemesys
ee6cc8e1fd804b5cfaa94a79e295770cadec8204
[ "MIT" ]
1
2021-05-17T16:53:12.000Z
2021-05-31T11:19:28.000Z
tests/integers.py
fuzziqersoftware/nemesys
ee6cc8e1fd804b5cfaa94a79e295770cadec8204
[ "MIT" ]
3
2018-02-06T17:24:34.000Z
2021-11-16T17:20:28.000Z
a = 0x204 b = 0x404 print("a | b should be 1540: %d" % (a | b)) print("a & b should be 4: %d" % (a & b)) print("a ^ b should be 1536: %d" % (a ^ b)) print("a << 2 should be 2064: %d" % (a << 2)) print("a >> 2 should be 129: %d" % (a >> 2)) print("a + b should be 1544: %d" % (a + b)) print("a - b should be -512: %d" % (...
39.285714
50
0.535758
a = 0x204 b = 0x404 print("a | b should be 1540: %d" % (a | b)) print("a & b should be 4: %d" % (a & b)) print("a ^ b should be 1536: %d" % (a ^ b)) print("a << 2 should be 2064: %d" % (a << 2)) print("a >> 2 should be 129: %d" % (a >> 2)) print("a + b should be 1544: %d" % (a + b)) print("a - b should be -512: %d" % (...
true
true
f7fa7c4134dc320730c862ccfeb0df0102a79c1b
2,164
py
Python
gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
bradfordb-vmware/gpdb
5cc23bd1df4133aaa7a80174f5b0950933a83cc2
[ "PostgreSQL", "Apache-2.0" ]
5,535
2015-10-28T01:05:40.000Z
2022-03-30T13:46:53.000Z
gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
bradfordb-vmware/gpdb
5cc23bd1df4133aaa7a80174f5b0950933a83cc2
[ "PostgreSQL", "Apache-2.0" ]
9,369
2015-10-28T07:48:01.000Z
2022-03-31T23:56:42.000Z
gpMgmt/bin/gppylib/test/unit/test_unit_userinput.py
bradfordb-vmware/gpdb
5cc23bd1df4133aaa7a80174f5b0950933a83cc2
[ "PostgreSQL", "Apache-2.0" ]
1,800
2015-10-28T01:08:25.000Z
2022-03-29T13:29:36.000Z
#!/usr/bin/env python3 import sys, os, getpass import unittest from gppylib.userinput import ask_create_password class GppylibUserInputTestCase(unittest.TestCase): @staticmethod def mock_get_pass_start(values): def mock_get_pass(prompt): mock_get_pass.counter += 1 return valu...
29.243243
78
0.682994
import sys, os, getpass import unittest from gppylib.userinput import ask_create_password class GppylibUserInputTestCase(unittest.TestCase): @staticmethod def mock_get_pass_start(values): def mock_get_pass(prompt): mock_get_pass.counter += 1 return values[mock_get_pass.count...
true
true
f7fa7d359a9605f6e48fd57f2610659241c2446f
6,763
py
Python
nmftranscription/inst_dict.py
arity-r/nmf-transcription
2dcf80ba3ca0169130858b4203a780c421ab1acd
[ "MIT" ]
1
2021-03-25T10:35:38.000Z
2021-03-25T10:35:38.000Z
nmftranscription/inst_dict.py
arity-r/nmf-transcription
2dcf80ba3ca0169130858b4203a780c421ab1acd
[ "MIT" ]
null
null
null
nmftranscription/inst_dict.py
arity-r/nmf-transcription
2dcf80ba3ca0169130858b4203a780c421ab1acd
[ "MIT" ]
null
null
null
melodic_dict = { 'Acoustic Piano': (1, 'Piano'), 'Bright Piano': (2, 'Piano'), 'Electric Grand Piano': (3, 'Piano'), 'Honky-tonk Piano': (4, 'Piano'), 'Electric Piano': (5, 'Piano'), 'Electric Piano 2': (6, 'Piano'), 'Harpsichord': (7, 'Piano'), 'Clavi': (8, 'Piano'), 'Celesta': (9,...
37.159341
49
0.538962
melodic_dict = { 'Acoustic Piano': (1, 'Piano'), 'Bright Piano': (2, 'Piano'), 'Electric Grand Piano': (3, 'Piano'), 'Honky-tonk Piano': (4, 'Piano'), 'Electric Piano': (5, 'Piano'), 'Electric Piano 2': (6, 'Piano'), 'Harpsichord': (7, 'Piano'), 'Clavi': (8, 'Piano'), 'Celesta': (9,...
true
true
f7fa7dbdac4d1c703c06e35885863d083c8b03c2
12,341
py
Python
sdk/python/pulumi_azure_native/network/v20150504preview/record_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20150504preview/record_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20150504preview/record_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
47.833333
784
0.653837
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['RecordSet'] class RecordSet(pulumi.CustomResource): def __init__(__self__, resource_name...
true
true
f7fa7eeeef313acbe7bc2e241e47650887daf947
22,279
py
Python
test/functional/importmulti.py
fujicoin/fujicoin-3.0-v0.15.3
aa55bf9ac60f8261e38758884eb47aa78e5c53ac
[ "MIT" ]
1
2018-11-12T22:40:44.000Z
2018-11-12T22:40:44.000Z
test/functional/importmulti.py
fujicoin/fujicoin-3.0-v0.15.3
aa55bf9ac60f8261e38758884eb47aa78e5c53ac
[ "MIT" ]
null
null
null
test/functional/importmulti.py
fujicoin/fujicoin-3.0-v0.15.3
aa55bf9ac60f8261e38758884eb47aa78e5c53ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importmulti RPC.""" from test_framework.test_framework import FujicoinTestFramework from test...
48.015086
137
0.631222
from test_framework.test_framework import FujicoinTestFramework from test_framework.util import * class ImportMultiTest (FujicoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True def setup_network(self): self.setup_nodes() def run_test...
true
true
f7fa7f59103631d4a9e17477ebb50b9beb6b2037
658
py
Python
model/test.py
delcacho/DataSciencePlatform
c19ac4c1aba54bafc0fed05cc534bb447ab3b631
[ "BSD-3-Clause" ]
null
null
null
model/test.py
delcacho/DataSciencePlatform
c19ac4c1aba54bafc0fed05cc534bb447ab3b631
[ "BSD-3-Clause" ]
null
null
null
model/test.py
delcacho/DataSciencePlatform
c19ac4c1aba54bafc0fed05cc534bb447ab3b631
[ "BSD-3-Clause" ]
null
null
null
import warnings warnings.filterwarnings("ignore") from seldon_core.seldon_client import SeldonClient import pandas as pd data = pd.read_csv("wine-quality.csv") data.head() x_0 = data.drop(["quality"], axis=1).values[:1] batch = x_0 sc = SeldonClient( \ deployment_name="mlflow-ab-test", namespace = "default", ...
20.5625
70
0.712766
import warnings warnings.filterwarnings("ignore") from seldon_core.seldon_client import SeldonClient import pandas as pd data = pd.read_csv("wine-quality.csv") data.head() x_0 = data.drop(["quality"], axis=1).values[:1] batch = x_0 sc = SeldonClient( \ deployment_name="mlflow-ab-test", namespace = "default", ...
true
true
f7fa7fa72d4d174527f7326fc3c3ad41e9c5f946
7,064
py
Python
example/settings.py
guitarparty/django-socialregistration
d1d34890c9f72a191723d0192398791f71ee6956
[ "MIT" ]
1
2016-03-24T05:25:44.000Z
2016-03-24T05:25:44.000Z
example/settings.py
assiotis/django-socialregistration
b9ac4ce0a8251bd915022816355e6f02e1cab291
[ "MIT" ]
null
null
null
example/settings.py
assiotis/django-socialregistration
b9ac4ce0a8251bd915022816355e6f02e1cab291
[ "MIT" ]
null
null
null
# Django settings for example project. import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'...
33.164319
122
0.727775
import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '%s/db.sqlite' % os.path.dirname(__file__), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', ...
true
true
f7fa7fc9654e1fb96950ec82379c7a484155a4d0
77
py
Python
savecode/threeyears/idownclient/scout/plugin/searchengine/bing/__init__.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
2
2019-05-19T11:54:26.000Z
2019-05-19T12:03:49.000Z
savecode/threeyears/idownclient/scout/plugin/searchengine/bing/__init__.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
1
2020-11-27T07:55:15.000Z
2020-11-27T07:55:15.000Z
savecode/threeyears/idownclient/scout/plugin/searchengine/bing/__init__.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
2
2021-09-06T18:06:12.000Z
2021-12-31T07:44:43.000Z
from .bingsearchengine import BingSearchEngine from .azbing import AzBingApi
25.666667
46
0.87013
from .bingsearchengine import BingSearchEngine from .azbing import AzBingApi
true
true
f7fa80365ba2f98a6c13f16142393a88055f4f49
2,556
py
Python
runtime/python/Lib/site-packages/astroid/brain/brain_pytest.py
hwaipy/InteractionFreeNode
88642b68430f57b028fd0f276a5709f89279e30d
[ "MIT" ]
1
2021-12-30T19:05:22.000Z
2021-12-30T19:05:22.000Z
runtime/python/Lib/site-packages/astroid/brain/brain_pytest.py
hwaipy/InteractionFreeNode
88642b68430f57b028fd0f276a5709f89279e30d
[ "MIT" ]
1
2021-08-24T05:13:20.000Z
2021-08-24T05:13:20.000Z
runtime/python/Lib/site-packages/astroid/brain/brain_pytest.py
hwaipy/InteractionFreeNode
88642b68430f57b028fd0f276a5709f89279e30d
[ "MIT" ]
3
2021-08-28T14:22:36.000Z
2021-10-06T18:59:41.000Z
# Copyright (c) 2014-2016, 2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Jeff Quast <contact@jeffquast.com> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2016 Florian Bruhin <me@the-compiler.org> # Copyright (c) 2016 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2020-2021 hippo91 <guillaume....
28.087912
85
0.728873
from astroid.brain.helpers import register_module_extender from astroid.builder import AstroidBuilder from astroid.manager import AstroidManager def pytest_transform(): return AstroidBuilder(AstroidManager()).string_build( """ try: import _pytest.mark import _pytest.recwarn import ...
true
true
f7fa80421d318424c9a3043896cb53eafbe9fe51
1,449
py
Python
notebooks/Applications/dambreak2D_adapt/modelmesh.py
burgreen/proteus
033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d
[ "MIT" ]
null
null
null
notebooks/Applications/dambreak2D_adapt/modelmesh.py
burgreen/proteus
033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d
[ "MIT" ]
null
null
null
notebooks/Applications/dambreak2D_adapt/modelmesh.py
burgreen/proteus
033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d
[ "MIT" ]
null
null
null
from proteus import Domain import proteus.MeshTools from proteus.MeshAdaptPUMI import MeshAdaptPUMI nd = 2 #number of dimensions in the problem parallelPartitioningType = proteus.MeshTools.MeshParallelPartitioningTypes.element #type of partitioning if parallel nLayersOfOverlapForParallel = 0 #amount of ghosting if par...
45.28125
116
0.656315
from proteus import Domain import proteus.MeshTools from proteus.MeshAdaptPUMI import MeshAdaptPUMI nd = 2 parallelPartitioningType = proteus.MeshTools.MeshParallelPartitioningTypes.element nLayersOfOverlapForParallel = 0 boundaries=['left','right','bottom','top'] boundaryTags=dict([(key,i+1) for (i,key) in enumer...
true
true
f7fa80b2109da284409cf8ee0ac84e9f3572b178
14,131
py
Python
web/tests/functional/report_viewer_api/test_get_run_results.py
ryankurte/codechecker
737424ee77c181304f242d5a2adef3e6d9369998
[ "Apache-2.0" ]
null
null
null
web/tests/functional/report_viewer_api/test_get_run_results.py
ryankurte/codechecker
737424ee77c181304f242d5a2adef3e6d9369998
[ "Apache-2.0" ]
null
null
null
web/tests/functional/report_viewer_api/test_get_run_results.py
ryankurte/codechecker
737424ee77c181304f242d5a2adef3e6d9369998
[ "Apache-2.0" ]
1
2021-01-27T21:45:14.000Z
2021-01-27T21:45:14.000Z
# # ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # -------------------------------------------------...
39.805634
79
0.518647
import logging import os import re import unittest import codecs from codechecker_api.codeCheckerDBAccess_v6.ttypes import Encoding, Order, \ ReportFilter, SortMode, SortType, RunSortMode, RunSortType from codechecker_web.shared import convert from libtest.debug_printer import print_run_results from li...
true
true
f7fa80f25c16b9a5c3a257d06722d7dd14a9ab4c
977
py
Python
drf_jwt_authentication/urls.py
Somsubhra1/Django-Rest-Framework-JWT-Authentication-simplejwt
b8e0097b27f241afde392c9a7e07547c2dacb9ab
[ "MIT" ]
3
2021-06-25T17:37:09.000Z
2022-01-14T21:19:05.000Z
drf_jwt_authentication/urls.py
Somsubhra1/Django-Rest-Framework-JWT-Authentication-simplejwt
b8e0097b27f241afde392c9a7e07547c2dacb9ab
[ "MIT" ]
null
null
null
drf_jwt_authentication/urls.py
Somsubhra1/Django-Rest-Framework-JWT-Authentication-simplejwt
b8e0097b27f241afde392c9a7e07547c2dacb9ab
[ "MIT" ]
null
null
null
"""drf_jwt_authentication URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='hom...
36.185185
78
0.730809
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path("api/auth/", include('accounts.urls')) ] urlpatterns += static(settings.STATIC_URL, document_root=settings.ST...
true
true
f7fa82914edb59417d74e5642644ea47ef481e01
903
py
Python
sentinelone/komand_sentinelone/actions/create_ioc_threat/action.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
sentinelone/komand_sentinelone/actions/create_ioc_threat/action.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
sentinelone/komand_sentinelone/actions/create_ioc_threat/action.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
null
null
null
import komand from .schema import CreateIocThreatInput, CreateIocThreatOutput, Input, Output # Custom imports below class CreateIocThreat(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='create_ioc_threat', description='Create an IOC threat',...
33.444444
78
0.65227
import komand from .schema import CreateIocThreatInput, CreateIocThreatOutput, Input, Output class CreateIocThreat(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='create_ioc_threat', description='Create an IOC threat', input...
true
true
f7fa83eeb6a81a9cecee9a964ef025cb0bb94f32
16,235
py
Python
app/raw/docs/question.py
hupili/legco-watch
06253a65d299564827972a38dc7d7dee5c1f6120
[ "MIT" ]
null
null
null
app/raw/docs/question.py
hupili/legco-watch
06253a65d299564827972a38dc7d7dee5c1f6120
[ "MIT" ]
null
null
null
app/raw/docs/question.py
hupili/legco-watch
06253a65d299564827972a38dc7d7dee5c1f6120
[ "MIT" ]
1
2020-05-24T17:08:57.000Z
2020-05-24T17:08:57.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ Document wrappers for LegCo questions (and replies) """ import logging import lxml from lxml import etree import lxml.html from lxml.html.clean import clean_html, Cleaner import re from lxml.html import HTMLParser import urllib2 from urllib2 import HTTPError from ..scrap...
52.370968
184
0.555528
""" Document wrappers for LegCo questions (and replies) """ import logging import lxml from lxml import etree import lxml.html from lxml.html.clean import clean_html, Cleaner import re from lxml.html import HTMLParser import urllib2 from urllib2 import HTTPError from ..scraper.settings import USER_AGENT logger = ...
false
true
f7fa843355231195d889437ff967786e3ec95e56
2,533
py
Python
djangoerp/pluggets/forms.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
345
2015-02-16T17:36:32.000Z
2022-01-13T11:04:35.000Z
djangoerp/pluggets/forms.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
22
2015-09-11T13:29:00.000Z
2021-11-27T18:47:38.000Z
djangoerp/pluggets/forms.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
243
2015-03-31T12:08:30.000Z
2022-01-29T08:23:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ...
35.180556
119
0.705882
from __future__ import unicode_literals __author__ = 'Emanuele Bertoldi <emanuele.bertoldi@gmail.com>' __copyright__ = 'Copyright (c) 2013-2015, django ERP Team' __version__ = '0.0.5' from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import Con...
true
true
f7fa848cac5bbd992d8c928d858e2bad4d31124b
1,746
py
Python
14/record_dataset.py
jason9075/ithome_tensorflow_series
e8f92de2a73a88e7b03a9ac58ece4c4a604f066e
[ "Apache-2.0" ]
24
2019-10-06T17:11:23.000Z
2022-03-15T08:52:22.000Z
14/record_dataset.py
jason9075/ithome_tensorflow_series
e8f92de2a73a88e7b03a9ac58ece4c4a604f066e
[ "Apache-2.0" ]
1
2020-07-03T10:13:10.000Z
2020-07-08T06:55:12.000Z
14/record_dataset.py
jason9075/ithome_tensorflow_series
e8f92de2a73a88e7b03a9ac58ece4c4a604f066e
[ "Apache-2.0" ]
9
2019-10-06T17:11:25.000Z
2022-03-15T08:52:26.000Z
import cv2 import tensorflow as tf TFRECORD_PATH = '../tfrecord/member.tfrecord' def main(): data_set = tf.data.TFRecordDataset(TFRECORD_PATH) data_set = data_set.map(parse_function) data_set = data_set.shuffle(buffer_size=9) data_set = data_set.batch(3) iterator = data_set.make_initializable_ite...
34.92
72
0.658648
import cv2 import tensorflow as tf TFRECORD_PATH = '../tfrecord/member.tfrecord' def main(): data_set = tf.data.TFRecordDataset(TFRECORD_PATH) data_set = data_set.map(parse_function) data_set = data_set.shuffle(buffer_size=9) data_set = data_set.batch(3) iterator = data_set.make_initializable_ite...
true
true
f7fa84a12ee4da0afb4adfbe80c07dbc01295f4d
2,013
py
Python
day_16/task_1.py
Korred/advent_of_code_2021
89afcaae3343653106d36fb7ad08558c0fbb4732
[ "Unlicense" ]
null
null
null
day_16/task_1.py
Korred/advent_of_code_2021
89afcaae3343653106d36fb7ad08558c0fbb4732
[ "Unlicense" ]
null
null
null
day_16/task_1.py
Korred/advent_of_code_2021
89afcaae3343653106d36fb7ad08558c0fbb4732
[ "Unlicense" ]
null
null
null
def hexstr_to_binstr(hex): return f"{int(hex, 16):0>{len(hex)*4}b}" def decode_packet(packet): # cosume packet version p_version = int(packet[:3], 2) p_version_sum = p_version packet = packet[3:] # consume packet type p_type = int(packet[:3], 2) packet = packet[3:] # literal val...
27.202703
82
0.538003
def hexstr_to_binstr(hex): return f"{int(hex, 16):0>{len(hex)*4}b}" def decode_packet(packet): p_version = int(packet[:3], 2) p_version_sum = p_version packet = packet[3:] p_type = int(packet[:3], 2) packet = packet[3:] if p_type == 4: groups = [] while Tr...
true
true
f7fa84d30542fa5ea8a7e04262d9b849da8e4971
4,690
py
Python
pipeline/contrib/statistics/signals/handlers.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
55
2021-09-07T11:50:35.000Z
2022-03-23T13:19:38.000Z
pipeline/contrib/statistics/signals/handlers.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
64
2021-09-07T12:04:12.000Z
2022-03-29T03:47:18.000Z
pipeline/contrib/statistics/signals/handlers.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
20
2021-09-07T11:52:08.000Z
2022-03-28T08:05:22.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
41.504425
116
0.716844
import logging import ujson as json from django.db.models.signals import post_save from django.dispatch import receiver from pipeline.component_framework.constants import LEGACY_PLUGINS_VERSION from pipeline.contrib.statistics.models import ( ComponentInTemplate, TemplateInPipeline, ) from pipeline.contrib....
true
true
f7fa850d57bed91e7514643f6128a61b647b89e8
740
bzl
Python
tools/maven.bzl
google/inject-common
587582c04da3ef701f3654eff654a1e02df83ccf
[ "Apache-2.0" ]
9
2019-12-31T21:27:06.000Z
2022-03-31T14:57:50.000Z
tools/maven.bzl
google/inject-common
587582c04da3ef701f3654eff654a1e02df83ccf
[ "Apache-2.0" ]
null
null
null
tools/maven.bzl
google/inject-common
587582c04da3ef701f3654eff654a1e02df83ccf
[ "Apache-2.0" ]
7
2019-07-01T07:01:48.000Z
2021-10-12T00:15:22.000Z
"""Macros to simplify generating maven files. """ load("@google_bazel_common//tools/maven:pom_file.bzl", default_pom_file = "pom_file") def pom_file(name, targets, artifact_name, artifact_id, packaging = None, **kwargs): default_pom_file( name = name, targets = targets, preferred_group_ids...
28.461538
85
0.572973
load("@google_bazel_common//tools/maven:pom_file.bzl", default_pom_file = "pom_file") def pom_file(name, targets, artifact_name, artifact_id, packaging = None, **kwargs): default_pom_file( name = name, targets = targets, preferred_group_ids = [ "com.google.common.inject", ...
true
true
f7fa856af28f212df8f25c934a45353719af37b9
1,347
py
Python
objects/CSCG/_3d/forms/standard/base/dofs/visualize/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
1
2020-10-14T12:48:35.000Z
2020-10-14T12:48:35.000Z
objects/CSCG/_3d/forms/standard/base/dofs/visualize/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
null
null
null
objects/CSCG/_3d/forms/standard/base/dofs/visualize/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
null
null
null
"""""" from screws.freeze.main import FrozenOnly from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot._0sf import _3dCSCG_S0F_DOFs_Matplot from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot._1sf import _3dCSCG_S1F_DOFs_Matplot from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot...
31.325581
101
0.665924
from screws.freeze.main import FrozenOnly from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot._0sf import _3dCSCG_S0F_DOFs_Matplot from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot._1sf import _3dCSCG_S1F_DOFs_Matplot from objects.CSCG._3d.forms.standard.base.dofs.visualize.matplot._2sf i...
true
true
f7fa8715c06f78adaf05a9ecbbb6e1263d7d9967
26
py
Python
__init__.py
Gu1nness/AsmInterpreter
40316c3b8c103e4ea35504e71e26065c8bf4a82d
[ "MIT" ]
1
2021-02-28T05:27:52.000Z
2021-02-28T05:27:52.000Z
__init__.py
Gu1nness/AsmInterpreter
40316c3b8c103e4ea35504e71e26065c8bf4a82d
[ "MIT" ]
null
null
null
__init__.py
Gu1nness/AsmInterpreter
40316c3b8c103e4ea35504e71e26065c8bf4a82d
[ "MIT" ]
null
null
null
from . import interpreter
13
25
0.807692
from . import interpreter
true
true
f7fa8716ce0c594456875110dbbcf7c396440882
3,351
py
Python
feeder/util/mkcert.py
jordan-hamilton/petnet-feeder-service
66c3192b0e66f4eefb5fd55cceb1219fa1ddb914
[ "MIT" ]
47
2020-04-23T20:28:27.000Z
2020-10-07T19:49:10.000Z
feeder/util/mkcert.py
jordan-hamilton/petnet-feeder-service
66c3192b0e66f4eefb5fd55cceb1219fa1ddb914
[ "MIT" ]
8
2020-04-26T01:45:21.000Z
2020-10-07T22:17:31.000Z
feeder/util/mkcert.py
ericchapman80/petnet-api-hacking
23cff84317d7380d7d1c0a2718cc153e83920906
[ "MIT" ]
9
2020-04-25T17:22:44.000Z
2020-10-07T04:36:56.000Z
# https://nachtimwald.com/2019/11/14/python-self-signed-cert-gen/ import socket import logging import datetime from typing import cast from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric i...
36.032258
86
0.697404
import socket import logging import datetime from typing import cast from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import serializatio...
true
true
f7fa875060640cd16025c9f19ee32fae2d2fd492
21,414
py
Python
twisted/internet/posixbase.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/internet/posixbase.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
twisted/internet/posixbase.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
null
null
null
# -*- test-case-name: twisted.test.test_internet,twisted.internet.test.test_posixbase -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Posix reactor base class """ from __future__ import division, absolute_import import socket import errno import os import sys from zope.interface impo...
34.317308
102
0.621556
from __future__ import division, absolute_import import socket import errno import os import sys from zope.interface import implementer, classImplements from twisted.internet import error, udp, tcp from twisted.internet.base import ReactorBase, _SignalReactorMixin from twisted.internet.main import CONNECTION_DO...
true
true
f7fa87ae49b91a52a4c262bf01fc163a8a1e56b4
807
py
Python
pyqtgraph/flowchart/library/__init__.py
hishizuka/pyqtgraph
4820625d93ffb41f324431d0d29b395cf91f339e
[ "MIT" ]
2,762
2015-01-02T14:34:10.000Z
2022-03-30T14:06:07.000Z
pyqtgraph/flowchart/library/__init__.py
hishizuka/pyqtgraph
4820625d93ffb41f324431d0d29b395cf91f339e
[ "MIT" ]
1,901
2015-01-12T03:20:30.000Z
2022-03-31T16:33:36.000Z
pyqtgraph/flowchart/library/__init__.py
hishizuka/pyqtgraph
4820625d93ffb41f324431d0d29b395cf91f339e
[ "MIT" ]
1,038
2015-01-01T04:05:49.000Z
2022-03-31T11:57:51.000Z
# -*- coding: utf-8 -*- from collections import OrderedDict import os, types from ...debug import printExc from ..NodeLibrary import NodeLibrary, isNodeClass from ... import reload as reload # Build default library LIBRARY = NodeLibrary() # For backward compatibility, expose the default library's properties here: NO...
27.827586
88
0.743494
from collections import OrderedDict import os, types from ...debug import printExc from ..NodeLibrary import NodeLibrary, isNodeClass from ... import reload as reload LIBRARY = NodeLibrary() NODE_LIST = LIBRARY.nodeList NODE_TREE = LIBRARY.nodeTree registerNodeType = LIBRARY.addNodeType getNodeTree = LIBRARY.getN...
true
true
f7fa880994b68638a07ab5a5999b28466ace20cc
20,998
py
Python
tools/wptrunner/wptrunner/wptrunner.py
qanat/wpt
7c61a4594a95682531367b6956d1c37f8b8fd486
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/wptrunner.py
qanat/wpt
7c61a4594a95682531367b6956d1c37f8b8fd486
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/wptrunner.py
qanat/wpt
7c61a4594a95682531367b6956d1c37f8b8fd486
[ "BSD-3-Clause" ]
null
null
null
import json import os import sys from datetime import datetime, timedelta import wptserve from wptserve import sslutils from . import environment as env from . import instruments from . import mpcontext from . import products from . import testloader from . import wptcommandline from . import wptlogging from . import...
42.592292
108
0.564054
import json import os import sys from datetime import datetime, timedelta import wptserve from wptserve import sslutils from . import environment as env from . import instruments from . import mpcontext from . import products from . import testloader from . import wptcommandline from . import wptlogging from . import...
true
true
f7fa8854998422b639ba3f671bff082dd4c39411
4,376
py
Python
model-optimizer/extensions/front/onnx/detection_output.py
monroid/openvino
8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
model-optimizer/extensions/front/onnx/detection_output.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
model-optimizer/extensions/front/onnx/detection_output.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.ops.DetectionOutput import DetectionOutput from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr from mo.utils.error import Error class DetectionOutputFrontExtractor(FrontE...
43.76
104
0.609461
from extensions.ops.DetectionOutput import DetectionOutput from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr from mo.utils.error import Error class DetectionOutputFrontExtractor(FrontExtractorOp): op = 'DetectionOutput' enabled = True @classmethod ...
true
true
f7fa88fb1e122c97d664dcd2445d538e23bc3c3b
805
py
Python
run.py
TheJarX/python-time-lapse
4cb0dfce78545bca237c520d94ae71aeed78539c
[ "MIT" ]
2
2019-09-28T03:46:25.000Z
2019-12-05T14:42:30.000Z
run.py
TheJarX/Python-time-lapse
4cb0dfce78545bca237c520d94ae71aeed78539c
[ "MIT" ]
null
null
null
run.py
TheJarX/Python-time-lapse
4cb0dfce78545bca237c520d94ae71aeed78539c
[ "MIT" ]
null
null
null
from flask import Flask, request, render_template, redirect,json app = Flask(__name__) @app.route('/') def index(): return 'Hello, world!' @app.route('/cheers') def cheers(): name = request.args.get('name', 'Mr. Anonymous') return 'Hello, {}'.format(name) @app.route( "/upload-image", methods = ["GET","POST"] ) d...
25.15625
83
0.590062
from flask import Flask, request, render_template, redirect,json app = Flask(__name__) @app.route('/') def index(): return 'Hello, world!' @app.route('/cheers') def cheers(): name = request.args.get('name', 'Mr. Anonymous') return 'Hello, {}'.format(name) @app.route( "/upload-image", methods = ["GET","POST"] ) d...
false
true
f7fa89a814ce4edf7375322d329a7b9bcab7588a
554
py
Python
hanlp/datasets/parsing/ctb5.py
antfootAlex/HanLP
e8044b27ae1de54b9070db08549853d3ca8271e2
[ "Apache-2.0" ]
27,208
2015-03-27T10:25:45.000Z
2022-03-31T13:26:32.000Z
hanlp/datasets/parsing/ctb5.py
hushaoyun/HanLP
967b52404c9d0adbc0cff2699690c127ecfca36e
[ "Apache-2.0" ]
1,674
2015-03-30T06:36:44.000Z
2022-03-16T01:52:56.000Z
hanlp/datasets/parsing/ctb5.py
hushaoyun/HanLP
967b52404c9d0adbc0cff2699690c127ecfca36e
[ "Apache-2.0" ]
7,710
2015-03-27T08:07:57.000Z
2022-03-31T14:57:23.000Z
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 18:44 from hanlp_common.constant import HANLP_URL _CTB_HOME = HANLP_URL + 'embeddings/SUDA-LA-CIP_20200109_021624.zip#' _CTB5_DEP_HOME = _CTB_HOME + 'BPNN/data/ctb5/' CTB5_DEP_TRAIN = _CTB5_DEP_HOME + 'train.conll' '''Training set for ctb5 dependency parsing...
30.777778
69
0.741877
from hanlp_common.constant import HANLP_URL _CTB_HOME = HANLP_URL + 'embeddings/SUDA-LA-CIP_20200109_021624.zip#' _CTB5_DEP_HOME = _CTB_HOME + 'BPNN/data/ctb5/' CTB5_DEP_TRAIN = _CTB5_DEP_HOME + 'train.conll' CTB5_DEP_DEV = _CTB5_DEP_HOME + 'dev.conll' CTB5_DEP_TEST = _CTB5_DEP_HOME + 'test.conll' CIP_W2V_100_CN...
true
true
f7fa8b51fb7593e4b4bb5e270c3e1f1db23870a2
4,337
py
Python
neybuz/settings.py
RKatana/neybuzz
147e5b9369c10dd1698ec8d1609bdddcc55224d9
[ "MIT" ]
1
2021-04-19T08:03:57.000Z
2021-04-19T08:03:57.000Z
neybuz/settings.py
RKatana/neybuzz
147e5b9369c10dd1698ec8d1609bdddcc55224d9
[ "MIT" ]
null
null
null
neybuz/settings.py
RKatana/neybuzz
147e5b9369c10dd1698ec8d1609bdddcc55224d9
[ "MIT" ]
null
null
null
""" Django settings for neybuz project. Generated by 'django-admin startproject' using Django 3.2. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ import os impor...
26.445122
91
0.705326
import os import cloudinary import cloudinary.uploader import cloudinary.api import django_heroku import dj_database_url from decouple import config from pathlib import Path from dotenv import load_dotenv load_dotenv() BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-7k+@^-yaz#t^...
true
true
f7fa8cc0965da7f9a7749d851548a7128d432f26
7,006
py
Python
temboo/core/Library/eBay/Trading/GetItem.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/eBay/Trading/GetItem.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/eBay/Trading/GetItem.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # GetItem # Returns item data such as title, description, price information, and seller information. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version...
45.79085
241
0.676848
true
true
f7fa8e89abf63baa88cd1495217dea2b95cc4a5f
661
py
Python
operations using tkinter/textBox.py
XORsalaria/python-GUI
f12bd0636c5726160784e491e31bf60235bec56d
[ "MIT" ]
null
null
null
operations using tkinter/textBox.py
XORsalaria/python-GUI
f12bd0636c5726160784e491e31bf60235bec56d
[ "MIT" ]
null
null
null
operations using tkinter/textBox.py
XORsalaria/python-GUI
f12bd0636c5726160784e491e31bf60235bec56d
[ "MIT" ]
null
null
null
from tkinter import * myGui = Tk() def Hello(): b = a.get() myLabel3 = Label(text=b,fg='white',bg='black').pack() def Bye(): d = c.get() myLabel4 = Label(text='Bye, Bot!').pack() a = StringVar() c = StringVar() myGui.title("Python-GUI") myGui.geometry("500x500+100+50") ...
25.423077
72
0.636914
from tkinter import * myGui = Tk() def Hello(): b = a.get() myLabel3 = Label(text=b,fg='white',bg='black').pack() def Bye(): d = c.get() myLabel4 = Label(text='Bye, Bot!').pack() a = StringVar() c = StringVar() myGui.title("Python-GUI") myGui.geometry("500x500+100+50") ...
true
true
f7fa8ee844a4b369657a7e4bda3955090c424495
5,812
py
Python
source/NACDVOCDetection.py
ogrenenmakine/censusEnumerators
e63b5f888a0aaefa69dbc0413d567b1643c5c503
[ "Apache-2.0" ]
null
null
null
source/NACDVOCDetection.py
ogrenenmakine/censusEnumerators
e63b5f888a0aaefa69dbc0413d567b1643c5c503
[ "Apache-2.0" ]
null
null
null
source/NACDVOCDetection.py
ogrenenmakine/censusEnumerators
e63b5f888a0aaefa69dbc0413d567b1643c5c503
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division import os import logging import numpy as np try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import mxnet as mx from source.base import VisionDataset class NACDDetection(VisionDataset): ""...
44.030303
101
0.602891
from __future__ import absolute_import from __future__ import division import os import logging import numpy as np try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import mxnet as mx from source.base import VisionDataset class NACDDetection(VisionDataset): CL...
true
true
f7fa8f3afd9e46a4248c41b3a0518cdd30e45368
7,399
py
Python
pilot/workflow/generic.py
davidgcameron/pilot2
b2557caecfefe08a1695efb0508fc68cffdaa5c2
[ "Apache-2.0" ]
null
null
null
pilot/workflow/generic.py
davidgcameron/pilot2
b2557caecfefe08a1695efb0508fc68cffdaa5c2
[ "Apache-2.0" ]
null
null
null
pilot/workflow/generic.py
davidgcameron/pilot2
b2557caecfefe08a1695efb0508fc68cffdaa5c2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # 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 # # Authors: # - Mario Lassnig, mario.lassnig@cern.ch, 2016-2017 # - Daniel Dr...
37.558376
127
0.656035
from __future__ import print_function import functools import signal import threading from time import time, sleep from sys import stderr from os import getpid from shutil import rmtree try: import Queue as queue except Exception: import queue from collections import namedtuple from pilot.com...
true
true
f7fa8f449c323a09ff6e15ae88bbe6ae711680b3
60,381
py
Python
openshift/installer/vendored/openshift-ansible-3.9.40/roles/lib_vendored_deps/library/oc_serviceaccount_secret.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
164
2015-07-29T17:35:04.000Z
2021-12-16T16:38:04.000Z
openshift/installer/vendored/openshift-ansible-3.9.40/roles/lib_vendored_deps/library/oc_serviceaccount_secret.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
3,634
2015-06-09T13:49:15.000Z
2022-03-23T20:55:44.000Z
openshift/installer/vendored/openshift-ansible-3.9.40/roles/lib_vendored_deps/library/oc_serviceaccount_secret.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
250
2015-06-08T19:53:11.000Z
2022-03-01T04:51:23.000Z
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
34.307386
301
0.551879
from __future__ import print_function import atexit import copy import fcntl import json import time import os import re import shutil import subprocess import tempfile try: import ruamel.yaml as yaml except ImportError: import yaml from ansible.module_utils.basic import AnsibleM...
true
true
f7fa8f960ff94e07e4dbe18c0b7667db558354bf
645
py
Python
hashable/tools.py
minmax/hashable
b38e325354c253fd41e9c92572eb5ba1e8b2ce8f
[ "MIT" ]
null
null
null
hashable/tools.py
minmax/hashable
b38e325354c253fd41e9c92572eb5ba1e8b2ce8f
[ "MIT" ]
null
null
null
hashable/tools.py
minmax/hashable
b38e325354c253fd41e9c92572eb5ba1e8b2ce8f
[ "MIT" ]
null
null
null
from operator import attrgetter, methodcaller def create_getters_list(attributes=None, methods=None): getters_list = [] if attributes is not None: getters_list.extend(map(attrgetter, attributes)) if methods is not None: getters_list.extend(map(methodcaller, methods)) return getters_lis...
24.807692
61
0.717829
from operator import attrgetter, methodcaller def create_getters_list(attributes=None, methods=None): getters_list = [] if attributes is not None: getters_list.extend(map(attrgetter, attributes)) if methods is not None: getters_list.extend(map(methodcaller, methods)) return getters_lis...
true
true
f7fa8fad476aa9040c6103d5e030d4f5f09f8191
367
py
Python
src/crime_prediction/preprocessingWeatherData.py
ras9841/UP-STAT-2018
cad06bfac3c12b4cb14c3b703e23c52cc391383a
[ "MIT" ]
null
null
null
src/crime_prediction/preprocessingWeatherData.py
ras9841/UP-STAT-2018
cad06bfac3c12b4cb14c3b703e23c52cc391383a
[ "MIT" ]
1
2018-05-08T12:16:50.000Z
2018-05-08T21:28:40.000Z
src/crime_prediction/preprocessingWeatherData.py
ras9841/UP-STAT-2018
cad06bfac3c12b4cb14c3b703e23c52cc391383a
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Mar 29 16:09:02 2018 @author: valentinarodriguez """ def dataCleaning(data, columnsToDrop): data = data.replace(to_replace="NVC",value=-1) data = data.replace(to_replace="VC",value=+1) data = data.drop(columnsToDrop, axis=1) print("da...
18.35
50
0.659401
def dataCleaning(data, columnsToDrop): data = data.replace(to_replace="NVC",value=-1) data = data.replace(to_replace="VC",value=+1) data = data.drop(columnsToDrop, axis=1) print("dataCleaning") print(data) return data
true
true
f7fa904110ed31639e372d170acecafaf2cdadfb
477
py
Python
nomi/migrations/0070_auto_20170614_1754.py
TheDjangoBoys/Gymkhana-Nominations
6ce13fb3a21fe91630e0c8fdaf597e61c87f2d06
[ "MIT" ]
null
null
null
nomi/migrations/0070_auto_20170614_1754.py
TheDjangoBoys/Gymkhana-Nominations
6ce13fb3a21fe91630e0c8fdaf597e61c87f2d06
[ "MIT" ]
null
null
null
nomi/migrations/0070_auto_20170614_1754.py
TheDjangoBoys/Gymkhana-Nominations
6ce13fb3a21fe91630e0c8fdaf597e61c87f2d06
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-14 17:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nomi', '0069_auto_20170614_1645'), ] operations = [ migrations.AlterField( ...
22.714286
73
0.624738
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nomi', '0069_auto_20170614_1645'), ] operations = [ migrations.AlterField( model_name='userprofile', name='room_no', ...
true
true
f7fa90743322737adb8f67cd5f6dff918c6c7607
711
py
Python
Ekeopara_Praise/Phase 1/Python Basic 2/Day20 Tasks/Task10.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Ekeopara_Praise/Phase 1/Python Basic 2/Day20 Tasks/Task10.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Ekeopara_Praise/Phase 1/Python Basic 2/Day20 Tasks/Task10.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
'''10. Write a Python program to check whether a point (x,y) is in a triangle or not. There is a triangle formed by three points. Input: x1,y1,x2,y2,x3,y3,xp,yp separated by a single space. Input three coordinate of the circle: 9 3 6 8 3 6 Radius of the said circle: 3.358 Central coordinate (x, y) of the circle: 6.071 ...
33.857143
129
0.662447
print("Input x1,y1,x2,y2,x3,y3,xp,yp:") x1,y1,x2,y2,x3,y3,xp,yp = map(float, input().split()) c1 = (x2-x1)*(yp-y1)-(y2-y1)*(xp-x1) c2 = (x3-x2)*(yp-y2)-(y3-y2)*(xp-x2) c3 = (x1-x3)*(yp-y3)-(y1-y3)*(xp-x3) if (c1<0 and c2<0 and c3<0) or (c1>0 and c2>0 and c3>0): print("The point is in the triangle.") else: prin...
true
true
f7fa909795cb9691247faf1b0d065dff915ecda9
265
py
Python
whimsical-woodpeckers/anon/migrations/0008_merge_20200809_0006.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
whimsical-woodpeckers/anon/migrations/0008_merge_20200809_0006.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
whimsical-woodpeckers/anon/migrations/0008_merge_20200809_0006.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
# Generated by Django 3.1 on 2020-08-09 04:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('anon', '0007_auto_20200807_2303'), ('anon', '0002_auto_20200804_1744'), ] operations = [ ]
17.666667
45
0.641509
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('anon', '0007_auto_20200807_2303'), ('anon', '0002_auto_20200804_1744'), ] operations = [ ]
true
true
f7fa90edbafb8af36e90f40679d278feaafdcd0b
759
py
Python
old_filter.py
SeriousDim/gr09
db23a064c422c146ade39c81bb287ee958038731
[ "MIT" ]
null
null
null
old_filter.py
SeriousDim/gr09
db23a064c422c146ade39c81bb287ee958038731
[ "MIT" ]
1
2021-11-11T14:51:12.000Z
2021-11-11T14:51:12.000Z
old_filter.py
SeriousDim/gr09
db23a064c422c146ade39c81bb287ee958038731
[ "MIT" ]
13
2021-11-10T13:43:16.000Z
2021-11-24T11:17:03.000Z
from PIL import Image import numpy as np img = Image.open("img2.jpg") arr = np.array(img) a = len(arr) a1 = len(arr[1]) i = 0 while i < a - 11: j = 0 while j < a1 - 11: s = 0 for n in range(i, i + 10): for n1 in range(j, j + 10): n1 = arr[n][n1][0] n2 ...
26.172414
49
0.392622
from PIL import Image import numpy as np img = Image.open("img2.jpg") arr = np.array(img) a = len(arr) a1 = len(arr[1]) i = 0 while i < a - 11: j = 0 while j < a1 - 11: s = 0 for n in range(i, i + 10): for n1 in range(j, j + 10): n1 = arr[n][n1][0] n2 ...
true
true
f7fa925649218e2c995b08979fb24fe352795975
7,979
py
Python
graalpython/com.oracle.graal.python.test/src/tests/test_set.py
cmueh/graalpython
4267e1be9d36377d6ccb5911d5404e9d77011211
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
graalpython/com.oracle.graal.python.test/src/tests/test_set.py
cmueh/graalpython
4267e1be9d36377d6ccb5911d5404e9d77011211
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
graalpython/com.oracle.graal.python.test/src/tests/test_set.py
cmueh/graalpython
4267e1be9d36377d6ccb5911d5404e9d77011211
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this software, a...
31.290196
87
0.621632
def assert_raises(err, fn, *args, **kwargs): raised = False try: fn(*args, **kwargs) except err: raised = True assert raised class PassThru(Exception): pass def check_pass_thru(): raise PassThru yield 1 def test_set_or_union():...
true
true
f7fa9298602b9714532538ca56331fd22e1e1f5e
1,222
py
Python
opennebula_gc/cli.py
cloudlinux/opennebula-gc
50711d14d7426c6e7fc65099c652270976630022
[ "MIT" ]
1
2017-03-29T12:47:23.000Z
2017-03-29T12:47:23.000Z
opennebula_gc/cli.py
cloudlinux/opennebula-gc
50711d14d7426c6e7fc65099c652270976630022
[ "MIT" ]
null
null
null
opennebula_gc/cli.py
cloudlinux/opennebula-gc
50711d14d7426c6e7fc65099c652270976630022
[ "MIT" ]
null
null
null
import sys import argparse from opennebula_gc import clean_opennebula def cli(): parser = argparse.ArgumentParser( prog="Clean OpenNebula Resources", description="CLI tool to clean outdated resources in OpenNebula") commands = parser.add_subparsers( title="Commands", dest="co...
24.938776
73
0.621931
import sys import argparse from opennebula_gc import clean_opennebula def cli(): parser = argparse.ArgumentParser( prog="Clean OpenNebula Resources", description="CLI tool to clean outdated resources in OpenNebula") commands = parser.add_subparsers( title="Commands", dest="co...
true
true
f7fa94054efbf16cdd7e617e40023ae3c262e949
3,201
py
Python
app/process_engine/action/remote_call_action.py
patromi/tracardi
cd5029bd9eb20d4cea210cc7a62fa12e8327686e
[ "MIT" ]
null
null
null
app/process_engine/action/remote_call_action.py
patromi/tracardi
cd5029bd9eb20d4cea210cc7a62fa12e8327686e
[ "MIT" ]
null
null
null
app/process_engine/action/remote_call_action.py
patromi/tracardi
cd5029bd9eb20d4cea210cc7a62fa12e8327686e
[ "MIT" ]
null
null
null
import json from datetime import datetime import aiohttp from tracardi_plugin_sdk.domain.register import Plugin, Spec, MetaData from tracardi_plugin_sdk.domain.result import Result from tracardi_plugin_sdk.action_runner import ActionRunner class RemoteCallAction(ActionRunner): def __init__(self, **kwargs): ...
32.663265
116
0.542643
import json from datetime import datetime import aiohttp from tracardi_plugin_sdk.domain.register import Plugin, Spec, MetaData from tracardi_plugin_sdk.domain.result import Result from tracardi_plugin_sdk.action_runner import ActionRunner class RemoteCallAction(ActionRunner): def __init__(self, **kwargs): ...
true
true
f7fa942da094dc5d83f8d491d941434cb724d1f1
196
py
Python
ihome/ihome/settings/csrf.py
xyuzi/ihome
ab74e4efb73c14d2b410f6c19c6b2a35f8fd720e
[ "MIT" ]
null
null
null
ihome/ihome/settings/csrf.py
xyuzi/ihome
ab74e4efb73c14d2b410f6c19c6b2a35f8fd720e
[ "MIT" ]
10
2021-03-19T11:31:11.000Z
2022-02-10T10:44:16.000Z
ihome/ihome/settings/csrf.py
xyuzi/ihome
ab74e4efb73c14d2b410f6c19c6b2a35f8fd720e
[ "MIT" ]
null
null
null
from django.utils.deprecation import MiddlewareMixin class DisableCSRFCheck(MiddlewareMixin): def process_request(self, request): setattr(request, '_dont_enforce_csrf_checks', True)
28
59
0.790816
from django.utils.deprecation import MiddlewareMixin class DisableCSRFCheck(MiddlewareMixin): def process_request(self, request): setattr(request, '_dont_enforce_csrf_checks', True)
true
true
f7fa94d1c418d9ee22f452e15cd24f8accbad154
1,187
py
Python
modules/crlibm/doc/log_rz.py
brycelelbach/nt2
73d7e8dd390fa4c8d251c6451acdae65def70e0b
[ "BSL-1.0" ]
1
2022-03-24T03:35:10.000Z
2022-03-24T03:35:10.000Z
modules/crlibm/doc/log_rz.py
brycelelbach/nt2
73d7e8dd390fa4c8d251c6451acdae65def70e0b
[ "BSL-1.0" ]
null
null
null
modules/crlibm/doc/log_rz.py
brycelelbach/nt2
73d7e8dd390fa4c8d251c6451acdae65def70e0b
[ "BSL-1.0" ]
null
null
null
[ ## this file was manually modified by jt { 'functor' : { 'arity' : '1', 'call_types' : [], 'ret_arity' : '0', 'rturn' : { 'default' : 'T', }, 'simd_types' : [], 'special' : ['crlibm'], 'type_defs' : [], 'types' :...
26.977273
71
0.333614
[ ty' : '1', 'call_types' : [], 'ret_arity' : '0', 'rturn' : { 'default' : 'T', }, 'simd_types' : [], 'special' : ['crlibm'], 'type_defs' : [], 'types' : ['real_'], }, 'info' : 'manually modified', 'unit' : { ...
true
true
f7fa951dadf854827f170957c5a10be64d8433a8
5,873
py
Python
sdk/python/pulumi_checkly/provider.py
stack72/pulumi-checkly-1
d63bdf5ea95b54a69a9ce07f42210bf3483491ba
[ "MIT" ]
7
2022-02-16T15:04:48.000Z
2022-03-30T16:40:17.000Z
sdk/python/pulumi_checkly/provider.py
checkly/pulumi-chekly
0e4b7f0e20e857765876fce2661e49bc8f197a20
[ "MIT" ]
5
2022-03-11T17:01:17.000Z
2022-03-16T02:33:14.000Z
sdk/python/pulumi_checkly/provider.py
checkly/pulumi-chekly
0e4b7f0e20e857765876fce2661e49bc8f197a20
[ "MIT" ]
1
2022-03-11T16:55:01.000Z
2022-03-11T16:55:01.000Z
# 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 ...
40.784722
134
0.640729
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ProviderArgs', 'Provider'] @pulumi.input_type class ProviderArgs: def __init__(__self__, *, api_key: pulumi.Input[str], ...
true
true
f7fa959d161b335557b336d45d312ebe6a257756
1,051
py
Python
src/OTLMOW/PostenMapping/Model/Post060379901.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/PostenMapping/Model/Post060379901.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/PostenMapping/Model/Post060379901.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.PostenMapping.StandaardPost import StandaardPost from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping # Generated with PostenCreator. To modify: extend, do not edit class Post060379901(StandaardPost): def __init__(self): super().__init__( nummer...
40.423077
111
0.615604
from OTLMOW.PostenMapping.StandaardPost import StandaardPost from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping class Post060379901(StandaardPost): def __init__(self): super().__init__( nummer='0603.79901', beschrijving='Heropvoegen van natuursteentegels v...
true
true
f7fa9705f784566bd8f5aec4a40f6908ad4e076a
5,321
py
Python
movienightbot/actions/__init__.py
itsTheFae/MovieNightBot
b7c0eff0c9f3c5a8b403140267bfbc2f6ace78dc
[ "WTFPL" ]
null
null
null
movienightbot/actions/__init__.py
itsTheFae/MovieNightBot
b7c0eff0c9f3c5a8b403140267bfbc2f6ace78dc
[ "WTFPL" ]
null
null
null
movienightbot/actions/__init__.py
itsTheFae/MovieNightBot
b7c0eff0c9f3c5a8b403140267bfbc2f6ace78dc
[ "WTFPL" ]
null
null
null
from abc import ABC, abstractmethod from typing import Dict, Tuple, Union, List from pathlib import Path from importlib import import_module import ast import logging import discord from movienightbot.db.controllers import ServerController __ALL__ = ["KNOWN_ACTIONS", "unknown_default_action"] logger = logging.getLog...
35.238411
114
0.61605
from abc import ABC, abstractmethod from typing import Dict, Tuple, Union, List from pathlib import Path from importlib import import_module import ast import logging import discord from movienightbot.db.controllers import ServerController __ALL__ = ["KNOWN_ACTIONS", "unknown_default_action"] logger = logging.getLog...
true
true
f7fa974f827032fc53735e0c88b047a45dea81b4
3,641
py
Python
wd/wdapp/timeseries_analysis.py
LiYangCom1994/companylair
e8d085e3357b08f178b089c4a52e5dc2f9eb103f
[ "MIT" ]
null
null
null
wd/wdapp/timeseries_analysis.py
LiYangCom1994/companylair
e8d085e3357b08f178b089c4a52e5dc2f9eb103f
[ "MIT" ]
null
null
null
wd/wdapp/timeseries_analysis.py
LiYangCom1994/companylair
e8d085e3357b08f178b089c4a52e5dc2f9eb103f
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt import seaborn as sns from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import cross_val_score from sklearn.model_selection import learning_c...
36.777778
132
0.652568
import pandas as pd import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt import seaborn as sns from sklearn.tree import DecisionTreeRegressor from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import cross_val_score from sklearn.model_selection import learning_c...
true
true
f7fa990ffb5ad2f3cde5b220ac889d31b9c7bd82
209
py
Python
pyWAPOR/Collect/Landsat/PrepareLandsat.py
hectornieto/wapor-et-look
bc0b98be58d1680de2f82909809ac876f78f2d85
[ "Apache-2.0" ]
1
2021-05-24T08:12:03.000Z
2021-05-24T08:12:03.000Z
pyWAPOR/Collect/Landsat/PrepareLandsat.py
hectornieto/wapor-et-look
bc0b98be58d1680de2f82909809ac876f78f2d85
[ "Apache-2.0" ]
2
2020-06-25T08:27:55.000Z
2020-08-28T07:38:17.000Z
pyWAPOR/Collect/Landsat/PrepareLandsat.py
DHI-GRAS/wapor-et-look
e05b8f24616af8fc99ac1d646c878b353cb35aef
[ "Apache-2.0" ]
4
2020-09-23T09:51:59.000Z
2021-08-10T08:59:14.000Z
import sys from pyWAPOR.Collect.Landsat.PreprocessLandsat import PreprocessLandsat def main(data_dir, output_dir): PreprocessLandsat(data_dir, output_dir) if __name__ == '__main__': main(sys.argv)
19
71
0.779904
import sys from pyWAPOR.Collect.Landsat.PreprocessLandsat import PreprocessLandsat def main(data_dir, output_dir): PreprocessLandsat(data_dir, output_dir) if __name__ == '__main__': main(sys.argv)
true
true
f7fa9a3a0085d2c9c70e32daa8ce6853068eb974
4,239
py
Python
flexbe_core/flexbe_core/proxy/proxy_publisher.py
FlexBE/flexbe_behavior_engine
735a3b68dfbe817db9383e53fef63afd6868219d
[ "BSD-3-Clause" ]
1
2022-03-11T04:56:31.000Z
2022-03-11T04:56:31.000Z
flexbe_core/flexbe_core/proxy/proxy_publisher.py
FlexBE/flexbe_behavior_engine
735a3b68dfbe817db9383e53fef63afd6868219d
[ "BSD-3-Clause" ]
null
null
null
flexbe_core/flexbe_core/proxy/proxy_publisher.py
FlexBE/flexbe_behavior_engine
735a3b68dfbe817db9383e53fef63afd6868219d
[ "BSD-3-Clause" ]
null
null
null
import rclpy import time from threading import Timer from flexbe_core.logger import Logger from flexbe_core.proxy.qos import QOS_DEFAULT class ProxyPublisher(object): """ A proxy for publishing topics. """ _node = None _topics = {} def _initialize(node): ProxyPublisher._node = node ...
32.860465
104
0.615004
import rclpy import time from threading import Timer from flexbe_core.logger import Logger from flexbe_core.proxy.qos import QOS_DEFAULT class ProxyPublisher(object): _node = None _topics = {} def _initialize(node): ProxyPublisher._node = node Logger.initialize(node) def __init__(se...
true
true
f7fa9b8365284acd185fed91ce8bdc1ac798ad0d
2,091
py
Python
composer/models/huggingface.py
growlix/composer
27418a3c65dca26d90ac09c6ae67cbd5d0202ccf
[ "Apache-2.0" ]
945
2021-10-13T16:24:20.000Z
2022-03-31T21:21:54.000Z
composer/models/huggingface.py
growlix/composer
27418a3c65dca26d90ac09c6ae67cbd5d0202ccf
[ "Apache-2.0" ]
544
2021-10-13T20:23:27.000Z
2022-03-31T02:47:54.000Z
composer/models/huggingface.py
growlix/composer
27418a3c65dca26d90ac09c6ae67cbd5d0202ccf
[ "Apache-2.0" ]
39
2021-10-13T14:33:33.000Z
2022-03-31T11:13:19.000Z
# Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 """A wrapper class that converts 🤗 Transformers models to composer models""" from __future__ import annotations from typing import TYPE_CHECKING, List, Optional from torchmetrics import Metric from torchmetrics.collections import Metr...
30.304348
119
0.693926
from __future__ import annotations from typing import TYPE_CHECKING, List, Optional from torchmetrics import Metric from torchmetrics.collections import MetricCollection from composer.models.base import ComposerModel if TYPE_CHECKING: import transformers __all__ = ["HuggingFaceModel"] class HuggingFaceMo...
true
true
f7fa9babcc7fac5e2b1da9a07e4660107e1120b6
197
py
Python
web/apps/__init__.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
2
2017-06-12T07:58:51.000Z
2018-03-08T09:43:35.000Z
web/apps/__init__.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
1
2017-06-10T02:05:52.000Z
2017-07-04T03:57:28.000Z
web/apps/__init__.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
null
null
null
from flask import Flask, jsonify, abort, make_response, render_template app = Flask(__name__) app.config.from_object("config") app.template_folder = "../templates" app.static_folder = "../static"
28.142857
71
0.766497
from flask import Flask, jsonify, abort, make_response, render_template app = Flask(__name__) app.config.from_object("config") app.template_folder = "../templates" app.static_folder = "../static"
true
true
f7fa9c78cb43be16736ccdab579c0f2223e3a457
2,887
py
Python
2019/Day3-CrossedWires/main.py
limited/AdventOfCode
36f92b9c42d7b81f23f4e14d07657a03a9a2beb3
[ "Apache-2.0" ]
null
null
null
2019/Day3-CrossedWires/main.py
limited/AdventOfCode
36f92b9c42d7b81f23f4e14d07657a03a9a2beb3
[ "Apache-2.0" ]
null
null
null
2019/Day3-CrossedWires/main.py
limited/AdventOfCode
36f92b9c42d7b81f23f4e14d07657a03a9a2beb3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # UGH, needed a hint from reddit about handle to handle negative numbers. The grid doesn't wrap around, its a 4 quadrant coordinate space # Also picked up using a dict as a sparse representation from reddit. from collections import defaultdict def read_input(filename): with open(filename, '...
29.762887
137
0.489435
# Also picked up using a dict as a sparse representation from reddit. from collections import defaultdict def read_input(filename): with open(filename, 'r') as f: lines = [l.rstrip().split(',') for l in f] return lines def update_grid(grid, cur_y, cur_x, steps): if (cur_y, cur_x) n...
true
true
f7fa9d885e89165fa59218cd66ef4b684ac40a2f
7,135
py
Python
empire/server/common/credentials.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
empire/server/common/credentials.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
empire/server/common/credentials.py
awsmhacks/Empire
6a6f0881798ce92a54ce9896d2ffe4855855872d
[ "BSD-3-Clause" ]
null
null
null
""" Credential handling functionality for Empire. """ from __future__ import absolute_import, print_function import os from builtins import input, object, str from sqlalchemy import and_, or_ from empire.server.database import models from empire.server.database.base import Session from . import helpers class Cr...
30.105485
88
0.502453
from __future__ import absolute_import, print_function import os from builtins import input, object, str from sqlalchemy import and_, or_ from empire.server.database import models from empire.server.database.base import Session from . import helpers class Credentials(object): def __init__(self, MainMenu, arg...
true
true
f7fa9deffa07fd6b088b4a38645b7fc6de88dcd6
5,044
py
Python
homeassistant/components/everlights/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/everlights/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/everlights/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for EverLights lights.""" from datetime import timedelta import logging from typing import Tuple import pyeverlights import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, SUPPORT_COLOR,...
29.497076
86
0.648295
from datetime import timedelta import logging from typing import Tuple import pyeverlights import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_EFFECT, Light, ) fro...
true
true
f7fa9e7684e40eb97e693344e27ca77458e7dd13
77,071
py
Python
ingress/ambassador/ambassador/ambassador/config.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
ingress/ambassador/ambassador/ambassador/config.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2021-03-26T00:22:50.000Z
2021-03-26T00:26:07.000Z
ingress/ambassador/ambassador/ambassador/config.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
# Copyright 2018 Datawire. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
40.3091
134
0.577584
import sys import collections import datetime import json import logging import os import re from urllib.parse import urlparse import jsonschema import semantic_version import yaml from pkg_resources import Requirement, resource_filename from jinja2 import Environment, FileSystemLoader from .utils im...
true
true
f7fa9ec1636705253fec23dbf2339ee3acbc644b
7,168
py
Python
text_sentiment/tests/test_app.py
ChrisCintron/text-sentiment
47510824ebf045d183825b7dc8feba0876982752
[ "Unlicense" ]
null
null
null
text_sentiment/tests/test_app.py
ChrisCintron/text-sentiment
47510824ebf045d183825b7dc8feba0876982752
[ "Unlicense" ]
null
null
null
text_sentiment/tests/test_app.py
ChrisCintron/text-sentiment
47510824ebf045d183825b7dc8feba0876982752
[ "Unlicense" ]
null
null
null
import pytest import types from context import app #context file adjust our working directory in order to access app from app import * from fixtures.constants import * class Test_Filters: @pytest.fixture(autouse=True) def filterobj(self): self.line = 'Cont1ain filt2ers us1ed to filter th103e con*tents ...
44.521739
166
0.641044
import pytest import types from context import app from app import * from fixtures.constants import * class Test_Filters: @pytest.fixture(autouse=True) def filterobj(self): self.line = 'Cont1ain filt2ers us1ed to filter th103e con*tents from textfile' yield Filters() def test_init(self,fi...
true
true
f7fa9ef0a1bbff2b2dd8065c638bfe3a89080438
79,555
py
Python
sympy/solvers/tests/test_solvers.py
nikkigabbard/sympy
1819379bdcca733eabc635ca4b3c9ae3deff1205
[ "BSD-3-Clause" ]
2
2019-10-18T12:45:34.000Z
2020-08-10T08:27:59.000Z
sympy/solvers/tests/test_solvers.py
nikkigabbard/sympy
1819379bdcca733eabc635ca4b3c9ae3deff1205
[ "BSD-3-Clause" ]
null
null
null
sympy/solvers/tests/test_solvers.py
nikkigabbard/sympy
1819379bdcca733eabc635ca4b3c9ae3deff1205
[ "BSD-3-Clause" ]
1
2019-10-18T12:39:41.000Z
2019-10-18T12:39:41.000Z
from sympy import ( Abs, And, Derivative, Dummy, Eq, Float, Function, Gt, I, Integral, LambertW, Lt, Matrix, Or, Poly, Q, Rational, S, Symbol, Ne, Wild, acos, asin, atan, atanh, cos, cosh, diff, erf, erfinv, erfc, erfcinv, exp, im, log, pi, re, sec, sin, sinh, solve, solve_linear, sqrt, sstr, symbol...
38.978442
94
0.482861
from sympy import ( Abs, And, Derivative, Dummy, Eq, Float, Function, Gt, I, Integral, LambertW, Lt, Matrix, Or, Poly, Q, Rational, S, Symbol, Ne, Wild, acos, asin, atan, atanh, cos, cosh, diff, erf, erfinv, erfc, erfcinv, exp, im, log, pi, re, sec, sin, sinh, solve, solve_linear, sqrt, sstr, symbol...
true
true
f7fa9f0d72f77c263bb33fdb9957905626d997d8
3,114
py
Python
mopidy/audio/dummy.py
tamland/mopidy
7d5117c299ec33b66b67b906a9971bcbc77c3133
[ "Apache-2.0" ]
1
2018-05-12T21:28:49.000Z
2018-05-12T21:28:49.000Z
mopidy/audio/dummy.py
tamland/mopidy
7d5117c299ec33b66b67b906a9971bcbc77c3133
[ "Apache-2.0" ]
null
null
null
mopidy/audio/dummy.py
tamland/mopidy
7d5117c299ec33b66b67b906a9971bcbc77c3133
[ "Apache-2.0" ]
null
null
null
"""A dummy audio actor for use in tests. This class implements the audio API in the simplest way possible. It is used in tests of the core and backends. """ from __future__ import absolute_import, unicode_literals import pykka from .constants import PlaybackState from .listener import AudioListener class DummyAud...
27.557522
79
0.648041
from __future__ import absolute_import, unicode_literals import pykka from .constants import PlaybackState from .listener import AudioListener class DummyAudio(pykka.ThreadingActor): def __init__(self, config=None, mixer=None): super(DummyAudio, self).__init__() self.state = PlaybackState.STOPP...
true
true