hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74ef856b6c2fb7cebd941cf789fbc6cc020066b
1,548
py
Python
setup.py
sadjadasghari/imgaug
efaf6312a744f13ee412f93386eb59fd405e04fb
[ "MIT" ]
4
2018-11-24T15:31:36.000Z
2020-06-23T02:52:45.000Z
setup.py
sadjadasghari/imgaug
efaf6312a744f13ee412f93386eb59fd405e04fb
[ "MIT" ]
null
null
null
setup.py
sadjadasghari/imgaug
efaf6312a744f13ee412f93386eb59fd405e04fb
[ "MIT" ]
1
2018-10-30T07:53:08.000Z
2018-10-30T07:53:08.000Z
from setuptools import setup, find_packages import os # Check if OpenCV is installed and raise an error if it is not # but don't do this if the ReadTheDocs systems tries to install # the library, as that is configured to mock cv2 anyways READ_THE_DOCS = (os.environ.get("READTHEDOCS", "False") == "True") NO_CV2_INSTALL...
46.909091
144
0.73385
from setuptools import setup, find_packages import os # the library, as that is configured to mock cv2 anyways READ_THE_DOCS = (os.environ.get("READTHEDOCS", "False") == "True") NO_CV2_INSTALLED_CHECK = (os.environ.get("IMGAUG_NO_CV2_INSTALLED_CHECK", "False") == "True") if not READ_THE_DOCS and not NO_CV2_INSTALLED...
true
true
f74ef880040a434d7ffc4f84e12adb12dbed775b
48,905
py
Python
TelegramForwarder/Source/telethon/utils.py
Invectys/TelegramBots
658eaae2d23a476b9407e6db6f3e1be57c5e7465
[ "MIT" ]
null
null
null
TelegramForwarder/Source/telethon/utils.py
Invectys/TelegramBots
658eaae2d23a476b9407e6db6f3e1be57c5e7465
[ "MIT" ]
null
null
null
TelegramForwarder/Source/telethon/utils.py
Invectys/TelegramBots
658eaae2d23a476b9407e6db6f3e1be57c5e7465
[ "MIT" ]
null
null
null
""" Utilities for working with the Telegram API itself (such as handy methods to convert between an entity like a User, Chat, etc. into its Input version) """ import base64 import binascii import imghdr import inspect import io import itertools import logging import math import mimetypes import os import pathlib import...
35.48984
2,019
0.642879
import base64 import binascii import imghdr import inspect import io import itertools import logging import math import mimetypes import os import pathlib import re import struct from collections import namedtuple from mimetypes import guess_extension from types import GeneratorType from .extensions import markdown, h...
true
true
f74ef89cb0ba87847d2a393d94751e326233a9e0
99
py
Python
Chapter04/tf2/autograph.py
PacktPublishing/Hands-On-Neural-Networks-with-TensorFlow-2.0
8b21ecfca7504d5104cced2375e23a1a3e72e767
[ "MIT" ]
112
2019-09-24T11:00:19.000Z
2022-03-24T09:31:47.000Z
Chapter04/autograph.py
sweaterr/Hands-On-Neural-Networks-with-TensorFlow-2.0
e9a76ee25d359e5e7652d6301c116fa071ded13d
[ "MIT" ]
2
2021-08-25T16:01:02.000Z
2022-02-10T01:40:27.000Z
Chapter04/autograph.py
sweaterr/Hands-On-Neural-Networks-with-TensorFlow-2.0
e9a76ee25d359e5e7652d6301c116fa071ded13d
[ "MIT" ]
63
2019-09-30T06:15:42.000Z
2022-03-28T05:46:44.000Z
import tensorflow as tf @tf.function def f(): for i in range(10): print(i) f() f()
8.25
23
0.555556
import tensorflow as tf @tf.function def f(): for i in range(10): print(i) f() f()
true
true
f74efa104464bb4a8c84580a3f6d37a2ae1e4149
404
py
Python
src/pretalx/submission/migrations/0023_submission_is_featured.py
codingcatgirl/pretalx
26554967772efa5248ae9b6a0fa838b0e8713807
[ "Apache-2.0" ]
null
null
null
src/pretalx/submission/migrations/0023_submission_is_featured.py
codingcatgirl/pretalx
26554967772efa5248ae9b6a0fa838b0e8713807
[ "Apache-2.0" ]
null
null
null
src/pretalx/submission/migrations/0023_submission_is_featured.py
codingcatgirl/pretalx
26554967772efa5248ae9b6a0fa838b0e8713807
[ "Apache-2.0" ]
null
null
null
# Generated by Django 1.11.7 on 2018-01-13 14:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("submission", "0022_submission_review_code"), ] operations = [ migrations.AddField( model_name="submission", name="i...
21.263158
54
0.616337
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("submission", "0022_submission_review_code"), ] operations = [ migrations.AddField( model_name="submission", name="is_featured", field=models.BooleanFie...
true
true
f74efc22512e3302d6823919cace8c770f18fe99
52,366
py
Python
python/ccxt/async_support/cex.py
dougvanzee/ccxt
ed06a2d180e02d1006f33be6ba65407ecb0a831b
[ "MIT" ]
2
2021-05-27T03:58:42.000Z
2022-02-21T03:24:08.000Z
python/ccxt/async_support/cex.py
dougvanzee/ccxt
ed06a2d180e02d1006f33be6ba65407ecb0a831b
[ "MIT" ]
null
null
null
python/ccxt/async_support/cex.py
dougvanzee/ccxt
ed06a2d180e02d1006f33be6ba65407ecb0a831b
[ "MIT" ]
1
2022-01-11T07:39:19.000Z
2022-01-11T07:39:19.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
40.688423
461
0.427147
rt.base.exchange import Exchange try: basestring except NameError: basestring = str import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import NullResponse from ccxt.base.errors imp...
true
true
f74efda327968526ad60e08fb0462fbe85b28cd1
1,101
py
Python
web/helpers/globals.py
t0m0094/RPANBot
556b870ecca5a83047c5996e4a5ae28123ca2d96
[ "Apache-2.0" ]
null
null
null
web/helpers/globals.py
t0m0094/RPANBot
556b870ecca5a83047c5996e4a5ae28123ca2d96
[ "Apache-2.0" ]
null
null
null
web/helpers/globals.py
t0m0094/RPANBot
556b870ecca5a83047c5996e4a5ae28123ca2d96
[ "Apache-2.0" ]
null
null
null
""" Copyright 2022 RPANBot 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 distrib...
32.382353
91
0.762943
from nextcord import CategoryChannel, TextChannel from web.helpers.classes import Guild def get_guild_icon(guild: Guild, size: int = 128, format: str = "jpg") -> str: if not guild.icon: return "https://discordapp.com/assets/322c936a8c8be1b803cd94861bdfa868.png" return f"https://cdn.discordapp.com/ic...
true
true
f74efddf6bd37c7f94d0eb6493dd8e83f6e7591d
798
py
Python
pythonwarrior/abilities/rest.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
46
2015-02-02T19:32:05.000Z
2022-03-16T16:24:14.000Z
pythonwarrior/abilities/rest.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
5
2015-07-06T15:26:43.000Z
2020-04-21T08:12:04.000Z
pythonwarrior/abilities/rest.py
kuvaszkah/python_warrior
2e95285dd628832a916510345fd2b2b8232adcec
[ "MIT" ]
10
2015-02-10T02:56:22.000Z
2021-05-15T22:37:38.000Z
from pythonwarrior.abilities.base import AbilityBase class Rest(AbilityBase): def description(self): return "Gain 10% of max health back, but do nothing more." def perform(self): if self._unit.health < self._unit.max_health: amount = int(self._unit.max_health * 0.1) if...
39.9
75
0.568922
from pythonwarrior.abilities.base import AbilityBase class Rest(AbilityBase): def description(self): return "Gain 10% of max health back, but do nothing more." def perform(self): if self._unit.health < self._unit.max_health: amount = int(self._unit.max_health * 0.1) if...
true
true
f74efdf3d682b147a6b0b3042fa1ca222e951a0a
772
py
Python
Spatial/spatial_graph_calc.py
dglowienka/Small_DD_modules
5714a40163b93a50dba2063d4422a0a1aeb7b7f3
[ "MIT" ]
null
null
null
Spatial/spatial_graph_calc.py
dglowienka/Small_DD_modules
5714a40163b93a50dba2063d4422a0a1aeb7b7f3
[ "MIT" ]
null
null
null
Spatial/spatial_graph_calc.py
dglowienka/Small_DD_modules
5714a40163b93a50dba2063d4422a0a1aeb7b7f3
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt; import numpy as np; import math data = np.loadtxt('spatial.txt', skiprows=1); x = data[:,0]; V = data[:,1]; E = data[:,2]; n = data[:,3]; p = data[:,4]; s = data[:,5]; NA = data[:,6]; NC = data[:,7]; Jn = data[:,8]; Jp = data[:,9]; J_NA = data[:,10]; J_NC = data[:,11]; J_disp = data[:...
18.380952
75
0.553109
import matplotlib.pyplot as plt; import numpy as np; import math data = np.loadtxt('spatial.txt', skiprows=1); x = data[:,0]; V = data[:,1]; E = data[:,2]; n = data[:,3]; p = data[:,4]; s = data[:,5]; NA = data[:,6]; NC = data[:,7]; Jn = data[:,8]; Jp = data[:,9]; J_NA = data[:,10]; J_NC = data[:,11]; J_disp = data[:...
true
true
f74efe746a7592aad8602102088ca01a4d620d6e
770
py
Python
torch/utils/data/datapipes/iter/streamreader.py
vulcantron/pytorch
bbbf00a8a83879e687fb7e96e31a619388b6b54e
[ "Intel" ]
1
2021-08-29T12:15:29.000Z
2021-08-29T12:15:29.000Z
torch/utils/data/datapipes/iter/streamreader.py
vulcantron/pytorch
bbbf00a8a83879e687fb7e96e31a619388b6b54e
[ "Intel" ]
1
2021-06-25T22:00:31.000Z
2021-06-25T22:00:31.000Z
torch/utils/data/datapipes/iter/streamreader.py
vulcantron/pytorch
bbbf00a8a83879e687fb7e96e31a619388b6b54e
[ "Intel" ]
null
null
null
from typing import Tuple from torch.utils.data import IterDataPipe class StreamReaderIterDataPipe(IterDataPipe[Tuple[str, bytes]]): r""" :class:`StreamReaderIterDataPipe` Iterable DataPipe to load IO stream with label name, and to yield bytes with label name in a tuple args: chunk : bytes to ...
30.8
64
0.618182
from typing import Tuple from torch.utils.data import IterDataPipe class StreamReaderIterDataPipe(IterDataPipe[Tuple[str, bytes]]): def __init__(self, source_datapipe, chunk=None): self.source_datapipe = source_datapipe self.chunk = chunk def __iter__(self): for (furl, stream) in self...
true
true
f74eff79f9ec9cd86a008a05c276bc94e18a8747
235,942
py
Python
cpplint.py
ancjf/depot_tools
4b21db06e48e90335a0a1ae5d5b911b960ea0e5a
[ "BSD-3-Clause" ]
null
null
null
cpplint.py
ancjf/depot_tools
4b21db06e48e90335a0a1ae5d5b911b960ea0e5a
[ "BSD-3-Clause" ]
null
null
null
cpplint.py
ancjf/depot_tools
4b21db06e48e90335a0a1ae5d5b911b960ea0e5a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
38.584137
97
0.652588
import codecs import copy import getopt import math import os import re import sre_compile import string import sys import unicodedata _USAGE = """ Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [--root=subd...
true
true
f74efffc532129589357ca08e380ad870b888ea9
530
py
Python
01-quick-start/01-variable-data-type/02-data-type.py
ryanfawcett/python
273cf165eae7021d46cddf387b5424a9fe38ab51
[ "MIT" ]
null
null
null
01-quick-start/01-variable-data-type/02-data-type.py
ryanfawcett/python
273cf165eae7021d46cddf387b5424a9fe38ab51
[ "MIT" ]
null
null
null
01-quick-start/01-variable-data-type/02-data-type.py
ryanfawcett/python
273cf165eae7021d46cddf387b5424a9fe38ab51
[ "MIT" ]
null
null
null
# 数据类型 # int money = 28 print(type(money)) # <class 'int'> # float money = 28.9 print(type(money)) # <class 'float'> # String money = '10000' print(type(money)) # <class 'str'> money = "100000" print(type(money)) # <class 'str'> message = '"Ryan Fawcett"' print(message) message = "'Ryan Fawcett'" print(messag...
12.926829
38
0.628302
money = 28 print(type(money)) money = 28.9 print(type(money)) money = '10000' print(type(money)) money = "100000" print(type(money)) message = '"Ryan Fawcett"' print(message) message = "'Ryan Fawcett'" print(message) message = ''' 出塞 [唐] 王昌龄 秦时明月汉时关,万里长征人未还。 但使龙城飞将在,不教胡马度阴山。 ''' p...
true
true
f74f0040e9f6474d1a617741784555303e9629ac
342
py
Python
notesapp/models.py
martinmandina/App4Notes
92b39628f4fccf8faaee9e259bfefc2d00d3a49c
[ "MIT" ]
null
null
null
notesapp/models.py
martinmandina/App4Notes
92b39628f4fccf8faaee9e259bfefc2d00d3a49c
[ "MIT" ]
null
null
null
notesapp/models.py
martinmandina/App4Notes
92b39628f4fccf8faaee9e259bfefc2d00d3a49c
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Notes(models.Model): title = models.CharField(max_length=255) content = models.TextField(blank=True, null=True) created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) class Meta: ...
26.307692
56
0.719298
from django.db import models class Notes(models.Model): title = models.CharField(max_length=255) content = models.TextField(blank=True, null=True) created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) class Meta: ordering = ('title',)
true
true
f74f0070abe0b831d8cd12d2943b6e264b00e54d
215
py
Python
arc/arc009/arc009b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
arc/arc009/arc009b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
arc/arc009/arc009b.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
def conv(x): return int(''.join(t[c] for c in x)) b = input().split() N = int(input()) a = [input() for _ in range(N)] t = {b[i]: str(i) for i in range(10)} a.sort(key = lambda x: conv(x)) print(*a, sep='\n')
19.545455
40
0.548837
def conv(x): return int(''.join(t[c] for c in x)) b = input().split() N = int(input()) a = [input() for _ in range(N)] t = {b[i]: str(i) for i in range(10)} a.sort(key = lambda x: conv(x)) print(*a, sep='\n')
true
true
f74f012b4a187c17f0783497a4bcd3a63c42227f
2,094
py
Python
bluelog/settings.py
oriyao/oriyaoblog
b6948675e80f93c6fe528b6af93ed27b24f77629
[ "MIT" ]
1
2020-04-09T00:37:16.000Z
2020-04-09T00:37:16.000Z
bluelog/settings.py
oriyao/oriyaoblog
b6948675e80f93c6fe528b6af93ed27b24f77629
[ "MIT" ]
3
2020-04-14T06:29:38.000Z
2020-11-04T08:41:06.000Z
bluelog/settings.py
oriyao/oriyaoblog
b6948675e80f93c6fe528b6af93ed27b24f77629
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ :author: Grey Li (李辉) :Modify: oriyao :url: http://greyli.com :copyright: © 2018 Grey Li <withlihui@gmail.com> :license: MIT, see LICENSE for more details. """ import os import sys basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) # SQLite URI compat...
27.194805
98
0.699618
import os import sys basedir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) WIN = sys.platform.startswith('win') if WIN: prefix = 'sqlite:///' else: prefix = 'sqlite:////' class BaseConfig(object): SECRET_KEY = os.getenv('SECRET_KEY', 'dev key') BOOTSTRAP_SERVE_LOCAL = Tru...
true
true
f74f01925e38ce25af34d5c36e8a3302052da57e
978
py
Python
data_insertion/main.py
Greenman23/Psychology-Survey-App
e71720bc62bb79044b12774a27b4e48d3ed0583b
[ "MIT" ]
2
2020-10-08T22:39:55.000Z
2021-11-11T11:59:03.000Z
data_insertion/main.py
Greenman23/Psychology-Survey-App
e71720bc62bb79044b12774a27b4e48d3ed0583b
[ "MIT" ]
null
null
null
data_insertion/main.py
Greenman23/Psychology-Survey-App
e71720bc62bb79044b12774a27b4e48d3ed0583b
[ "MIT" ]
3
2020-07-22T21:46:11.000Z
2021-06-21T00:21:07.000Z
from sql_connection import db from survey_builder import Survey_Builder build= Survey_Builder() build.begin() ''' cursor = db.cursor() cursor.callproc("get_questions") results = [] for result in cursor.stored_results(): val = result.fetchall() print(val) results.append(val) print(results) cursor.callpro...
19.959184
67
0.718814
from sql_connection import db from survey_builder import Survey_Builder build= Survey_Builder() build.begin()
true
true
f74f01fcf7dd0ce7877700c1ca55be7d017fd9f7
25,674
py
Python
lib/FSANET_model.py
anArkitek/TriNet_WACV2021
760faad04aa697dfba752ec46661fe938665f23b
[ "Apache-2.0" ]
8
2021-01-07T16:56:17.000Z
2022-03-04T04:47:19.000Z
lib/FSANET_model.py
anArkitek/TriNet_WACV2021
760faad04aa697dfba752ec46661fe938665f23b
[ "Apache-2.0" ]
2
2021-03-10T08:31:37.000Z
2021-06-07T09:10:11.000Z
lib/FSANET_model.py
anArkitek/TriNet_WACV2021
760faad04aa697dfba752ec46661fe938665f23b
[ "Apache-2.0" ]
5
2021-02-04T08:14:37.000Z
2022-01-31T08:50:36.000Z
import sys import logging import numpy as np import tensorflow as tf from keras.models import Model from keras.applications.resnet50 import ResNet50 from keras.layers import Input from keras.layers import Dense from keras.layers import Conv2D from keras.layers import Layer from keras.layers import Reshape from keras...
41.611021
190
0.64688
import sys import logging import numpy as np import tensorflow as tf from keras.models import Model from keras.applications.resnet50 import ResNet50 from keras.layers import Input from keras.layers import Dense from keras.layers import Conv2D from keras.layers import Layer from keras.layers import Reshape from keras...
true
true
f74f032655201bbae1bc9b932d16423af77f8be8
14,645
py
Python
Lib/site-packages/sphinx/util/docfields.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-02-27T20:33:35.000Z
2021-02-27T20:33:35.000Z
Lib/site-packages/sphinx/util/docfields.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/sphinx/util/docfields.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-04-15T00:53:39.000Z
2021-04-15T00:53:39.000Z
""" sphinx.util.docfields ~~~~~~~~~~~~~~~~~~~~~ "Doc fields" are reST field lists in object descriptions that will be domain-specifically transformed to a more appealing presentation. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ ...
42.449275
95
0.579242
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union, cast from docutils import nodes from docutils.nodes import Node from sphinx import addnodes from sphinx.environment import BuildEnvironment from sphinx.util.typing import TextlikeNode if TYPE_CHECKING: from sphinx.directive import ObjectDesc...
true
true
f74f03524d87dfe5813f95bfa42d9999cec7132d
2,217
py
Python
OCS/enancib-pdf.py
r-luis/Projeto-PUB
7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1
[ "MIT" ]
null
null
null
OCS/enancib-pdf.py
r-luis/Projeto-PUB
7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1
[ "MIT" ]
null
null
null
OCS/enancib-pdf.py
r-luis/Projeto-PUB
7f1fad66614e7d5ba26a554aad6df6e65b0bc5d1
[ "MIT" ]
null
null
null
from urllib.request import urlopen from bs4 import BeautifulSoup import requests #import csv def baixararquivo(url,nomearquivo): nomearquivo=nomearquivo.replace("/", "-") links_with_text2 = [] page = requests.get(url) soup = BeautifulSoup(page.text, 'html.parser') for page1 in soup.find_all('a'): ...
34.107692
131
0.624718
from urllib.request import urlopen from bs4 import BeautifulSoup import requests def baixararquivo(url,nomearquivo): nomearquivo=nomearquivo.replace("/", "-") links_with_text2 = [] page = requests.get(url) soup = BeautifulSoup(page.text, 'html.parser') for page1 in soup.find_all('a'): if ...
true
true
f74f04445da41deb80fafc4c7f5c50797ae1fd8e
843
py
Python
Django/saver.py
JOHNKYON/Data_save
8d6820e2d6923cf5ca038abd39da8f42793d9ad7
[ "MIT" ]
null
null
null
Django/saver.py
JOHNKYON/Data_save
8d6820e2d6923cf5ca038abd39da8f42793d9ad7
[ "MIT" ]
null
null
null
Django/saver.py
JOHNKYON/Data_save
8d6820e2d6923cf5ca038abd39da8f42793d9ad7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import generators from __future__ import nested_scopes from __future__ import print_function from __future__ import unicode_literals from __future__ import with_statement from django.http import HttpResponse...
28.1
68
0.749703
from __future__ import absolute_import from __future__ import division from __future__ import generators from __future__ import nested_scopes from __future__ import print_function from __future__ import unicode_literals from __future__ import with_statement from django.http import HttpResponse from django.shortcuts ...
true
true
f74f05132e05727ebeb9a5756965991933d15073
12,445
py
Python
python/Lib/site-packages/tectle/orders.py
ksritharan/tectle
ca76424d85e66b041b40997838a3ceb79266efab
[ "MIT" ]
1
2021-03-04T14:58:05.000Z
2021-03-04T14:58:05.000Z
python/Lib/site-packages/tectle/orders.py
ksritharan/tectle
ca76424d85e66b041b40997838a3ceb79266efab
[ "MIT" ]
8
2021-02-26T02:32:59.000Z
2021-05-28T02:22:07.000Z
python/Lib/site-packages/tectle/orders.py
ksritharan/business-automation
ca76424d85e66b041b40997838a3ceb79266efab
[ "MIT" ]
null
null
null
from .db import get_connection, get_data_dict from flask import render_template, url_for, make_response, session import requests import traceback from datetime import datetime from time import sleep, process_time from .config import load_config, is_debug from .etsy import send_etsy_post_request from .sources.etsy impor...
34.859944
121
0.546485
from .db import get_connection, get_data_dict from flask import render_template, url_for, make_response, session import requests import traceback from datetime import datetime from time import sleep, process_time from .config import load_config, is_debug from .etsy import send_etsy_post_request from .sources.etsy impor...
true
true
f74f051e591a0708954d49ac05aaa0dfe3822777
8,258
py
Python
ding/envs/env_manager/tests/conftest.py
song2181/DI-engine
0a39b43f6ad9ef9862878de12b50184f4396be42
[ "Apache-2.0" ]
1
2022-03-21T16:15:39.000Z
2022-03-21T16:15:39.000Z
ding/envs/env_manager/tests/conftest.py
jiaruonan/DI-engine
268d77db3cb54401b2cfc83e2bc3ec87c31e7b83
[ "Apache-2.0" ]
null
null
null
ding/envs/env_manager/tests/conftest.py
jiaruonan/DI-engine
268d77db3cb54401b2cfc83e2bc3ec87c31e7b83
[ "Apache-2.0" ]
null
null
null
import random import time from collections import namedtuple import pytest import torch import numpy as np from easydict import EasyDict from functools import partial import gym from ding.envs.env.base_env import BaseEnvTimestep from ding.envs.env_manager.base_env_manager import EnvState from ding.envs.env_manager imp...
32.384314
115
0.621821
import random import time from collections import namedtuple import pytest import torch import numpy as np from easydict import EasyDict from functools import partial import gym from ding.envs.env.base_env import BaseEnvTimestep from ding.envs.env_manager.base_env_manager import EnvState from ding.envs.env_manager imp...
true
true
f74f0535118a5771a2d4686c0656d3b80c925046
3,416
py
Python
student_management_app/views.py
LawrenceDarko/School-management-system
2ff4334c97b3103e7bc279b48b0109bbed61ac95
[ "MIT" ]
null
null
null
student_management_app/views.py
LawrenceDarko/School-management-system
2ff4334c97b3103e7bc279b48b0109bbed61ac95
[ "MIT" ]
1
2021-02-26T21:26:08.000Z
2021-02-26T21:27:07.000Z
student_management_app/views.py
LawrenceDarko/School-management-system
2ff4334c97b3103e7bc279b48b0109bbed61ac95
[ "MIT" ]
null
null
null
import datetime import json import os import requests from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from student_management_app.EmailBackEnd ...
39.72093
123
0.647248
import datetime import json import os import requests from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from student_management_app.EmailBackEnd ...
true
true
f74f05964341b40fe1227e3037854fed4483cbc7
1,329
py
Python
examples/ch12/snippets_py/ex12.01.py
edson-gomes/Intro-to-Python
00a2f549916616b0f2036401573e35d66317f998
[ "MIT" ]
null
null
null
examples/ch12/snippets_py/ex12.01.py
edson-gomes/Intro-to-Python
00a2f549916616b0f2036401573e35d66317f998
[ "MIT" ]
null
null
null
examples/ch12/snippets_py/ex12.01.py
edson-gomes/Intro-to-Python
00a2f549916616b0f2036401573e35d66317f998
[ "MIT" ]
null
null
null
# Exercise 12.1 Snippets import requests request = requests.get('https://www.python.org') request.content # gives back the page’s HTML from bs4 import BeautifulSoup soup = BeautifulSoup(request.content, 'html5lib') text = soup.get_text(strip=True) # text without tags #########################################...
42.870968
74
0.568849
import requests request = requests.get('https://www.python.org') request.content from bs4 import BeautifulSoup soup = BeautifulSoup(request.content, 'html5lib') text = soup.get_text(strip=True)
true
true
f74f05aeb33ef81431f11a841640c26fb4f78021
11,361
py
Python
src/cogent3/evolve/motif_prob_model.py
u6052029/cogent3
ca0efcb7f60b715bcbfbecd924cdb98a53cefe20
[ "BSD-3-Clause" ]
null
null
null
src/cogent3/evolve/motif_prob_model.py
u6052029/cogent3
ca0efcb7f60b715bcbfbecd924cdb98a53cefe20
[ "BSD-3-Clause" ]
null
null
null
src/cogent3/evolve/motif_prob_model.py
u6052029/cogent3
ca0efcb7f60b715bcbfbecd924cdb98a53cefe20
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import warnings import numpy from cogent3.evolve.likelihood_tree import make_likelihood_tree_leaf from . import substitution_calculation __author__ = "Peter Maxwell" __copyright__ = "Copyright 2007-2020, The Cogent Project" __credits__ = ["Peter Maxwell"] __license__ = "BSD-3" __version__ = ...
37.371711
85
0.645102
import warnings import numpy from cogent3.evolve.likelihood_tree import make_likelihood_tree_leaf from . import substitution_calculation __author__ = "Peter Maxwell" __copyright__ = "Copyright 2007-2020, The Cogent Project" __credits__ = ["Peter Maxwell"] __license__ = "BSD-3" __version__ = "2020.7.2a" __maintai...
true
true
f74f05ce43a77619c2b5055d4b531786cdb5a2dd
4,940
py
Python
docs/conf.py
jks-liu/LeuvenMapMatching
e0a85e633c0351704b3e216d167625c7a1cc65a3
[ "Apache-2.0" ]
null
null
null
docs/conf.py
jks-liu/LeuvenMapMatching
e0a85e633c0351704b3e216d167625c7a1cc65a3
[ "Apache-2.0" ]
null
null
null
docs/conf.py
jks-liu/LeuvenMapMatching
e0a85e633c0351704b3e216d167625c7a1cc65a3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Leuven.MapMatching documentation build configuration file, created by # sphinx-quickstart on Sat Apr 14 23:24:31 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present i...
30.306748
79
0.68583
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode'] autoclass_content = 'both' templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'Leuven.MapMa...
true
true
f74f06476f4887c5e8beecf727bf69466e58f96e
1,599
py
Python
Example/PyDect200_Demo.py
lbenedix/PyDect200
261d297f48d50e63379c286a1f1ca5755ed09c00
[ "MIT" ]
null
null
null
Example/PyDect200_Demo.py
lbenedix/PyDect200
261d297f48d50e63379c286a1f1ca5755ed09c00
[ "MIT" ]
null
null
null
Example/PyDect200_Demo.py
lbenedix/PyDect200
261d297f48d50e63379c286a1f1ca5755ed09c00
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -- coding: utf-8 -- from __future__ import (absolute_import, division, print_function, unicode_literals) try: from PyDect200 import PyDect200 except: print(u'PyDect200 is not installed!') print(u'run: pip install PyDect200') exit() import ...
32.632653
98
0.609131
from __future__ import (absolute_import, division, print_function, unicode_literals) try: from PyDect200 import PyDect200 except: print(u'PyDect200 is not installed!') print(u'run: pip install PyDect200') exit() import getpass try: PyDect200.__version__ ex...
true
true
f74f08ed922e0d41356a880603216d001334fc32
762
py
Python
enyo/__init__.py
Keck-FOBOS/enyo
82dd4324083d456c78bcbafdd081bee53f0c7ba9
[ "BSD-3-Clause" ]
null
null
null
enyo/__init__.py
Keck-FOBOS/enyo
82dd4324083d456c78bcbafdd081bee53f0c7ba9
[ "BSD-3-Clause" ]
null
null
null
enyo/__init__.py
Keck-FOBOS/enyo
82dd4324083d456c78bcbafdd081bee53f0c7ba9
[ "BSD-3-Clause" ]
null
null
null
#!/bin/env/python3 # -*- encoding: utf-8 -*- import os __version__ = '0.1.0dev' __license__ = 'BSD3' __author__ = 'Kyle B. Westfall' __maintainer__ = 'Kyle B. Westfall' __email__ = 'westfall@ucolick.org' __copyright__ = '(c) 2018, Kyle B. Westfall' def enyo_source_dir(): """Return the root path to the DAP source...
26.275862
77
0.699475
import os __version__ = '0.1.0dev' __license__ = 'BSD3' __author__ = 'Kyle B. Westfall' __maintainer__ = 'Kyle B. Westfall' __email__ = 'westfall@ucolick.org' __copyright__ = '(c) 2018, Kyle B. Westfall' def enyo_source_dir(): import pkg_resources data_dir = pkg_resources.resource_filename('enyo', 'data') ...
true
true
f74f09bb1e59215d760713ce7bbb37d004bb1d05
20,410
py
Python
pysnmp/CISCOSB-SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCOSB-SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCOSB-SNMP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCOSB-SNMP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-SNMP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:07:32 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
116.628571
3,247
0.767957
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuild...
true
true
f74f0ad537764b22a980d92cddd22d8c3ab07b30
4,240
py
Python
libs/PureCloudPlatformClientV2/models/phone_change_topic_local_date_time.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
1
2021-10-08T20:46:45.000Z
2021-10-08T20:46:45.000Z
libs/PureCloudPlatformClientV2/models/phone_change_topic_local_date_time.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
libs/PureCloudPlatformClientV2/models/phone_change_topic_local_date_time.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
27.006369
77
0.577594
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class PhoneChangeTopicLocalDateTime(object): def __init__(self): self.swagger_types = { 'date': 'PhoneChangeTopicLocalDate', 'time': 'PhoneChangeTopicLocalTi...
true
true
f74f0b811ac2ed90f74e1fb91e6d3d1da85cfa18
2,656
py
Python
google-cloud-function-src/text2brain_model.py
ngohgia/text2brain_server
16bf523d63319d8c20497acfb2c5a82a5363df5e
[ "MIT" ]
1
2022-01-11T13:20:40.000Z
2022-01-11T13:20:40.000Z
google-cloud-function-src/text2brain_model.py
ngohgia/text2brain_server
16bf523d63319d8c20497acfb2c5a82a5363df5e
[ "MIT" ]
null
null
null
google-cloud-function-src/text2brain_model.py
ngohgia/text2brain_server
16bf523d63319d8c20497acfb2c5a82a5363df5e
[ "MIT" ]
1
2021-11-09T21:48:23.000Z
2021-11-09T21:48:23.000Z
import torch import torch.nn as nn from torch.nn.utils.rnn import pad_sequence from decoder import ImageDecoder import transformers class Text2BrainModel(nn.Module): def __init__(self, out_channels, fc_channels, decoder_filters, pretrained_bert_dir, decoder_act_fn=nn.Sigmoid, drop_p=0.5, decoder_input_shape=[4, 5...
36.383562
158
0.696913
import torch import torch.nn as nn from torch.nn.utils.rnn import pad_sequence from decoder import ImageDecoder import transformers class Text2BrainModel(nn.Module): def __init__(self, out_channels, fc_channels, decoder_filters, pretrained_bert_dir, decoder_act_fn=nn.Sigmoid, drop_p=0.5, decoder_input_shape=[4, 5...
true
true
f74f0c11065440f97d312e809ccb4491c16496e0
286
py
Python
launchers/dist2zip.py
jamesabel/osnap
fc3f2affc3190d91f0465c35971e8f877269d5fd
[ "MIT" ]
57
2016-08-20T03:15:50.000Z
2021-02-20T10:06:48.000Z
launchers/dist2zip.py
jamesabel/osnap
fc3f2affc3190d91f0465c35971e8f877269d5fd
[ "MIT" ]
21
2016-09-15T20:40:58.000Z
2020-10-27T23:22:55.000Z
launchers/dist2zip.py
jamesabel/osnap
fc3f2affc3190d91f0465c35971e8f877269d5fd
[ "MIT" ]
4
2016-11-02T22:06:13.000Z
2020-09-09T07:21:34.000Z
import base64 import bz2 import time import os import shutil import util def main(): dist_dir = util.get_launch_name() print('zipping %s (%s)' % (dist_dir, os.path.abspath(dist_dir))) shutil.make_archive(dist_dir, 'zip', dist_dir) if __name__ == '__main__': main()
15.888889
68
0.688811
import base64 import bz2 import time import os import shutil import util def main(): dist_dir = util.get_launch_name() print('zipping %s (%s)' % (dist_dir, os.path.abspath(dist_dir))) shutil.make_archive(dist_dir, 'zip', dist_dir) if __name__ == '__main__': main()
true
true
f74f0e678600696d8dd0b288fc2caabe4611dec2
1,038
py
Python
src/sentry/models/relay.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
src/sentry/models/relay.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/relay.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import six from django.db import models from django.utils import timezone from sentry.db.models import Model from django.utils.functional import cached_property import semaphore class Relay(Model): __core__ = True relay_id = models.CharField(max_length=64, unique=Tru...
28.833333
99
0.728324
from __future__ import absolute_import import six from django.db import models from django.utils import timezone from sentry.db.models import Model from django.utils.functional import cached_property import semaphore class Relay(Model): __core__ = True relay_id = models.CharField(max_length=64, unique=Tru...
true
true
f74f0ee100604dfe8ee0d7c7185d766cae07fa27
227
py
Python
conf_center/conf_center/doctype/iot_application_conf_version/test_iot_application_conf_version.py
srdgame/frappe_conf_center
4a7ce2c15b27965412b2dc2fd01d0c89ecacdd56
[ "MIT" ]
1
2021-12-22T10:27:34.000Z
2021-12-22T10:27:34.000Z
conf_center/conf_center/doctype/iot_application_conf_version/test_iot_application_conf_version.py
srdgame/frappe_conf_center
4a7ce2c15b27965412b2dc2fd01d0c89ecacdd56
[ "MIT" ]
null
null
null
conf_center/conf_center/doctype/iot_application_conf_version/test_iot_application_conf_version.py
srdgame/frappe_conf_center
4a7ce2c15b27965412b2dc2fd01d0c89ecacdd56
[ "MIT" ]
1
2021-12-22T10:27:37.000Z
2021-12-22T10:27:37.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018, freeioe.org and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestIOTApplicationConfVersion(unittest.TestCase): pass
20.636364
55
0.784141
from __future__ import unicode_literals import frappe import unittest class TestIOTApplicationConfVersion(unittest.TestCase): pass
true
true
f74f10491b5fb9a89d874a7bbde71544c3a1f222
4,558
py
Python
Fund/collector.py
livi2000/FundSpider
c79407241fe189b61afc54dd2e5b73c906aae0b5
[ "MIT" ]
null
null
null
Fund/collector.py
livi2000/FundSpider
c79407241fe189b61afc54dd2e5b73c906aae0b5
[ "MIT" ]
null
null
null
Fund/collector.py
livi2000/FundSpider
c79407241fe189b61afc54dd2e5b73c906aae0b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'study_sun' import sqlite3 import sys from entity import FundInfo reload(sys) sys.setdefaultencoding('utf-8') class FundCollector(object): DATABASE_TABLE_NAME = u'fundinfo' DATABASE_NAME = 'Fund.db' def __init__(self): self.db = sqlite3.connect(FundCollector....
38.957265
174
0.52172
__author__ = 'study_sun' import sqlite3 import sys from entity import FundInfo reload(sys) sys.setdefaultencoding('utf-8') class FundCollector(object): DATABASE_TABLE_NAME = u'fundinfo' DATABASE_NAME = 'Fund.db' def __init__(self): self.db = sqlite3.connect(FundCollector.DATABASE_NAME) ...
true
true
f74f1073d230cb40324b9ada9000d1923cd1c404
2,542
py
Python
tests/testnet/aio/test_blockchain.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
102
2018-04-08T23:05:00.000Z
2022-03-31T10:10:03.000Z
tests/testnet/aio/test_blockchain.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
246
2018-04-03T12:35:49.000Z
2022-02-28T10:44:28.000Z
tests/testnet/aio/test_blockchain.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
128
2018-04-14T01:39:12.000Z
2022-03-25T08:56:51.000Z
# -*- coding: utf-8 -*- import asyncio import pytest import logging from bitshares.aio.blockchain import Blockchain log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") ch = logging.StreamHandler() ch.setFormatter(form...
22.298246
85
0.747836
import asyncio import pytest import logging from bitshares.aio.blockchain import Blockchain log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") ch = logging.StreamHandler() ch.setFormatter(formatter) log.addHandler(c...
true
true
f74f10863c7ea1937ef290a30d1f8eb80a85600e
14,207
py
Python
testing/test_net.py
psoftware/ddosdefence-floodlight-controller
f373cfce10d04a0ee08264bde43ffc55751fdc09
[ "Apache-2.0" ]
2
2019-01-31T20:04:19.000Z
2020-05-06T08:06:48.000Z
testing/test_net.py
psoftware/ddosdefence-floodlight-controller
f373cfce10d04a0ee08264bde43ffc55751fdc09
[ "Apache-2.0" ]
null
null
null
testing/test_net.py
psoftware/ddosdefence-floodlight-controller
f373cfce10d04a0ee08264bde43ffc55751fdc09
[ "Apache-2.0" ]
2
2019-02-19T15:26:46.000Z
2019-05-11T03:57:01.000Z
#!/usr/bin/python """ consoles.py: bring up a bunch of miniature consoles on a virtual network This demo shows how to monitor a set of nodes by using Node's monitor() and Tkinter's createfilehandler(). We monitor nodes in a couple of ways: - First, each individual node is monitored, and its output is added to its...
31.224176
132
0.672556
import re from Tkinter import Frame, Button, Label, Text, Scrollbar, Canvas, Wm, READABLE from mininet.net import Mininet from mininet.topo import SingleSwitchTopo,Topo from mininet.node import OVSController,RemoteController from mininet.log import setLogLevel from mininet.term import makeTerms, cleanUpScreens fro...
true
true
f74f10d1bd4fb43abd61175d82998d6194f8fbd6
2,178
py
Python
fn_pa_panorama/fn_pa_panorama/components/panorama_get_addresses.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
65
2017-12-04T13:58:32.000Z
2022-03-24T18:33:17.000Z
fn_pa_panorama/fn_pa_panorama/components/panorama_get_addresses.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
48
2018-03-02T19:17:14.000Z
2022-03-09T22:00:38.000Z
fn_pa_panorama/fn_pa_panorama/components/panorama_get_addresses.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
95
2018-01-11T16:23:39.000Z
2022-03-21T11:34:29.000Z
# -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use # (c) Copyright IBM Corp. 2010, 2020. All Rights Reserved. """Function implementation""" import logging from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError from resilient_lib imp...
38.892857
114
0.668044
import logging from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError from resilient_lib import ResultPayload from fn_pa_panorama.util.panorama_util import PanoramaClient log = logging.getLogger(__name__) class FunctionComponent(ResilientComponent): ...
true
true
f74f11896142749195cf7e8f56bba0f7e2208b7b
5,198
py
Python
speculator/utils/poloniex.py
NathanBMcNamara/Speculator
e74aff778d6657a8c4993c62f264008c9be99e78
[ "MIT" ]
106
2017-11-09T13:58:45.000Z
2021-12-20T03:11:19.000Z
speculator/utils/poloniex.py
NathanBMcNamara/Speculator
e74aff778d6657a8c4993c62f264008c9be99e78
[ "MIT" ]
6
2017-10-30T13:29:49.000Z
2021-09-13T12:06:59.000Z
speculator/utils/poloniex.py
NathanBMcNamara/Speculator
e74aff778d6657a8c4993c62f264008c9be99e78
[ "MIT" ]
39
2017-10-30T16:35:01.000Z
2021-10-31T10:32:48.000Z
import logging import requests from speculator.utils import date logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def json_to_url(json, symbol): """ Converts a JSON to a URL by the Poloniex API Args: json: JSON data as a list of dict dates, where the keys are ...
34.423841
79
0.62524
import logging import requests from speculator.utils import date logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def json_to_url(json, symbol): start = json[0]['date'] end = json[-1]['date'] diff = end - start periods = [300, 900, 1800, 7200, 14400, 86400] ...
true
true
f74f11e5617b93084ff99dd1a3fb01ee0fa7c500
132
py
Python
calculation/gmhazard_calc/gmhazard_calc/gm_data/__init__.py
ucgmsim/gmhazard
d3d90b4c94b3d9605597a3efeccc8523a1e50c0e
[ "MIT" ]
null
null
null
calculation/gmhazard_calc/gmhazard_calc/gm_data/__init__.py
ucgmsim/gmhazard
d3d90b4c94b3d9605597a3efeccc8523a1e50c0e
[ "MIT" ]
8
2021-10-13T02:33:23.000Z
2022-03-29T21:01:08.000Z
calculation/gmhazard_calc/gmhazard_calc/gm_data/__init__.py
ucgmsim/gmhazard
d3d90b4c94b3d9605597a3efeccc8523a1e50c0e
[ "MIT" ]
null
null
null
from .Ensemble import Ensemble, ensemble_dict from .IMEnsemble import IMEnsemble from .Branch import Branch from .Leaf import Leaf
22
45
0.825758
from .Ensemble import Ensemble, ensemble_dict from .IMEnsemble import IMEnsemble from .Branch import Branch from .Leaf import Leaf
true
true
f74f123dfe31805fead08479533d42110176b361
1,818
py
Python
sphecius/alphabets/base.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
1
2019-09-26T01:08:20.000Z
2019-09-26T01:08:20.000Z
sphecius/alphabets/base.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
null
null
null
sphecius/alphabets/base.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
1
2019-09-26T01:08:19.000Z
2019-09-26T01:08:19.000Z
# -*- coding: utf-8 -*- """ base.py Base Alphabet class @author: Douglas Daly @date: 1/11/2017 """ # # Imports # from abc import ABCMeta, abstractmethod # # Class # class Alphabet(object, metaclass=ABCMeta): """ Base Alphabet Class """ @abstractmethod def __init__(self): """ Ab...
20.659091
92
0.570407
from abc import ABCMeta, abstractmethod class Alphabet(object, metaclass=ABCMeta): @abstractmethod def __init__(self): pass @property def alphabet(self): return self._alphabet def get_alphabet_list(self): return list(self._alphabet) def __getitem__(self, ite...
true
true
f74f127df27a736a758c2f4e3e35729ef9654edc
896
py
Python
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
BarCrawlrServerTest/model/planTest.py
Kaybass/BarCrawlrServer
d196000d5807324a745fc9498f6f70cd3253ec22
[ "MIT" ]
null
null
null
import unittest from BarCrawlrServer.model.plan import plan import json myPlan = "{" +\ "\"name\":\"Alex's Plan\"," +\ "\"places\":[" +\ "{" +\ "\"name\":\"Joe's Bar\"," +\ "\"address\":\"10 King's Street, Burlington, 05401 VT\"," +\ ...
24.216216
76
0.38058
import unittest from BarCrawlrServer.model.plan import plan import json myPlan = "{" +\ "\"name\":\"Alex's Plan\"," +\ "\"places\":[" +\ "{" +\ "\"name\":\"Joe's Bar\"," +\ "\"address\":\"10 King's Street, Burlington, 05401 VT\"," +\ ...
true
true
f74f13662e6a3ecdc68dc0c9820a5db87dc34c21
148
py
Python
app/api/copytter/apps.py
T-8723/copytter
bf27545a010d5fd1e17a38b10adddd22858cbcea
[ "MIT" ]
null
null
null
app/api/copytter/apps.py
T-8723/copytter
bf27545a010d5fd1e17a38b10adddd22858cbcea
[ "MIT" ]
null
null
null
app/api/copytter/apps.py
T-8723/copytter
bf27545a010d5fd1e17a38b10adddd22858cbcea
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CopytterConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'copytter'
21.142857
56
0.763514
from django.apps import AppConfig class CopytterConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'copytter'
true
true
f74f15600d99c88b4a9544a76ef7ce10764b7261
1,353
py
Python
bindings/python/cntk/__init__.py
chunxiaosz/CNTK
a7453ed0791ae797bcf9e8d8fbc287332a430db4
[ "MIT" ]
null
null
null
bindings/python/cntk/__init__.py
chunxiaosz/CNTK
a7453ed0791ae797bcf9e8d8fbc287332a430db4
[ "MIT" ]
null
null
null
bindings/python/cntk/__init__.py
chunxiaosz/CNTK
a7453ed0791ae797bcf9e8d8fbc287332a430db4
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import os os.environ["PATH"] += os.pathsep + os.path.join(os.path.dirname(__file__),...
27.06
128
0.730968
import os os.environ["PATH"] += os.pathsep + os.path.join(os.path.dirname(__file__), 'libs') version_file = open(os.path.join(os.path.dirname(__file__), 'VERSION'), 'r') __version__ = version_file.read() version_file.close() del version_file import numpy as np from . import cntk_py from .core import * from...
true
true
f74f15c6fe8f24829e392277697cfe034ee43058
649
py
Python
task_2_2.py
OllyWonka/2074_GB_Python
6aa8d728a16d10ba493c9b3a63b6212129f3237b
[ "MIT" ]
null
null
null
task_2_2.py
OllyWonka/2074_GB_Python
6aa8d728a16d10ba493c9b3a63b6212129f3237b
[ "MIT" ]
null
null
null
task_2_2.py
OllyWonka/2074_GB_Python
6aa8d728a16d10ba493c9b3a63b6212129f3237b
[ "MIT" ]
null
null
null
def convert_list_in_str(list_in: list) -> str: list_another = [] for i in list_in: if i.isdigit(): i = int(i) list_another.append(f'"{i:02d}"') elif i[0] == '+': i = int(i[1:]) list_another.append(f'"{i:02d}"') elif i[0] == '-': ...
28.217391
59
0.497689
def convert_list_in_str(list_in: list) -> str: list_another = [] for i in list_in: if i.isdigit(): i = int(i) list_another.append(f'"{i:02d}"') elif i[0] == '+': i = int(i[1:]) list_another.append(f'"{i:02d}"') elif i[0] == '-': ...
true
true
f74f15ddbbda566e7c67466c13fc9bd9331e01b3
1,501
py
Python
test/programytest/clients/polling/telegram/test_config.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
5
2018-08-21T00:13:45.000Z
2018-09-01T20:00:55.000Z
test/programytest/clients/polling/telegram/test_config.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
1
2018-09-12T18:30:17.000Z
2018-09-12T18:30:17.000Z
test/programytest/clients/polling/telegram/test_config.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
5
2018-08-21T00:08:36.000Z
2018-09-23T06:11:04.000Z
import unittest from programy.config.file.yaml_file import YamlConfigurationFile from programy.clients.polling.telegram.config import TelegramConfiguration from programy.clients.events.console.config import ConsoleConfiguration class TelegramClientConfigurationTests(unittest.TestCase): def test_init(self): ...
41.694444
113
0.720187
import unittest from programy.config.file.yaml_file import YamlConfigurationFile from programy.clients.polling.telegram.config import TelegramConfiguration from programy.clients.events.console.config import ConsoleConfiguration class TelegramClientConfigurationTests(unittest.TestCase): def test_init(self): ...
true
true
f74f16328cfc23487c2b6998f416ca0296e4ac17
523
py
Python
T509_Fib.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
T509_Fib.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
T509_Fib.py
zoubohao/LeetCodes
e1a96958de7a1a9d3b1d6e6674f15c4aa0b30f85
[ "MIT" ]
null
null
null
class Solution: def fib(self, n: int) -> int: memo = {} def inner(n: int) -> int: if n == 0: return 0 if n == 1: return 1 if n in memo: return memo[n] else: val = inner(n - 1) + inner(n - 2) ...
20.115385
50
0.426386
class Solution: def fib(self, n: int) -> int: memo = {} def inner(n: int) -> int: if n == 0: return 0 if n == 1: return 1 if n in memo: return memo[n] else: val = inner(n - 1) + inner(n - 2) ...
true
true
f74f165671336a818822ab3f019c7925df9b6f62
9,929
py
Python
cnn/settings.py
indexing-initiative/selective-indexing
e5cff7bf8914111a991a52aecd639e51b16d7a8d
[ "BSD-3-Clause" ]
null
null
null
cnn/settings.py
indexing-initiative/selective-indexing
e5cff7bf8914111a991a52aecd639e51b16d7a8d
[ "BSD-3-Clause" ]
null
null
null
cnn/settings.py
indexing-initiative/selective-indexing
e5cff7bf8914111a991a52aecd639e51b16d7a8d
[ "BSD-3-Clause" ]
null
null
null
import json from machine_settings import _MachineConfig import os.path as os_path ENCODING = 'utf8' def get_config(): config = Config() return config class _ConfigBase: def __init__(self, parent): self._parent = parent machine_config = _MachineConfig() self._initialize(machine_...
31.926045
160
0.657871
import json from machine_settings import _MachineConfig import os.path as os_path ENCODING = 'utf8' def get_config(): config = Config() return config class _ConfigBase: def __init__(self, parent): self._parent = parent machine_config = _MachineConfig() self._initialize(machine_...
true
true
f74f17530a7d472d90ab3f1f6e1b5adcec7d73c1
15,699
py
Python
ludwig/features/base_feature.py
JiByungKyu/ludwig
3e2f276459f976054b5c2ab8c55be994170345da
[ "Apache-2.0" ]
null
null
null
ludwig/features/base_feature.py
JiByungKyu/ludwig
3e2f276459f976054b5c2ab8c55be994170345da
[ "Apache-2.0" ]
null
null
null
ludwig/features/base_feature.py
JiByungKyu/ludwig
3e2f276459f976054b5c2ab8c55be994170345da
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
34.352298
91
0.581375
import logging from abc import ABC, abstractmethod from typing import Dict import tensorflow as tf from ludwig.constants import * from ludwig.modules.fully_connected_modules import FCStack from ludwig.modules.reduction_modules import SequenceReducer from ludwig.utils.misc_utils import merge_dict, get_f...
true
true
f74f17b1cd8e2279c5414ec03d52994e78e9f11a
7,521
py
Python
src/gcg/tf/tf_utils.py
gkahn13/GtS
8186177de430d4bfef253bb0ea584ee60dc58d3a
[ "MIT" ]
74
2019-02-12T04:52:01.000Z
2021-06-11T00:19:45.000Z
src/gcg/tf/tf_utils.py
gkahn13/GtS
8186177de430d4bfef253bb0ea584ee60dc58d3a
[ "MIT" ]
5
2019-02-27T13:38:56.000Z
2020-11-30T11:29:28.000Z
src/gcg/tf/tf_utils.py
gkahn13/GtS
8186177de430d4bfef253bb0ea584ee60dc58d3a
[ "MIT" ]
16
2019-02-20T12:09:25.000Z
2022-02-09T12:49:09.000Z
import os import tensorflow as tf ###################### ### Graph creation ### ###################### def create_session_and_graph(gpu_device=None, gpu_frac=None): if gpu_device is None: gpu_device = 0 if gpu_frac is None: gpu_frac = 0.95 os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_devi...
33.426667
97
0.622391
import os import tensorflow as tf ) else: config = tf.ConfigProto( device_count={'GPU': 0}, log_device_placement=False, allow_soft_placement=True, ) tf_sess = tf.Session(graph=tf_graph, config=config) return tf_sess, tf_graph f.transpose(tf.resha...
true
true
f74f17eb3abacf27b3e42cb49461d05402320471
2,966
py
Python
popbl_servicesapp/flask_app/payment/application/event_publisher.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
popbl_servicesapp/flask_app/payment/application/event_publisher.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
1
2021-06-02T00:57:11.000Z
2021-06-02T00:57:11.000Z
popbl_servicesapp/flask_app/payment/application/event_publisher.py
xetxezarreta/master-popbl1
253880b9ba358f63f666893cdbbffe7391fcd096
[ "MIT" ]
null
null
null
import json import pika import ssl import logging from os import environ from datetime import datetime from .config import Config logging.basicConfig() config = Config.get_instance() ssl.match_hostname = lambda cert, hostname: True PAYMENT_EXCHANGE = "payment_events" class Publisher(object): def __init__(self...
35.309524
106
0.647336
import json import pika import ssl import logging from os import environ from datetime import datetime from .config import Config logging.basicConfig() config = Config.get_instance() ssl.match_hostname = lambda cert, hostname: True PAYMENT_EXCHANGE = "payment_events" class Publisher(object): def __init__(self...
true
true
f74f187a5c6cdb17be1a0d9ea1c2cba702ea5fab
1,523
py
Python
functions/colors.py
broadinstitute/segmentation_experiments
396d5659c7c6cda9dc3d3caf3350710ff6210e2c
[ "MIT" ]
null
null
null
functions/colors.py
broadinstitute/segmentation_experiments
396d5659c7c6cda9dc3d3caf3350710ff6210e2c
[ "MIT" ]
23
2020-06-17T14:48:49.000Z
2020-12-29T18:40:48.000Z
functions/colors.py
broadinstitute/segmentation_experiments
396d5659c7c6cda9dc3d3caf3350710ff6210e2c
[ "MIT" ]
null
null
null
import numpy as np import skimage from skimage import io, transform, exposure, data, color from skimage.color import * import matplotlib.pyplot as plt from matplotlib.pyplot import imshow def unmix_purple_img(purp_img, loud=False): """ Accepts a purple image object as a parameter and returns the image wi...
31.081633
118
0.612607
import numpy as np import skimage from skimage import io, transform, exposure, data, color from skimage.color import * import matplotlib.pyplot as plt from matplotlib.pyplot import imshow def unmix_purple_img(purp_img, loud=False): hematoxylin_matrix = np.ones((3,3)) * (0.644, 0.717, 0.267) stain_...
true
true
f74f187ea610e002217e891d1f898936a4167c3e
6,252
py
Python
polyarchiv/_vendor/requests/api.py
d9pouces/PolyArchiv
36f4a61bf29337f3efea7abb098329b693122e78
[ "CECILL-B" ]
9
2016-05-15T07:46:10.000Z
2021-12-05T17:12:28.000Z
polyarchiv/_vendor/requests/api.py
d9pouces/PolyArchiv
36f4a61bf29337f3efea7abb098329b693122e78
[ "CECILL-B" ]
1
2016-05-23T17:21:46.000Z
2016-05-23T17:21:46.000Z
polyarchiv/_vendor/requests/api.py
d9pouces/PolyArchiv
36f4a61bf29337f3efea7abb098329b693122e78
[ "CECILL-B" ]
3
2016-06-25T06:45:36.000Z
2021-06-19T06:27:33.000Z
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :para...
39.320755
136
0.665067
from . import sessions def request(method, url, **kwargs): with sessions.Session() as session: return session.request(method=method, url=url, **kwargs) def get(url, params=None, **kwargs): kwargs.setdefault("allow_redirects", True) return request("get", url, params=params, **...
true
true
f74f187fdcc513e944604d713af44c40ac4e87f2
4,214
py
Python
garagepi/di/test.py
constructorfleet/GaragePi-Assistant
e648e853472adfb3e0a97d8ffbcdf9453f666d6a
[ "MIT" ]
null
null
null
garagepi/di/test.py
constructorfleet/GaragePi-Assistant
e648e853472adfb3e0a97d8ffbcdf9453f666d6a
[ "MIT" ]
null
null
null
garagepi/di/test.py
constructorfleet/GaragePi-Assistant
e648e853472adfb3e0a97d8ffbcdf9453f666d6a
[ "MIT" ]
null
null
null
from garagepi.common.configuration import validate_configuration from garagepi.common.const import * from garagepi.data.rpi import gpio from garagepi.domain import App from garagepi.domain.usecase.api import BuildApiUseCase, NotifyStateUseCase from garagepi.domain.usecase.commands import ( CommandCloseUseCase, ...
31.924242
83
0.719269
from garagepi.common.configuration import validate_configuration from garagepi.common.const import * from garagepi.data.rpi import gpio from garagepi.domain import App from garagepi.domain.usecase.api import BuildApiUseCase, NotifyStateUseCase from garagepi.domain.usecase.commands import ( CommandCloseUseCase, ...
true
true
f74f18e7b98f8156a33fe7b1034da033c4f7584c
4,185
py
Python
permission_sdk/model/resource_manage/filter_condition_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
permission_sdk/model/resource_manage/filter_condition_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
permission_sdk/model/resource_manage/filter_condition_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: filter_condition.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pro...
43.14433
484
0.784946
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f74f1a53b605ba5c8f5faffe9da336d8b009d803
2,920
py
Python
tests/unit/utils/Dict.py
adnrs96/runtime
e824224317e6aa108cf06968474fc44fa33488d6
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/Dict.py
adnrs96/runtime
e824224317e6aa108cf06968474fc44fa33488d6
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/Dict.py
adnrs96/runtime
e824224317e6aa108cf06968474fc44fa33488d6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from storyruntime.utils import Dict def test_dict_set_single(): a = {} Dict.set(a, ['foobar'], 'string') assert a == {'foobar': 'string'} def test_dict_set_many_new(): a = {} Dict.set(a, ['foo', 'bar'], 'string') assert a == {'foo': {'bar': 'string'}} ...
20.277778
56
0.444863
import pytest from storyruntime.utils import Dict def test_dict_set_single(): a = {} Dict.set(a, ['foobar'], 'string') assert a == {'foobar': 'string'} def test_dict_set_many_new(): a = {} Dict.set(a, ['foo', 'bar'], 'string') assert a == {'foo': {'bar': 'string'}} def test_dict_set_many...
true
true
f74f1ab25ed3a849c674319380ffb0e791c3173e
210
py
Python
struct_product/currency.py
DDnim/camelq
0fb89cf5e3dd55329350e57fcf73ad1a6743e054
[ "MIT" ]
null
null
null
struct_product/currency.py
DDnim/camelq
0fb89cf5e3dd55329350e57fcf73ad1a6743e054
[ "MIT" ]
null
null
null
struct_product/currency.py
DDnim/camelq
0fb89cf5e3dd55329350e57fcf73ad1a6743e054
[ "MIT" ]
null
null
null
from camelq.struct_product import product class currency(product.product): def __init__(self, code = '', size = 0, price = 1): self.code = code self.size = size self.price = price
23.333333
55
0.628571
from camelq.struct_product import product class currency(product.product): def __init__(self, code = '', size = 0, price = 1): self.code = code self.size = size self.price = price
true
true
f74f1d8b8434bcefe4d8e02705d1d8ab5b91bf5e
2,222
py
Python
utils3/hosts_set.py
autodrive/utils3
1c0fa6ac7f51b8fac1f8ebd21aec5549815f7dcb
[ "Apache-2.0" ]
1
2017-05-01T20:26:02.000Z
2017-05-01T20:26:02.000Z
utils3/hosts_set.py
autodrive/utils3
1c0fa6ac7f51b8fac1f8ebd21aec5549815f7dcb
[ "Apache-2.0" ]
25
2017-04-14T14:47:50.000Z
2018-10-17T16:04:48.000Z
utils3/hosts_set.py
autodrive/utils3
1c0fa6ac7f51b8fac1f8ebd21aec5549815f7dcb
[ "Apache-2.0" ]
null
null
null
import sys import file_util def main(filename, output_filename): host_info_dict = read_host_info(filename) write_host_info(host_info_dict, output_filename) def write_host_info(host_info_dict, output_filename): """ dictonary -> host info :param host_info_dict: dict :param output_filename: s...
30.027027
119
0.577408
import sys import file_util def main(filename, output_filename): host_info_dict = read_host_info(filename) write_host_info(host_info_dict, output_filename) def write_host_info(host_info_dict, output_filename): with open(output_filename, 'wt') as f: for host_info_key, address in host_i...
true
true
f74f1e096fd8615434e3b166e42e3eb620c96a57
1,754
py
Python
setup.py
gamazeps/wot
623bcdc78ad1fab43b3e05b467f961648741a7a0
[ "BSD-3-Clause" ]
null
null
null
setup.py
gamazeps/wot
623bcdc78ad1fab43b3e05b467f961648741a7a0
[ "BSD-3-Clause" ]
null
null
null
setup.py
gamazeps/wot
623bcdc78ad1fab43b3e05b467f961648741a7a0
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" import setuptools with open("README.md", "r") as fh: long_description = fh.read() requirements = [ 'numpy', 'pandas', 'joblib', 'h5py', 'Cython', 'anndata', 'scanpy', 'scikit-learn', 'scipy', 'matplotlib', 'POT' ] extras_require = { } s...
27.40625
116
0.629989
import setuptools with open("README.md", "r") as fh: long_description = fh.read() requirements = [ 'numpy', 'pandas', 'joblib', 'h5py', 'Cython', 'anndata', 'scanpy', 'scikit-learn', 'scipy', 'matplotlib', 'POT' ] extras_require = { } setup_requirements = [ ] test_requirements = [ 'unittest' ] set...
true
true
f74f1ec2679deee36981970b59094e2f701372d0
905
py
Python
mayan/apps/ocr/permissions.py
Dave360-crypto/mayan-edms
9cd37537461347f79ff0429e4b8b16fd2446798d
[ "Apache-2.0" ]
3
2020-02-03T11:58:51.000Z
2020-10-20T03:52:21.000Z
mayan/apps/ocr/permissions.py
Dave360-crypto/mayan-edms
9cd37537461347f79ff0429e4b8b16fd2446798d
[ "Apache-2.0" ]
null
null
null
mayan/apps/ocr/permissions.py
Dave360-crypto/mayan-edms
9cd37537461347f79ff0429e4b8b16fd2446798d
[ "Apache-2.0" ]
2
2020-10-24T11:10:06.000Z
2021-03-03T20:05:38.000Z
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from permissions.models import Permission, PermissionNamespace ocr_namespace = PermissionNamespace('ocr', _(u'OCR')) PERMISSION_OCR_DOCUMENT = Permission.objects.register(ocr_namespace, 'ocr_document', _(u'Submit documents...
69.615385
156
0.832044
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from permissions.models import Permission, PermissionNamespace ocr_namespace = PermissionNamespace('ocr', _(u'OCR')) PERMISSION_OCR_DOCUMENT = Permission.objects.register(ocr_namespace, 'ocr_document', _(u'Submit documents...
true
true
f74f1f4755a3ff8ad1cfe1889e329c0c3e5c5f51
99
py
Python
pypy/interpreter/pyparser/test/samples/snippet_listlinenos.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/interpreter/pyparser/test/samples/snippet_listlinenos.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
pypy/interpreter/pyparser/test/samples/snippet_listlinenos.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
l = [ "foo", "bar", "baz"] l = [ "foo", "bar", "baz", ] l = [] l = [ ]
7.615385
19
0.222222
l = [ "foo", "bar", "baz"] l = [ "foo", "bar", "baz", ] l = [] l = [ ]
true
true
f74f1f6ec7d85414d87a942797be16b55ef13083
233
py
Python
Python/Decompress Run-Length Encoded List.py
adeeb001/LeetCode-Solutions
eb12c02379b9b1ae7185a2f5811e17f44867e45a
[ "MIT" ]
null
null
null
Python/Decompress Run-Length Encoded List.py
adeeb001/LeetCode-Solutions
eb12c02379b9b1ae7185a2f5811e17f44867e45a
[ "MIT" ]
null
null
null
Python/Decompress Run-Length Encoded List.py
adeeb001/LeetCode-Solutions
eb12c02379b9b1ae7185a2f5811e17f44867e45a
[ "MIT" ]
null
null
null
class Solution: def decompressRLElist(self, nums: List[int]) -> List[int]: ans = [] for i in range(0, len(nums), 2): for n in [nums[i + 1]] * nums[i]: ans.append(n) return ans
33.285714
62
0.48927
class Solution: def decompressRLElist(self, nums: List[int]) -> List[int]: ans = [] for i in range(0, len(nums), 2): for n in [nums[i + 1]] * nums[i]: ans.append(n) return ans
true
true
f74f1fd68ec570dd571a3a7dae9de5254de8fddb
499
py
Python
dcbr-api/api/migrations/0014_auto_20190625_1202.py
WadeBarnes/agri-dcbr
92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9
[ "Apache-2.0" ]
1
2020-07-11T23:20:16.000Z
2020-07-11T23:20:16.000Z
dcbr-api/api/migrations/0014_auto_20190625_1202.py
WadeBarnes/agri-dcbr
92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9
[ "Apache-2.0" ]
19
2019-07-26T22:47:49.000Z
2020-12-15T22:06:25.000Z
dcbr-api/api/migrations/0014_auto_20190625_1202.py
WadeBarnes/agri-dcbr
92a62ec8c22a3b7b6dd1978eaa7320494a9ca9d9
[ "Apache-2.0" ]
7
2019-04-15T17:13:09.000Z
2019-12-09T23:52:53.000Z
# Generated by Django 2.2 on 2019-06-25 19:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0013_auto_20190624_1403'), ] operations = [ migrations.AlterField( model_name='risk_factor_operation', name='pe...
26.263158
148
0.61523
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0013_auto_20190624_1403'), ] operations = [ migrations.AlterField( model_name='risk_factor_operation', name='perm_id_type', field=models.CharFie...
true
true
f74f1fdd4b6cf2b3a1c7d3a183b4734d77af71da
1,830
py
Python
arknights_mower/solvers/mail.py
yuanyan3060/arknights-mower
599b96e02590a435dc50bdef450b45c851654c4f
[ "MIT" ]
1
2021-09-11T04:11:15.000Z
2021-09-11T04:11:15.000Z
arknights_mower/solvers/mail.py
yuanyan3060/arknights-mower
599b96e02590a435dc50bdef450b45c851654c4f
[ "MIT" ]
null
null
null
arknights_mower/solvers/mail.py
yuanyan3060/arknights-mower
599b96e02590a435dc50bdef450b45c851654c4f
[ "MIT" ]
null
null
null
import traceback from ..utils import config from ..utils.log import logger from ..utils.recognize import Scene, RecognizeError from ..utils.solver import BaseSolver, StrategyError class MailSolver(BaseSolver): """ 收取邮件 """ def __init__(self, adb=None, recog=None): super(MailSolver, self).__i...
33.272727
98
0.492896
import traceback from ..utils import config from ..utils.log import logger from ..utils.recognize import Scene, RecognizeError from ..utils.solver import BaseSolver, StrategyError class MailSolver(BaseSolver): def __init__(self, adb=None, recog=None): super(MailSolver, self).__init__(adb, recog) de...
true
true
f74f206958181c1d3262583f50208e9d47d8b732
543
py
Python
metadata-ingestion/tests/conftest.py
chinmay-bhat/datahub
ab270a98ee541b993413a0ad68fd2c6ca14441eb
[ "Apache-2.0" ]
3,586
2020-01-27T11:09:57.000Z
2022-03-15T16:13:30.000Z
metadata-ingestion/tests/conftest.py
zhangheng08/datahub
9b81fa428cfa10260b047c6656180f1d90a33978
[ "Apache-2.0" ]
1,678
2020-01-27T20:51:01.000Z
2022-03-15T15:22:02.000Z
metadata-ingestion/tests/conftest.py
zhangheng08/datahub
9b81fa428cfa10260b047c6656180f1d90a33978
[ "Apache-2.0" ]
924
2020-01-28T20:10:50.000Z
2022-03-15T10:01:23.000Z
import logging import os import time import pytest from tests.test_helpers.docker_helpers import docker_compose_runner # noqa: F401 # Enable debug logging. logging.getLogger().setLevel(logging.DEBUG) os.putenv("DATAHUB_DEBUG", "1") @pytest.fixture def mock_time(monkeypatch): def fake_time(): return 16...
18.1
81
0.709024
import logging import os import time import pytest from tests.test_helpers.docker_helpers import docker_compose_runner logging.getLogger().setLevel(logging.DEBUG) os.putenv("DATAHUB_DEBUG", "1") @pytest.fixture def mock_time(monkeypatch): def fake_time(): return 1615443388.0975091 monkeypatch.s...
true
true
f74f20db93eea5d099744208a03d1da956261f6b
2,792
py
Python
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveBatchTaskForCreatingOrderRenewRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveBatchTaskForCreatingOrderRenewRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/SaveBatchTaskForCreatingOrderRenewRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.226667
136
0.756447
from aliyunsdkcore.request import RpcRequest class SaveBatchTaskForCreatingOrderRenewRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Domain', '2018-01-29', 'SaveBatchTaskForCreatingOrderRenew') def get_PromotionNo(self): return self.get_query_params().get('PromotionNo...
true
true
f74f2140b29b5a47629f83176527f591ec6848b0
2,490
py
Python
userbot/plugins/sql_helper/antiflood_sql.py
pondhanush764/TamilUserBot-1
10d20c7be8817e552a873e07683e06d313bed642
[ "MIT" ]
44
2021-01-11T13:33:48.000Z
2022-02-05T17:53:33.000Z
userbot/plugins/sql_helper/antiflood_sql.py
pondhanush764/TamilUserBot-1
10d20c7be8817e552a873e07683e06d313bed642
[ "MIT" ]
5
2020-08-25T15:58:13.000Z
2021-02-09T09:57:57.000Z
userbot/modules/sql_helper/antiflood_sql.py
Fernando2807/PersonalBot
e1b18b6c46dbf2e0ebb1acf2248485591189256e
[ "Naumen", "Condor-1.1", "MS-PL" ]
226
2020-02-25T05:58:57.000Z
2022-03-12T04:12:33.000Z
try: from userbot.modules.sql_helper import SESSION, BASE except ImportError: raise AttributeError import threading from sqlalchemy import Integer, Column, String, UnicodeText, func, distinct, Boolean DEF_COUNT = 0 DEF_LIMIT = 0 DEF_OBJ = (None, DEF_COUNT, DEF_LIMIT) class FloodControl(BASE): __tablename...
26.774194
88
0.651807
try: from userbot.modules.sql_helper import SESSION, BASE except ImportError: raise AttributeError import threading from sqlalchemy import Integer, Column, String, UnicodeText, func, distinct, Boolean DEF_COUNT = 0 DEF_LIMIT = 0 DEF_OBJ = (None, DEF_COUNT, DEF_LIMIT) class FloodControl(BASE): __tablename...
true
true
f74f21d7037c8cbd0803721e82060f6032453fe8
1,313
py
Python
src/statue/cli/config/config_general.py
EddLabs/eddington-static
cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5
[ "Apache-2.0" ]
null
null
null
src/statue/cli/config/config_general.py
EddLabs/eddington-static
cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5
[ "Apache-2.0" ]
null
null
null
src/statue/cli/config/config_general.py
EddLabs/eddington-static
cdd1d9514c4eea1bd06c24894b3922e6cc3fb1f5
[ "Apache-2.0" ]
null
null
null
"""General configuration CLI.""" import click from statue.cli.common_flags import config_path_option from statue.cli.config.config_cli import config_cli from statue.config.configuration import Configuration from statue.runner import RunnerMode @config_cli.command("set-mode") @click.argument( "mode", type=cli...
34.552632
88
0.750952
import click from statue.cli.common_flags import config_path_option from statue.cli.config.config_cli import config_cli from statue.config.configuration import Configuration from statue.runner import RunnerMode @config_cli.command("set-mode") @click.argument( "mode", type=click.Choice([mode.name.lower() for ...
true
true
f74f237ce68dfdcf517c24aadb8b56b346d2a1e4
2,533
py
Python
setup.py
96RadhikaJadhav/empress
c167ff686050598f510606ee280ff3df01c67d01
[ "Apache-2.0", "CC0-1.0", "BSD-3-Clause" ]
null
null
null
setup.py
96RadhikaJadhav/empress
c167ff686050598f510606ee280ff3df01c67d01
[ "Apache-2.0", "CC0-1.0", "BSD-3-Clause" ]
null
null
null
setup.py
96RadhikaJadhav/empress
c167ff686050598f510606ee280ff3df01c67d01
[ "Apache-2.0", "CC0-1.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, empress development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE.md, distributed with this software. # -----------------------...
34.22973
78
0.611923
from setuptools import setup, find_packages __version__ = "1.1.0-dev" __maintainer__ = "Empress development team" __email__ = "kcantrel@ucsd.edu" classes = """ Development Status :: 5 - Production/Stable License :: OSI Approved :: BSD License Topic :: Software Development :: Libraries :: Applica...
true
true
f74f237d5f94efb188eec4f671b86640e948bf7b
3,776
py
Python
server/src/docimport.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
17
2017-09-14T07:21:37.000Z
2021-12-07T03:17:05.000Z
server/src/docimport.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
7
2015-04-11T12:57:42.000Z
2016-04-08T13:43:44.000Z
server/src/docimport.py
bepnye/brat
28acfb2d3cce20bd4d4ff1a67690e271675841f2
[ "CC-BY-3.0" ]
5
2017-09-14T07:21:55.000Z
2021-01-27T01:50:19.000Z
#!/usr/bin/env python from __future__ import with_statement ''' Simple interface to for importing files into the data directory. Author: Pontus Stenetorp <pontus is s u-tokyo ac jp> Version: 2011-02-21 ''' from annotation import open_textfile from common import ProtocolError from config import DATA_DIR fr...
26.405594
79
0.649894
from __future__ import with_statement from annotation import open_textfile from common import ProtocolError from config import DATA_DIR from document import real_directory from annotation import JOINED_ANN_FILE_SUFF, TEXT_FILE_SUFFIX from os.path import join as join_path from os.path import isdir, isfile from os im...
true
true
f74f23d24403520412565eb855417aa8b050e109
18,342
py
Python
sem_tasks/ants.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
sem_tasks/ants.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
sem_tasks/ants.py
chasejohnson3/BRAINSPydra
8d3984f78c807283d182b624ed671b11d38bf82b
[ "Apache-2.0" ]
null
null
null
""" Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator. """ import attr from nipype.interfaces.base import ( Directory, File, InputMultiPath, OutputMultiPath, traits, ) from pydra import ShellCommandTask from pydra.engi...
33.966667
414
0.372042
import attr from nipype.interfaces.base import ( Directory, File, InputMultiPath, OutputMultiPath, traits, ) from pydra import ShellCommandTask from pydra.engine.specs import ( SpecInfo, ShellSpec, MultiInputFile, MultiOutputFile, MultiInputObj, ) import pydra ...
true
true
f74f2407b314dbb7bc7f7225fd5b2fe700b03643
50
py
Python
python/perspective/perspective/core/_version.py
patricio-mancini/perspective
4d75f30dba07a459ad31fc2ffc08c5a8624ebda9
[ "Apache-2.0" ]
null
null
null
python/perspective/perspective/core/_version.py
patricio-mancini/perspective
4d75f30dba07a459ad31fc2ffc08c5a8624ebda9
[ "Apache-2.0" ]
null
null
null
python/perspective/perspective/core/_version.py
patricio-mancini/perspective
4d75f30dba07a459ad31fc2ffc08c5a8624ebda9
[ "Apache-2.0" ]
null
null
null
__version__ = "0.6.0" major_minor_version = "0.6"
16.666667
27
0.7
__version__ = "0.6.0" major_minor_version = "0.6"
true
true
f74f25b7282a6da982b18344821d1d552f1c0553
1,584
py
Python
ros2topic/ros2topic/verb/type.py
sunbo57123/ros2cli_common_extension
75d07113c1c029848aab70f3fcdd2ae23b0a99e1
[ "Apache-2.0" ]
null
null
null
ros2topic/ros2topic/verb/type.py
sunbo57123/ros2cli_common_extension
75d07113c1c029848aab70f3fcdd2ae23b0a99e1
[ "Apache-2.0" ]
1
2020-06-28T10:44:34.000Z
2020-06-28T10:44:34.000Z
ros2topic/ros2topic/verb/type.py
sunbo57123/ros2cli_common_extension
75d07113c1c029848aab70f3fcdd2ae23b0a99e1
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
35.2
74
0.691919
from ros2cli.node.strategy import NodeStrategy from ros2topic.api import get_topic_names_and_types from ros2topic.api import TopicNameCompleter from ros2topic.verb import VerbExtension class TypeVerb(VerbExtension): def add_arguments(self, parser, cli_name): arg = parser.add_argument( ...
true
true
f74f264788210c0ba8ac47f75848e2aa7f0b8a92
5,768
py
Python
invenio_records_resources/resources/errors.py
inveniosoftware/invenio-resources
f1fb9a849d03af1d6ec4cddfc4e140a06788783b
[ "MIT" ]
null
null
null
invenio_records_resources/resources/errors.py
inveniosoftware/invenio-resources
f1fb9a849d03af1d6ec4cddfc4e140a06788783b
[ "MIT" ]
19
2020-05-18T12:04:54.000Z
2020-07-13T06:19:27.000Z
invenio_records_resources/resources/errors.py
inveniosoftware/invenio-resources
f1fb9a849d03af1d6ec4cddfc4e140a06788783b
[ "MIT" ]
5
2020-04-28T09:07:43.000Z
2020-07-01T14:43:01.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # Copyright (C) 2020 Northwestern University # # Invenio-Records-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Common Errors handling for Resources.""" from json imp...
32.96
85
0.618239
from json import JSONDecodeError import marshmallow as ma from elasticsearch.exceptions import RequestError from flask import jsonify, make_response, request, url_for from flask_babelex import lazy_gettext as _ from flask_resources import HTTPJSONException, create_error_handler from invenio_pidstore.errors im...
true
true
f74f2735c6a8fb59abf9f4602d0fda5200a48dfc
1,723
py
Python
tests/unit/test_communication.py
team-204/uas-control
0820c95fe22af0507df398c71e61a6ca49a5a490
[ "MIT" ]
1
2019-03-17T12:33:21.000Z
2019-03-17T12:33:21.000Z
tests/unit/test_communication.py
team-204/uas-control
0820c95fe22af0507df398c71e61a6ca49a5a490
[ "MIT" ]
4
2018-03-12T03:39:37.000Z
2018-03-27T22:08:13.000Z
tests/unit/test_communication.py
team-204/uas-control
0820c95fe22af0507df398c71e61a6ca49a5a490
[ "MIT" ]
5
2018-02-27T17:55:20.000Z
2019-03-09T15:36:07.000Z
"""Tests the communication module.""" import json from mock import patch, call import control.communication @patch('serial.Serial') def test_receiving_valid_data(mock_serial_class): """Confirm the json data is returned as actual data.""" expected = {'test': 5} # Random data serial_mock = mock_serial_clas...
34.46
68
0.7278
import json from mock import patch, call import control.communication @patch('serial.Serial') def test_receiving_valid_data(mock_serial_class): expected = {'test': 5} serial_mock = mock_serial_class.return_value serial_mock.readline.return_value = json.dumps(expected) comm = control.communication.Co...
true
true
f74f274a0489beed2d8d95e31366e1c3d2c039d8
10,677
py
Python
forge_sdk/did/abt_did.py
ArcBlock/forge-python-sdk
4e72d75d3c06b16554d660860708732c83b5f8b2
[ "Apache-2.0" ]
9
2019-05-08T01:30:22.000Z
2020-05-08T22:11:40.000Z
forge_sdk/did/abt_did.py
ArcBlock/forge-python-sdk
4e72d75d3c06b16554d660860708732c83b5f8b2
[ "Apache-2.0" ]
22
2019-05-14T18:36:17.000Z
2019-12-24T10:09:42.000Z
forge_sdk/did/abt_did.py
ArcBlock/forge-python-sdk
4e72d75d3c06b16554d660860708732c83b5f8b2
[ "Apache-2.0" ]
null
null
null
import base64 import json import logging from datetime import datetime from datetime import timezone from forge_sdk import utils from forge_sdk.did import lib from forge_sdk.did.lib import HASH_MAP from forge_sdk.did.lib import KEY_MAP from forge_sdk.did.lib import ROLE_MAP from forge_sdk.mcrypto.hasher import Hasher ...
32.751534
333
0.573663
import base64 import json import logging from datetime import datetime from datetime import timezone from forge_sdk import utils from forge_sdk.did import lib from forge_sdk.did.lib import HASH_MAP from forge_sdk.did.lib import KEY_MAP from forge_sdk.did.lib import ROLE_MAP from forge_sdk.mcrypto.hasher import Hasher ...
true
true
f74f278278d0e24d6b82cee1e22ffe3f92954a8e
2,047
py
Python
get_images_set.py
GioPais/faster-rcnn.pytorch
1f412ab90e44489169e9c94152ecf21a4d84021e
[ "MIT" ]
null
null
null
get_images_set.py
GioPais/faster-rcnn.pytorch
1f412ab90e44489169e9c94152ecf21a4d84021e
[ "MIT" ]
null
null
null
get_images_set.py
GioPais/faster-rcnn.pytorch
1f412ab90e44489169e9c94152ecf21a4d84021e
[ "MIT" ]
null
null
null
from os import listdir, makedirs import os import glob, shutil from random import shuffle, random if __name__ == "__main__": PATH=os.getcwd() annots_path="./Annotations_classes" images_path="./JPEGImages_classes" annots_dest="./Annotations" images_dest="./JPEGImages" sets_path="Image...
30.552239
95
0.55105
from os import listdir, makedirs import os import glob, shutil from random import shuffle, random if __name__ == "__main__": PATH=os.getcwd() annots_path="./Annotations_classes" images_path="./JPEGImages_classes" annots_dest="./Annotations" images_dest="./JPEGImages" sets_path="Image...
true
true
f74f2839196bae69c75b8df74363d6d3690e7752
2,404
py
Python
models/image_recognition/tensorflow/inception_resnet_v2/dataset_factory.py
gyshi/intel-models
4ead44aa254a84109ac8019f5d386e3adb75ac26
[ "Apache-2.0" ]
1
2019-09-11T21:41:36.000Z
2019-09-11T21:41:36.000Z
models/image_recognition/tensorflow/inception_resnet_v2/dataset_factory.py
gyshi/intel-models
4ead44aa254a84109ac8019f5d386e3adb75ac26
[ "Apache-2.0" ]
null
null
null
models/image_recognition/tensorflow/inception_resnet_v2/dataset_factory.py
gyshi/intel-models
4ead44aa254a84109ac8019f5d386e3adb75ac26
[ "Apache-2.0" ]
1
2019-09-11T21:41:51.000Z
2019-09-11T21:41:51.000Z
# # -*- coding: utf-8 -*- # # Copyright (c) 2019 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 app...
32.931507
80
0.715058
from __future__ import absolute_import from __future__ import division from __future__ import print_function import imagenet datasets_map = { 'imagenet': imagenet, } def get_dataset(name, split_name, dataset_dir, file_pattern=None, reader=None): if name not in datasets_map:...
true
true
f74f287fe983664596a19d97694a255cc9ca6d5d
2,695
py
Python
jacket/compute/console/rpcapi.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/console/rpcapi.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/console/rpcapi.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
32.46988
79
0.655659
from oslo_config import cfg import oslo_messaging as messaging from jacket import rpc rpcapi_opts = [ cfg.StrOpt('console_topic', default='console', help='The topic console proxy nodes listen on'), ] CONF = cfg.CONF CONF.register_opts(rpcapi_opts) rpcapi_cap_opt = cf...
true
true
f74f2aee60d2f08c6683162abd5a5537478e6cd7
964
py
Python
jorldy/config/double/atari.py
zenoengine/JORLDY
1eb867e52a03e0282a55fa612cbc5b5de701ffe7
[ "Apache-2.0" ]
null
null
null
jorldy/config/double/atari.py
zenoengine/JORLDY
1eb867e52a03e0282a55fa612cbc5b5de701ffe7
[ "Apache-2.0" ]
null
null
null
jorldy/config/double/atari.py
zenoengine/JORLDY
1eb867e52a03e0282a55fa612cbc5b5de701ffe7
[ "Apache-2.0" ]
null
null
null
### Double DQN Atari Config ### env = { # "name": it should be defined in the command. ex) python main.py --config config.AGENT.atari --env.name breakout "render": False, "gray_img": True, "img_width": 84, "img_height": 84, "stack_frame": 4, "no_op": False, "reward_clip": True, "dea...
20.510638
117
0.574689
g_width": 84, "img_height": 84, "stack_frame": 4, "no_op": False, "reward_clip": True, "dead_penalty": True, } agent = { "name": "double", "network": "dqn", "head": "cnn", "gamma": 0.99, "epsilon_init": 1.0, "epsilon_min": 0.1, "explore_ratio": 0.1, "buffer_size": 10...
true
true
f74f2b3710234f11416607a4a7a657464a771965
7,719
py
Python
bootleg_data_prep/merge_shuff_split.py
lorr1/bootleg_data_prep
79866f0879bd80b7a7f559ba5101b4bd408cf16b
[ "Apache-2.0" ]
1
2021-12-21T02:55:14.000Z
2021-12-21T02:55:14.000Z
bootleg_data_prep/merge_shuff_split.py
lorr1/bootleg_data_prep
79866f0879bd80b7a7f559ba5101b4bd408cf16b
[ "Apache-2.0" ]
null
null
null
bootleg_data_prep/merge_shuff_split.py
lorr1/bootleg_data_prep
79866f0879bd80b7a7f559ba5101b4bd408cf16b
[ "Apache-2.0" ]
null
null
null
''' This file 1. Reads in data from <data_dir>/<subfolder_name> 2. Merges ALL data together, shuffles the lines, and outputs the data into small chuns into <data_dir>/<subfolder_name>/<train/dev/test> After this, run generate_slices.py Example run command: ''' import argparse import collections import copy import ha...
41.058511
159
0.623138
import argparse import collections import copy import hashlib import os import random import shutil import time import ujson as json from tqdm import tqdm import bootleg_data_prep.utils.utils as utils import bootleg_data_prep.utils.data_prep_utils as prep_utils from bootleg_data_prep.language import ENSURE_ASCII de...
true
true
f74f2b5a6146af356f2802fcc5bc547f2a1b74eb
28
py
Python
demos/python/nested_scripts/bar/nested_bar.py
fannymagnet/cwaf
60510f3596f1ee859ea73a50ee56dd636cde14b4
[ "Apache-2.0" ]
null
null
null
demos/python/nested_scripts/bar/nested_bar.py
fannymagnet/cwaf
60510f3596f1ee859ea73a50ee56dd636cde14b4
[ "Apache-2.0" ]
null
null
null
demos/python/nested_scripts/bar/nested_bar.py
fannymagnet/cwaf
60510f3596f1ee859ea73a50ee56dd636cde14b4
[ "Apache-2.0" ]
null
null
null
""" Nested file in bar/ """
7
19
0.535714
true
true
f74f2bc911943ff175cb7c38a1c4963f6c97560e
122,913
py
Python
test_init_final.py
motoinst/DBOT
cfab8673d9975d237c2585c1b6c4dabdad6a1482
[ "Apache-2.0" ]
1
2020-10-13T11:54:50.000Z
2020-10-13T11:54:50.000Z
test_init_final.py
motoinst/DBOT
cfab8673d9975d237c2585c1b6c4dabdad6a1482
[ "Apache-2.0" ]
null
null
null
test_init_final.py
motoinst/DBOT
cfab8673d9975d237c2585c1b6c4dabdad6a1482
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ################ Server Ver. 19 (2020. 8. 6.) ##################### import sys, os import asyncio, discord, aiohttp import random, re, datetime, time, logging from discord.ext import tasks, commands from discord.ext.commands import CommandNotFound, MissingRequiredArgument from gtts i...
38.065345
332
0.603378
tData[i]) index_fixed = 0 for value in FixedBossDateData: if value.find('bossname') != -1: indexFixedBossname.append(index_fixed) index_fixed = index_fixed + 1 for i in range(inputData.count('\r')): inputData.remove('\r') for i in range(command_inputData.count('\r')): command_inputDat...
true
true
f74f2e57a1dfa5ab3d175d9cd4804a4575af26b4
1,578
py
Python
epytope/Data/pssms/syfpeithi/mat/B_1801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
null
null
null
epytope/Data/pssms/syfpeithi/mat/B_1801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
null
null
null
epytope/Data/pssms/syfpeithi/mat/B_1801_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
null
null
null
B_1801_9 = {0: {'A': 0, 'C': 0, 'D': 4, 'E': 1, 'F': 0, 'G': 0, 'H': 0, 'I': 0, 'K': -1, 'L': 0, 'M': 0, 'N': 1, 'P': 0, 'Q': 0, 'R': -1, 'S': 0, 'T': 0, 'V': -1, 'W': 0, 'X': 0, 'Y': 0}, 1: {'A': 0, 'C': 0, 'D': 0, 'E': 10, 'F': 0, 'G': 0, 'H': 0, 'I': 0, 'K': 0, 'L': 0, 'M': 0, 'N': 0, 'P': 0, 'Q': 0, 'R': 0, 'S': 0,...
1,578
1,578
0.252218
B_1801_9 = {0: {'A': 0, 'C': 0, 'D': 4, 'E': 1, 'F': 0, 'G': 0, 'H': 0, 'I': 0, 'K': -1, 'L': 0, 'M': 0, 'N': 1, 'P': 0, 'Q': 0, 'R': -1, 'S': 0, 'T': 0, 'V': -1, 'W': 0, 'X': 0, 'Y': 0}, 1: {'A': 0, 'C': 0, 'D': 0, 'E': 10, 'F': 0, 'G': 0, 'H': 0, 'I': 0, 'K': 0, 'L': 0, 'M': 0, 'N': 0, 'P': 0, 'Q': 0, 'R': 0, 'S': 0,...
true
true
f74f2e7d8c2c0a76da0b48554337c2420d8802ee
3,269
py
Python
doc/examples/reconst_shore_metrics.py
omarocegueda/dipy
520b724041116a958892bee0068b057314a21cb2
[ "MIT" ]
null
null
null
doc/examples/reconst_shore_metrics.py
omarocegueda/dipy
520b724041116a958892bee0068b057314a21cb2
[ "MIT" ]
null
null
null
doc/examples/reconst_shore_metrics.py
omarocegueda/dipy
520b724041116a958892bee0068b057314a21cb2
[ "MIT" ]
null
null
null
""" =========================== Calculate SHORE scalar maps =========================== We show how to calculate two SHORE-based scalar maps: return to origin probability (rtop) [Descoteaux2011]_ and mean square displacement (msd) [Wu2007]_, [Wu2008]_ on your data. SHORE can be used with any multiple b-value dataset l...
24.954198
82
0.707862
import nibabel as nib import numpy as np import matplotlib.pyplot as plt from dipy.data import fetch_taiwan_ntu_dsi, read_taiwan_ntu_dsi, get_sphere from dipy.data import get_data, dsi_voxels from dipy.reconst.shore import ShoreModel fetch_taiwan_ntu_dsi() img, gtab = read_taiwan_ntu_dsi() data = img.get_data() af...
true
true
f74f2e810f1338127d465e53aa2525169040e318
1,149
py
Python
torch_geometric/datasets/amazon.py
tashby/pytorch_geometric
bc1eabc242c8dc6e3b7078db922779911ca3382d
[ "MIT" ]
1
2019-04-16T19:51:08.000Z
2019-04-16T19:51:08.000Z
torch_geometric/datasets/amazon.py
tashby/pytorch_geometric
bc1eabc242c8dc6e3b7078db922779911ca3382d
[ "MIT" ]
null
null
null
torch_geometric/datasets/amazon.py
tashby/pytorch_geometric
bc1eabc242c8dc6e3b7078db922779911ca3382d
[ "MIT" ]
null
null
null
import torch from torch_geometric.data import InMemoryDataset, download_url from torch_geometric.read import read_npz class Amazon(InMemoryDataset): url = 'https://github.com/shchur/gnn-benchmark/raw/master/data/npz/' def __init__(self, root, name, transform=None, pre_transform=None): self.name = nam...
33.794118
79
0.684073
import torch from torch_geometric.data import InMemoryDataset, download_url from torch_geometric.read import read_npz class Amazon(InMemoryDataset): url = 'https://github.com/shchur/gnn-benchmark/raw/master/data/npz/' def __init__(self, root, name, transform=None, pre_transform=None): self.name = nam...
true
true
f74f31271e679820c0984e74fef30e512487838a
1,264
py
Python
setup.py
RunningIkkyu/aliyun-table
523fb00c4b79d08f15d3ffc1b1d13098d7270090
[ "MIT" ]
1
2020-05-12T07:41:33.000Z
2020-05-12T07:41:33.000Z
setup.py
RunningIkkyu/aliyun-table
523fb00c4b79d08f15d3ffc1b1d13098d7270090
[ "MIT" ]
null
null
null
setup.py
RunningIkkyu/aliyun-table
523fb00c4b79d08f15d3ffc1b1d13098d7270090
[ "MIT" ]
null
null
null
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.a...
30.095238
84
0.711234
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='aliyun-table', version='0.1.2', author='Lane', a...
true
true
f74f31852341f1edcb96ac57f9bf433249f2f34f
366
py
Python
processor/config.py
randallgann/uci_dataset_processor
a57c0c2b71c0fceaa2acbccfc83ded928b929711
[ "MIT" ]
null
null
null
processor/config.py
randallgann/uci_dataset_processor
a57c0c2b71c0fceaa2acbccfc83ded928b929711
[ "MIT" ]
null
null
null
processor/config.py
randallgann/uci_dataset_processor
a57c0c2b71c0fceaa2acbccfc83ded928b929711
[ "MIT" ]
null
null
null
"""Directory to save the data files into""" SAVE_DATA_PATH = "" """Directory to save the output jupyter notebook into""" OUTPUT_JUPYTER_NOTEBOOK = "home/randall/Dev/uci_dataset_processor/processor/outputs/" """Location of jupyter notebook template""" JUPYTER_NOTEBOOK_TEMPLATE = ( "home/randall/Dev/uci_dataset_pro...
33.272727
85
0.784153
SAVE_DATA_PATH = "" OUTPUT_JUPYTER_NOTEBOOK = "home/randall/Dev/uci_dataset_processor/processor/outputs/" JUPYTER_NOTEBOOK_TEMPLATE = ( "home/randall/Dev/uci_dataset_processor/processor/inputs/uci_template.ipynb" )
true
true
f74f31c008764067d236e426a04117c1f847fea3
22,768
py
Python
tests/test_macsec.py
superchild/sonic-swss
0f069108215ec5cb456e87554309ee99febb302d
[ "Apache-2.0" ]
null
null
null
tests/test_macsec.py
superchild/sonic-swss
0f069108215ec5cb456e87554309ee99febb302d
[ "Apache-2.0" ]
1
2022-01-21T20:05:43.000Z
2022-01-25T19:17:40.000Z
tests/test_macsec.py
superchild/sonic-swss
0f069108215ec5cb456e87554309ee99febb302d
[ "Apache-2.0" ]
null
null
null
from swsscommon import swsscommon import conftest import sys import functools import typing import re import time def to_string(value): if isinstance(value, bool): return "true" if value else "false" return str(value) class Table(object): def __init__(self, database: conftest.DVSDatabase, table...
30.116402
87
0.549895
from swsscommon import swsscommon import conftest import sys import functools import typing import re import time def to_string(value): if isinstance(value, bool): return "true" if value else "false" return str(value) class Table(object): def __init__(self, database: conftest.DVSDatabase, table...
true
true
f74f31e740bc7492e5366c9b64b1a5afd7fd6adf
3,486
py
Python
topi/tests/python/test_topi_dense_tensorcore.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
9
2019-12-17T08:03:54.000Z
2022-01-19T02:34:23.000Z
topi/tests/python/test_topi_dense_tensorcore.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
2
2020-06-18T21:15:42.000Z
2020-06-24T17:38:37.000Z
topi/tests/python/test_topi_dense_tensorcore.py
jiangzoi/incubator-tvm
144c6f45f7217b9df2f5605e06f0903e470ac11c
[ "Apache-2.0" ]
3
2020-10-04T20:30:18.000Z
2022-01-24T18:03:52.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.891304
85
0.661503
import numpy as np import tvm import topi import topi.testing from topi.util import get_const_tuple from tvm import te from tvm.contrib.pickle_memoize import memoize from tvm.contrib import nvcc _dense_implement = { "gpu": [(topi.cuda.dense_tensorcore, topi.cuda.schedule_dense_tensorcore)] } def...
true
true
f74f324d41884554ddd30efaad5adc57b63f29b5
2,442
py
Python
paikkala/utils/importer.py
kcsry/paikkala
8b04deb65af8469485e3f57ee45f82d338418ed9
[ "MIT" ]
null
null
null
paikkala/utils/importer.py
kcsry/paikkala
8b04deb65af8469485e3f57ee45f82d338418ed9
[ "MIT" ]
17
2018-05-13T12:52:02.000Z
2020-02-16T16:51:05.000Z
paikkala/utils/importer.py
kcsry/paikkala
8b04deb65af8469485e3f57ee45f82d338418ed9
[ "MIT" ]
1
2019-08-19T18:10:16.000Z
2019-08-19T18:10:16.000Z
from typing import Dict, Iterator, List, TextIO from paikkala.models import Room, Zone def read_csv(infp: TextIO, separator: str = ',') -> Iterator[Dict[str, str]]: headers = None for line in infp: line_list = line.strip().split(separator) if not headers: headers = line_list ...
33
86
0.589271
from typing import Dict, Iterator, List, TextIO from paikkala.models import Room, Zone def read_csv(infp: TextIO, separator: str = ',') -> Iterator[Dict[str, str]]: headers = None for line in infp: line_list = line.strip().split(separator) if not headers: headers = line_list ...
true
true
f74f33d6cd0ee962cb748c6431970ca11f3816d3
45,666
bzl
Python
aspect/intellij_info_impl.bzl
sitaktif/intellij
1af1477f7411f01fbbcd83d80d02128161ee1a44
[ "Apache-2.0" ]
1
2021-05-18T10:39:41.000Z
2021-05-18T10:39:41.000Z
aspect/intellij_info_impl.bzl
sitaktif/intellij
1af1477f7411f01fbbcd83d80d02128161ee1a44
[ "Apache-2.0" ]
null
null
null
aspect/intellij_info_impl.bzl
sitaktif/intellij
1af1477f7411f01fbbcd83d80d02128161ee1a44
[ "Apache-2.0" ]
null
null
null
"""Implementation of IntelliJ-specific information collecting aspect.""" load( ":artifacts.bzl", "artifact_location", "artifacts_from_target_list_attr", "is_external_artifact", "sources_from_target", "struct_omit_none", "to_artifact_location", ) load( ":make_variables.bzl", "expand_...
39.882969
182
0.691193
load( ":artifacts.bzl", "artifact_location", "artifacts_from_target_list_attr", "is_external_artifact", "sources_from_target", "struct_omit_none", "to_artifact_location", ) load( ":make_variables.bzl", "expand_make_variables", ) UNSUPPORTED_FEATURES = [ "thin_lto", "modu...
true
true
f74f364f5d7e2f897f9177f6e67e70f9b29dd372
623
py
Python
upload_druglabels.py
fbelleau/bt_pharmgkb
a1cdcd6bfc84dd6bd479f6bae0c8ad5c8ce107a2
[ "Apache-2.0" ]
null
null
null
upload_druglabels.py
fbelleau/bt_pharmgkb
a1cdcd6bfc84dd6bd479f6bae0c8ad5c8ce107a2
[ "Apache-2.0" ]
null
null
null
upload_druglabels.py
fbelleau/bt_pharmgkb
a1cdcd6bfc84dd6bd479f6bae0c8ad5c8ce107a2
[ "Apache-2.0" ]
1
2021-12-13T22:11:41.000Z
2021-12-13T22:11:41.000Z
import os import biothings, config biothings.config_for_app(config) import biothings.hub.dataload.uploader from .parser import load_druglabels class DrugLabelsUploader(biothings.hub.dataload.uploader.BaseSourceUploader): main_source = "pharmgkb" name = "druglabels" __metadata__ = {"src_meta": {}} ...
23.961538
77
0.728732
import os import biothings, config biothings.config_for_app(config) import biothings.hub.dataload.uploader from .parser import load_druglabels class DrugLabelsUploader(biothings.hub.dataload.uploader.BaseSourceUploader): main_source = "pharmgkb" name = "druglabels" __metadata__ = {"src_meta": {}} ...
true
true
f74f3829da2705e46843cc6a81bb5eb4e6ca8f5d
8,514
py
Python
nova/virt/libvirt/storage/lvm.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/storage/lvm.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/storage/lvm.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
1
2020-07-24T00:41:18.000Z
2020-07-24T00:41:18.000Z
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2011 OpenStack Foundation # (c) Cop...
35.181818
79
0.576345
from oslo_concurrency import processutils from oslo_log import log as logging from oslo_utils import units import six import nova.conf from nova import exception from nova.i18n import _ from nova.i18n import _LW from nova.virt.libvirt import utils CONF = nova.conf.CONF LOG = logging.getLogger(__n...
true
true
f74f3a5c0458922034b24d00d09c5a7874167d7d
13,206
py
Python
doc/source/conf.py
cpelley/improver
ebf77fe2adc85ed7aec74c26671872a2e4388ded
[ "BSD-3-Clause" ]
null
null
null
doc/source/conf.py
cpelley/improver
ebf77fe2adc85ed7aec74c26671872a2e4388ded
[ "BSD-3-Clause" ]
null
null
null
doc/source/conf.py
cpelley/improver
ebf77fe2adc85ed7aec74c26671872a2e4388ded
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
31.146226
83
0.707557
import os import sys SOURCE_DIR = os.path.abspath( os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..") ) sys.path.insert(0, SOURCE_DIR) extensions = [ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.doctest", "sph...
true
true
f74f3a8a00cc7af07e0d8aeb63d120fd35be7688
601
py
Python
setup.py
sushi-chaaaan/dispanderfixed-beta
c6d5925ae3ba0d40becd592dc9766e290b1d6a71
[ "MIT" ]
null
null
null
setup.py
sushi-chaaaan/dispanderfixed-beta
c6d5925ae3ba0d40becd592dc9766e290b1d6a71
[ "MIT" ]
null
null
null
setup.py
sushi-chaaaan/dispanderfixed-beta
c6d5925ae3ba0d40becd592dc9766e290b1d6a71
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="dispanderfixedbeta", version="0.1.1", author="susi-chaaaan", author_email="sushi_code@outlook.jp", description="Discord Message URL Expander-fixed-beta", long_description=long_descript...
26.130435
58
0.66223
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="dispanderfixedbeta", version="0.1.1", author="susi-chaaaan", author_email="sushi_code@outlook.jp", description="Discord Message URL Expander-fixed-beta", long_description=long_descript...
true
true
f74f3b69c11ecfca36481ec81f3f9e21038aa189
2,070
py
Python
src/pretix/base/views/js_catalog.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
1,248
2015-04-24T13:32:06.000Z
2022-03-29T07:01:36.000Z
src/pretix/base/views/js_catalog.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
2,113
2015-02-18T18:58:16.000Z
2022-03-31T11:12:32.000Z
src/pretix/base/views/js_catalog.py
fabm3n/pretix
520fb620888d5c434665a6a4a33cb2ab22dd42c7
[ "Apache-2.0" ]
453
2015-05-13T09:29:06.000Z
2022-03-24T13:39:16.000Z
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
44.042553
118
0.772947
from django.utils import timezone from django.utils.translation.trans_real import DjangoTranslation from django.views.decorators.cache import cache_page from django.views.decorators.http import etag from django.views.i18n import JavaScriptCatalog import_date = timezone.now().strftime("%Y%m%d%H%M...
true
true
f74f3d1aaeb5aecc2318745c0605550bf54d0232
402
py
Python
settings.py
yashkir/considerate-coatis
110f633672421a763a058f191ea94a3415517eff
[ "MIT" ]
null
null
null
settings.py
yashkir/considerate-coatis
110f633672421a763a058f191ea94a3415517eff
[ "MIT" ]
35
2021-07-10T17:16:33.000Z
2021-07-17T16:30:22.000Z
settings.py
yashkir/considerate-coatis
110f633672421a763a058f191ea94a3415517eff
[ "MIT" ]
2
2021-07-12T01:23:56.000Z
2021-07-13T03:55:12.000Z
OVERLAY_WIDTH = 80 OVERLAY_HEIGHT = 40 PALETTE_COLORS = 256 BACKGROUND = '#E3E0D0' PALETTE = [ ('base', '', '', '', '#000000', BACKGROUND), ('button', '', '', '', '#000000,bold', BACKGROUND), ('highlight', '', '', '', '#ffa', BACKGROUND), ('faded', '', '', '', '#888', BACKGROUND), ('warning', '', '...
28.714286
55
0.4801
OVERLAY_WIDTH = 80 OVERLAY_HEIGHT = 40 PALETTE_COLORS = 256 BACKGROUND = '#E3E0D0' PALETTE = [ ('base', '', '', '', '#000000', BACKGROUND), ('button', '', '', '', '#000000,bold', BACKGROUND), ('highlight', '', '', '', '#ffa', BACKGROUND), ('faded', '', '', '', '#888', BACKGROUND), ('warning', '', '...
true
true
f74f3d5a5f563644b0a2a0fb836d36139f1b6ccb
196,531
py
Python
tests/x509/test_x509_ext.py
hangingman/cryptography
ae9ca786372716ed28002b6ad1ac049de1e6ea5d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
2
2015-10-08T21:28:42.000Z
2020-08-15T10:03:49.000Z
tests/x509/test_x509_ext.py
hangingman/cryptography
ae9ca786372716ed28002b6ad1ac049de1e6ea5d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
68
2015-06-27T00:28:53.000Z
2022-03-31T10:09:13.000Z
tests/x509/test_x509_ext.py
hangingman/cryptography
ae9ca786372716ed28002b6ad1ac049de1e6ea5d
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
3
2016-04-11T20:22:38.000Z
2018-09-20T20:39:54.000Z
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import binascii import datetime import ipaddress import os import typing import pretend import pytest from cryptography import x509 fro...
34.570097
79
0.537513
import binascii import datetime import ipaddress import os import typing import pretend import pytest from cryptography import x509 from cryptography.hazmat.backends.interfaces import ( DSABackend, EllipticCurveBackend, RSABackend, X509Backend, ) from cryptography.hazmat.primitives import hashes...
true
true
f74f3d8e53327233150bf39ab98257dd0dbbff8d
5,984
py
Python
other_scripts/data/data_size_in_memory.py
pedro-mgb/pedestrian-arc-lstm-smf
1b9fbe6c89c74dc706fd8d3b11ea08977ba2c1d3
[ "MIT" ]
2
2021-11-28T01:47:47.000Z
2022-02-26T16:12:43.000Z
other_scripts/data/data_size_in_memory.py
pedro-mgb/pedestrian-arc-lstm-smf
1b9fbe6c89c74dc706fd8d3b11ea08977ba2c1d3
[ "MIT" ]
null
null
null
other_scripts/data/data_size_in_memory.py
pedro-mgb/pedestrian-arc-lstm-smf
1b9fbe6c89c74dc706fd8d3b11ea08977ba2c1d3
[ "MIT" ]
null
null
null
""" Created on September 11th, 2021 Simple script to compute the size of a dataset (with one or multiple files) in memory (RAM). Note that this measure will give an approximate approximate value IMPORTANT NOTE: The computation may stop with an error if the data does not fit in memory. This makes training with such da...
46.75
117
0.676471
import sys import time import argparse import gc import os import psutil import torch from models.data.loaders import get_data_loader from models.utils.parser_options import add_parser_arguments_for_data, add_parser_arguments_misc parser = argparse.ArgumentParser() parser = add_parser_arguments_for_data(parser) pars...
true
true
f74f3ddf43f4357c5f176065138c93970919fe36
941
py
Python
src/Consts/Paths.py
Krumpet/ProjectKdam
6d858574e89b58be8b47b4622c233a6ab15eef71
[ "Apache-2.0" ]
null
null
null
src/Consts/Paths.py
Krumpet/ProjectKdam
6d858574e89b58be8b47b4622c233a6ab15eef71
[ "Apache-2.0" ]
null
null
null
src/Consts/Paths.py
Krumpet/ProjectKdam
6d858574e89b58be8b47b4622c233a6ab15eef71
[ "Apache-2.0" ]
null
null
null
import os MAIN_PATH = os.path.abspath("..") DATA_PATH = os.path.join(MAIN_PATH, "data") PDF_PATH = os.path.join(DATA_PATH, "pdf") TXT_PATH = os.path.join(DATA_PATH, "txt") BAD_ONLINE_COURSES = os.path.join(TXT_PATH, "badOnlineCourses.txt") BAD_CATALOGUE_COURSES = os.path.join(TXT_PATH, "badCatalogueCourses.txt") TES...
39.208333
73
0.766206
import os MAIN_PATH = os.path.abspath("..") DATA_PATH = os.path.join(MAIN_PATH, "data") PDF_PATH = os.path.join(DATA_PATH, "pdf") TXT_PATH = os.path.join(DATA_PATH, "txt") BAD_ONLINE_COURSES = os.path.join(TXT_PATH, "badOnlineCourses.txt") BAD_CATALOGUE_COURSES = os.path.join(TXT_PATH, "badCatalogueCourses.txt") TES...
true
true