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
1c319f4f2f2fb60ea565490e1d1a2d9404c76ea7
8,074
py
Python
lib/sqlalchemy/dialects/mysql/oursql.py
edelooff/sqlalchemy
97d2a2091ed4caee1e19168d0db39e4d94a6d12f
[ "MIT" ]
2
2020-02-19T17:50:50.000Z
2021-02-10T02:52:41.000Z
lib/sqlalchemy/dialects/mysql/oursql.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
null
null
null
lib/sqlalchemy/dialects/mysql/oursql.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
1
2021-06-13T01:55:35.000Z
2021-06-13T01:55:35.000Z
# mysql/oursql.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+oursql :name: OurSQL :dbapi: oursql :connectstri...
30.69962
78
0.624845
from .base import BIT from .base import MySQLDialect from .base import MySQLExecutionContext from ... import types as sqltypes from ... import util class _oursqlBIT(BIT): def result_processor(self, dialect, coltype): return None class MySQLExecutionContext_oursql(MySQLExecutionContext): @propert...
true
true
1c319f8d1ab140c228b3c1a5c4b193ef76c61214
409
py
Python
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
feder/main/views.py
efefre/feder
fdfe2f213266548fc40cea68ac72f739c8394b8e
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView from feder.monitorings.models import Monitoring class HomeView(TemplateView): template_name = "main/home.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["monitoring_list"] = ( Monitorin...
27.266667
76
0.679707
from django.views.generic import TemplateView from feder.monitorings.models import Monitoring class HomeView(TemplateView): template_name = "main/home.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["monitoring_list"] = ( Monitorin...
true
true
1c319fcd462d92bc0a42f8dafa4cea5196fd6d6e
401
py
Python
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
null
null
null
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
null
null
null
blackjack/game/hand.py
fdpeiter/Blackjack21
8a43edd24900000afd771d3dab601437c4a06893
[ "MIT" ]
1
2021-12-03T17:28:44.000Z
2021-12-03T17:28:44.000Z
values = { "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Seven": 7, "Eight": 8, "Nine": 9, "Ten": 10, "Jack": 10, "Queen": 10, "King": 10, "Ace": 11, } class Hand: def __init__(self): self.cards = [] self.value = 0 def add_card(self...
15.423077
39
0.448878
values = { "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Seven": 7, "Eight": 8, "Nine": 9, "Ten": 10, "Jack": 10, "Queen": 10, "King": 10, "Ace": 11, } class Hand: def __init__(self): self.cards = [] self.value = 0 def add_card(self...
true
true
1c31a0a69f4670d7ddfa73dd10fc53c4461d6164
365
py
Python
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
CursoEmVideo/ex114.py
EduardoArgenti/Python
18b4578033d6eb6fb0ae2d6a8511a4a813856203
[ "MIT" ]
null
null
null
# Crie um código em Python que teste se o site pudim está # acessível pelo computador usado. import urllib import urllib.request try: site = urllib.request.urlopen('http://www.pudim.com.br') except urllib.error.URLError: print('\033[1:31mErro: site inacessível.\033[0m') else: print('\033[1:32mSucesso: sit...
28.076923
60
0.720548
import urllib import urllib.request try: site = urllib.request.urlopen('http://www.pudim.com.br') except urllib.error.URLError: print('\033[1:31mErro: site inacessível.\033[0m') else: print('\033[1:32mSucesso: site disponível.\033[0m') print(site.read())
true
true
1c31a15b5a6c2342045cc4fe641cdbe7458a338c
4,261
py
Python
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
2
2015-05-27T02:06:18.000Z
2015-05-27T02:06:37.000Z
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
null
null
null
scrapy/linkextractors/lxmlhtml.py
michaelgilmore/scrapy
5a2a6bf6fc8861f00c0875659db11ba4d72406cd
[ "BSD-3-Clause" ]
1
2020-11-01T20:40:01.000Z
2020-11-01T20:40:01.000Z
""" Link extractor based on lxml.html """ import re from six.moves.urllib.parse import urlparse, urljoin import lxml.etree as etree from scrapy.selector import Selector from scrapy.link import Link from scrapy.utils.misc import arg_to_iter from scrapy.utils.python import unique as unique_list, str_to_unicode from sc...
38.044643
96
0.64445
import re from six.moves.urllib.parse import urlparse, urljoin import lxml.etree as etree from scrapy.selector import Selector from scrapy.link import Link from scrapy.utils.misc import arg_to_iter from scrapy.utils.python import unique as unique_list, str_to_unicode from scrapy.linkextractors import FilteringLinkEx...
true
true
1c31a18a0617523c1bb28a5dc58ba367b22931b1
596
py
Python
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
idea/migrations/0003_auto_20170118_0445.py
andreyrobota/AndreyKosinskiy
6258c4e90de791f721093545ec3cd9a9569155f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-18 01:45 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('idea', '0002_auto_20170118_0359'), ] operations = [ migrations.AlterField( ...
22.923077
51
0.587248
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('idea', '0002_auto_20170118_0359'), ] operations = [ migrations.AlterField( model_name='ideauser', name='idea_name', ...
true
true
1c31a1bc387ebb0a412af0f080aed7fb1457d5f7
2,739
py
Python
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
14
2019-05-29T09:45:00.000Z
2021-04-22T20:11:15.000Z
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
10
2019-05-29T09:47:01.000Z
2020-09-15T20:34:55.000Z
stellarobservatory/stellarbeat.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
5
2019-05-29T07:33:02.000Z
2021-11-24T18:46:03.000Z
"""Fetch and process nodes""" from typing import Any, Dict, List, Optional, Set, TypedDict, cast import requests from .utils.graph import Nodes from .quorum_slice_definition import get_normalized_definition, Definition, Definitions def get_nodes_from_stellarbeat(): """Fetch nodes from stellarbeat.io""" return...
41.5
100
0.703907
from typing import Any, Dict, List, Optional, Set, TypedDict, cast import requests from .utils.graph import Nodes from .quorum_slice_definition import get_normalized_definition, Definition, Definitions def get_nodes_from_stellarbeat(): return requests.get('https://api.stellarbeat.io/v1/nodes').json() QuorumSet =...
true
true
1c31a2534a93662db3935f20a70cbcbb719c581c
9,037
py
Python
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
null
null
null
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
null
null
null
art_collections/hooks.py
mohsinalimat/art_collections
95d2f3627e59c8229cee6c14f01f4c513fc86304
[ "MIT" ]
1
2022-02-02T19:52:54.000Z
2022-02-02T19:52:54.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version from frappe import _ app_name = "art_collections" app_title = "Art Collections" app_publisher = "GreyCube Technologies" app_description = "Customization for art collections" app_icon = "octicon octicon-gift" app_co...
34.492366
133
0.682749
from __future__ import unicode_literals from . import __version__ as app_version from frappe import _ app_name = "art_collections" app_title = "Art Collections" app_publisher = "GreyCube Technologies" app_description = "Customization for art collections" app_icon = "octicon octicon-gift" app_color = "violet" app_email...
true
true
1c31a2d5a144fba929befb65d383bd0f0157eab5
7,619
py
Python
test/helpers.py
fdeoliveirag/luigi
e20e4306786fa5b5f3c99878c2c56a77f987e0b5
[ "Apache-2.0" ]
14,755
2015-01-01T09:33:34.000Z
2022-03-31T15:38:39.000Z
test/helpers.py
yassineaboukir/luigi
cd998eace682370e89524dd9368c3c537692eb7b
[ "Apache-2.0" ]
2,387
2015-01-01T09:16:13.000Z
2022-03-12T13:55:43.000Z
test/helpers.py
yassineaboukir/luigi
cd998eace682370e89524dd9368c3c537692eb7b
[ "Apache-2.0" ]
2,630
2015-01-02T06:11:32.000Z
2022-03-27T22:11:20.000Z
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
32.012605
88
0.628823
import functools import itertools import tempfile import re from contextlib import contextmanager import luigi import luigi.task_register import luigi.cmdline_parser from luigi.cmdline_parser import CmdlineParser import os import unittest def skipOnTravisAndGithubActions(reason): if _override_skip_CI_tests(): ...
true
true
1c31a31b67708149f7b5b2556e57b895b3c63e9d
13,023
py
Python
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
null
null
null
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
null
null
null
select2/fields.py
aprovin/django-select2-forms
929a0a7acf6f9222cbe0f8c9287bf7544d169868
[ "BSD-2-Clause" ]
1
2015-05-18T09:35:45.000Z
2015-05-18T09:35:45.000Z
import django from django import forms from django.db import models from django.core.exceptions import ImproperlyConfigured, ValidationError, FieldDoesNotExist from django.forms.models import ModelChoiceIterator from django.utils.encoding import force_str from django.utils.functional import Promise try: from django...
38.078947
97
0.63457
import django from django import forms from django.db import models from django.core.exceptions import ImproperlyConfigured, ValidationError, FieldDoesNotExist from django.forms.models import ModelChoiceIterator from django.utils.encoding import force_str from django.utils.functional import Promise try: from django...
true
true
1c31a329dd2b475f0506b43cbf573628ba087ccf
5,633
py
Python
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
BlueprintsApp/main/gui/forms/language_selection_form.py
PiCodingClub/BlueprintsEdu
f65ad2c3bf6f01acb26660505f6ceded0bee888f
[ "Apache-2.0" ]
null
null
null
from gui.forms.form import Form import pygame as pg from utils.gui_utils import Themes from utils.string_utils import StringUtils from utils.app_utils import Images from utils.app_utils import DisplaySettings from pygame.locals import * from utils import logger_utils class LanguageSelectionForm(Form): def __init...
49.849558
118
0.573407
from gui.forms.form import Form import pygame as pg from utils.gui_utils import Themes from utils.string_utils import StringUtils from utils.app_utils import Images from utils.app_utils import DisplaySettings from pygame.locals import * from utils import logger_utils class LanguageSelectionForm(Form): def __init...
true
true
1c31a49ea3f7362c00543ee23e7e4555e491096b
5,448
py
Python
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
1
2021-11-17T16:07:14.000Z
2021-11-17T16:07:14.000Z
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
null
null
null
mmdet/core/post_processing/bbox_nms.py
wobushishuiguo/Rotation-ship-detection
e49f2c7fd71d6f05b3d0fa6dd67ad751b306592e
[ "Apache-2.0" ]
null
null
null
import torch from mmcv.ops.nms import batched_nms from mmdet.core.bbox.iou_calculators import bbox_overlaps def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): """NMS for...
36.563758
93
0.623715
import torch from mmcv.ops.nms import batched_nms from mmdet.core.bbox.iou_calculators import bbox_overlaps def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None): num_classe...
true
true
1c31a51b2a4c958d1cf381597a29713110b80cf1
1,222
py
Python
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
2
2017-03-21T14:18:35.000Z
2020-03-30T20:51:33.000Z
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
null
null
null
lya_data_structures.py
yishayv/lyacorr
deed114b4cadd4971caec68e2838a5fac39827b1
[ "MIT" ]
null
null
null
class LyaForestTransmittance: def __init__(self, ar_z, ar_transmittance, ar_pipeline_ivar, ar_fit): """ a simple wrapper for holding lya-forest data. :type ar_z: np.array :type ar_transmittance: np.array :type ar_pipeline_ivar: np.array """ self.ar_z = ar_z ...
31.333333
73
0.640753
class LyaForestTransmittance: def __init__(self, ar_z, ar_transmittance, ar_pipeline_ivar, ar_fit): self.ar_z = ar_z self.ar_transmittance = ar_transmittance self.ar_ivar = ar_pipeline_ivar self.ar_fit = ar_fit class LyaForestTransmittanceBinned: def __init__(self, ar_mask, ar_...
true
true
1c31a7a52f12b45d81c7942f0e107db7e9523bc7
2,521
py
Python
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
MLImageSegmentation/makeImageDataSet.py
StevenHuang2020/OpencvPython
42cde4880a50f7b3917027e6359485d3569bf40f
[ "MIT" ]
null
null
null
import sys sys.path.append('..') import pandas as pd from ImageBase import cannyImg, grayImg, loadGrayImg from skimage.filters import roberts, sobel, scharr, prewitt, gaussian, laplace, farid, median from FeatureExtract.imageFeatures import garborFeature from mainImagePlot import plotImagList def makeImageFeatures(i...
27.402174
93
0.645775
import sys sys.path.append('..') import pandas as pd from ImageBase import cannyImg, grayImg, loadGrayImg from skimage.filters import roberts, sobel, scharr, prewitt, gaussian, laplace, farid, median from FeatureExtract.imageFeatures import garborFeature from mainImagePlot import plotImagList def makeImageFeatures(i...
true
true
1c31a7c66db65397cfc105dab85a9c9a189b3059
25,804
py
Python
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
6
2020-12-03T14:50:32.000Z
2022-02-04T03:15:44.000Z
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
bsz_gimp_lib.py
Beinsezii/bsz-gimp-plugins
bb735ddbf47fa4f2d383f4e359518c0809ab6e09
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Shared code between plugins. Use python's help() for prettier help info. """ import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl from gi.repository import GObject from gi.repositor...
35.29959
92
0.55317
import gi gi.require_version('Gimp', '3.0') from gi.repository import Gimp gi.require_version('Gegl', '0.4') from gi.repository import Gegl from gi.repository import GObject from gi.repository import GLib from abc import ABC, abstractmethod # in INTERACTIVE mode while keeping ui stuff in the params. gi.require_versi...
true
true
1c31a9b4789e5bca40f40ecac816609a2e3661a5
6,527
py
Python
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
7
2020-10-03T22:45:38.000Z
2021-10-02T09:54:40.000Z
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
265
2020-10-01T20:06:27.000Z
2022-02-27T12:18:55.000Z
backend/api/utils/profile_parse.py
hack4impact-uiuc/mentee
c56945db8051e798c7bf6703577a0e50a54b0d67
[ "MIT" ]
1
2020-10-06T19:57:37.000Z
2020-10-06T19:57:37.000Z
from bson import ObjectId from api.core import logger from api.models import db, Education, Video, MentorProfile, MenteeProfile, Image from api.utils.request_utils import imgur_client from api.utils.constants import Account def new_profile(data: dict = {}, profile_type: int = -1): """Parses data given by POST req...
36.668539
86
0.597978
from bson import ObjectId from api.core import logger from api.models import db, Education, Video, MentorProfile, MenteeProfile, Image from api.utils.request_utils import imgur_client from api.utils.constants import Account def new_profile(data: dict = {}, profile_type: int = -1): if not data or profile_type == -...
true
true
1c31ab96d1d8e4573b9657d3792bd880da3d50ec
9,249
py
Python
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
5
2019-03-25T12:36:37.000Z
2022-02-06T16:36:17.000Z
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
null
null
null
adversarial_text/data/data_utils.py
zhangyingying94/models
bf46247b4207698bbeb315d9086eb81662015359
[ "Apache-2.0" ]
3
2018-01-05T18:31:24.000Z
2022-02-06T16:36:20.000Z
# Copyright 2017 Google, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
28.284404
80
0.711969
import operator import os import random import re import tensorflow as tf EOS_TOKEN = '</s>' ALL_SA = 'all_sa.tfrecords' TRAIN_SA = 'train_sa.tfrecords' TEST_SA = 'test_sa.tfrecords' ALL_LM = 'all_lm.tfrecords' TRAIN_LM = 'train_lm.tfrecords' TEST_LM = 'test_lm.tfrecords' TRAIN_CLASS = 'train_classification.tfrecor...
true
true
1c31acb81b1d58970e393327abc0600198759062
184
py
Python
graviteeio_cli/extensions/jinja_filters.py
Shaker5191/graviteeio-cli
318748bb8e631743ea58afaee24333249ca3d227
[ "Apache-2.0" ]
12
2019-05-29T20:06:01.000Z
2020-10-07T07:40:27.000Z
graviteeio_cli/extensions/jinja_filters.py
Shaker5191/graviteeio-cli
318748bb8e631743ea58afaee24333249ca3d227
[ "Apache-2.0" ]
41
2019-11-04T18:18:18.000Z
2021-04-22T16:12:51.000Z
graviteeio_cli/extensions/jinja_filters.py
gravitee-io/gravitee-cli
8e3bf9f2c0c2873e0f6e67f8fcaf0d3b6c44b3ca
[ "Apache-2.0" ]
6
2019-06-18T04:27:49.000Z
2021-06-02T17:52:24.000Z
import yaml def to_yaml(a, *args, **kw): return yaml.safe_dump(a, default_flow_style=True).rstrip() def filter_loader(environment): environment.filters['toyaml'] = to_yaml
18.4
62
0.722826
import yaml def to_yaml(a, *args, **kw): return yaml.safe_dump(a, default_flow_style=True).rstrip() def filter_loader(environment): environment.filters['toyaml'] = to_yaml
true
true
1c31acd628192da6c64c8e9b339c87b49429fe77
2,621
py
Python
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
67
2015-05-17T21:22:08.000Z
2022-03-16T09:59:05.000Z
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
24
2016-01-12T18:02:25.000Z
2021-12-16T14:09:25.000Z
src/genetics.py
NDHall/pyvovlExtension
521c7cbd340c6f90e4b6d9d1a1da1282020c9225
[ "BSD-2-Clause-FreeBSD" ]
26
2015-01-30T20:50:17.000Z
2022-01-11T14:11:33.000Z
#! /usr/bin/env python ############################################################################## ## pyvolve: Python platform for simulating evolutionary sequences. ## ## Written by Stephanie J. Spielman (stephanie.spielman@gmail.com) #############################################################################...
68.973684
699
0.395651
class Genetics(): def __init__(self): self.pyrims = ["C", "T"] self.purines = ["A", "G"] self.nucleotides = ["A", "C", "G", "T"] self.amino_acids = ["A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "Y"] self....
true
true
1c31aef0f44271f91bc6d3c39f12903ee36bcf7e
3,041
py
Python
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
ikabot/function/searchForIslandSpaces.py
adaamz/ikabot
d243e612ba083a39f6efce15012d173aad693dc6
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import time import gettext import traceback import sys from ikabot.config import * from ikabot.helpers.botComm import * from ikabot.helpers.gui import enter, enter from ikabot.helpers.varios import wait from ikabot.helpers.signals import setInfoSignal from ikabot.helpers...
31.030612
201
0.692207
import time import gettext import traceback import sys from ikabot.config import * from ikabot.helpers.botComm import * from ikabot.helpers.gui import enter, enter from ikabot.helpers.varios import wait from ikabot.helpers.signals import setInfoSignal from ikabot.helpers.pedirInfo import getIslandsIds from ikabot.help...
true
true
1c31af208eee8a287bd5a28a478bc5bf5a3d37ba
1,010
py
Python
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
2
2021-11-10T21:39:34.000Z
2021-11-11T13:43:40.000Z
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
null
null
null
plugins/jokey_plugin.py
personGithubAccount/WitheredBot
2b25a1da7796e94ff8e54f58adbf2e07e46e8bd4
[ "MIT" ]
null
null
null
from libs.embed import (Embed) from discord.ext import (commands) from requests import get class Joke(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def joke(self, ctx): params: dict[str] = {} params.update({'blacklistFlags': 'nsfw'}) para...
27.297297
128
0.541584
from libs.embed import (Embed) from discord.ext import (commands) from requests import get class Joke(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def joke(self, ctx): params: dict[str] = {} params.update({'blacklistFlags': 'nsfw'}) para...
true
true
1c31af3a0709854f81377b508f9890e2b1bdd318
526
py
Python
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
1
2020-04-11T09:51:54.000Z
2020-04-11T09:51:54.000Z
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
HackerRank/Interview Preparation Kit/Time Complexity Primality.py
will-data/Self-Study-WIL
69d627c65130fcfa23f27f97948a20107bb33394
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys import math # Complete the primality function below. def primality(n): if n == 1: return('Not prime') for i in range(2, math.floor(n**(1/2))+1): if n % i == 0: return ('Not prime') return('Prime') if __name__ == '__main__': ...
17.533333
47
0.585551
import math import os import random import re import sys import math def primality(n): if n == 1: return('Not prime') for i in range(2, math.floor(n**(1/2))+1): if n % i == 0: return ('Not prime') return('Prime') if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') p = ...
true
true
1c31b0c679e5815c7a8a471eea9e2ac5d661ea89
5,219
py
Python
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
null
null
null
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
7
2021-03-19T04:47:13.000Z
2022-01-13T02:02:46.000Z
backend/api/v1/groups/serializers.py
donicrazy/ChatApp
ab129a9c0706bbb972cbce43283ba6e06d144635
[ "MIT" ]
null
null
null
from rest_framework import serializers from django.contrib.auth import get_user_model from backend.api.v1.profiles.serializers import ProfileSerializer from backend.groups.models import (ChatGroup, GroupMembership, GroupMessage, GroupMessageInfo) User = get_user_model() class Mem...
28.210811
76
0.567733
from rest_framework import serializers from django.contrib.auth import get_user_model from backend.api.v1.profiles.serializers import ProfileSerializer from backend.groups.models import (ChatGroup, GroupMembership, GroupMessage, GroupMessageInfo) User = get_user_model() class Mem...
true
true
1c31b1b16df1630363132b378573133e697d96b7
2,452
py
Python
macdaily/cmd/logging.py
JarryShaw/MacDaily
853b841dd1f1f7e6aae7bf2c305ff008bc76055c
[ "BSD-3-Clause" ]
10
2018-09-20T19:57:56.000Z
2021-11-14T18:28:10.000Z
macdaily/cmd/logging.py
JarryShaw/jsdaily
3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d
[ "BSD-3-Clause" ]
2
2020-05-31T08:49:47.000Z
2021-12-28T16:57:42.000Z
macdaily/cmd/logging.py
JarryShaw/jsdaily
3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import abc import os from macdaily.cls.command import Command from macdaily.util.compat import pathlib from macdaily.util.tools.print import print_info class LoggingCommand(Command): @property @abc.abstractmethod def log(self): return NotImplemented @property @a...
25.810526
135
0.625204
import abc import os from macdaily.cls.command import Command from macdaily.util.compat import pathlib from macdaily.util.tools.print import print_info class LoggingCommand(Command): @property @abc.abstractmethod def log(self): return NotImplemented @property @abc.abstractmethod de...
true
true
1c31b332cd2f592824567873d1679df2de07496c
3,592
py
Python
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
1
2019-07-21T10:30:00.000Z
2019-07-21T10:30:00.000Z
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
null
null
null
CD_Installer.py
GascaK/CosmoDispatch
2ffcf67116719d768db1215d11026c06e1188f11
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import tkinter as tk from tkinter import ttk class CDUpdate(tk.Tk): def __init__(self, update_file): """ Cosmo Dispatch Update/Installer class. Update the CosmoDispatch application source code with information provided in predefined format from insi...
36.653061
76
0.505846
import os import tkinter as tk from tkinter import ttk class CDUpdate(tk.Tk): def __init__(self, update_file): location = '' tk.Tk.__init__(self) frame = tk.Frame() frame.pack() entry = tk.Text(frame, width=50, height=10) entry.pack() update_notes = ...
true
true
1c31b46de7c9e75374ebbdfe1bd81e71b65d2e42
15,073
py
Python
trader/client.py
donaldng/bitfinex-arbitrage
1a36ea6f354fbf2954e4341ec75a90ad208f60d1
[ "MIT" ]
25
2017-10-22T14:56:02.000Z
2022-03-10T00:30:00.000Z
client.py
donaldng/binance_listing
1d1612ecb57225a3b3c0854721dd9bac4b3a140a
[ "MIT" ]
1
2017-09-30T03:25:43.000Z
2017-09-30T07:40:29.000Z
client.py
donaldng/binance_listing
1d1612ecb57225a3b3c0854721dd9bac4b3a140a
[ "MIT" ]
8
2017-10-25T15:02:55.000Z
2021-05-14T09:20:09.000Z
from __future__ import absolute_import import requests import json import base64 import hmac import hashlib import time PROTOCOL = "https" HOST = "api.bitfinex.com" VERSION = "v1" PATH_SYMBOLS = "symbols" PATH_TICKER = "ticker/%s" PATH_TODAY = "today/%s" PATH_STATS = "stats/%s" PATH_LENDBOOK = "lendbo...
29.154739
387
0.529888
from __future__ import absolute_import import requests import json import base64 import hmac import hashlib import time PROTOCOL = "https" HOST = "api.bitfinex.com" VERSION = "v1" PATH_SYMBOLS = "symbols" PATH_TICKER = "ticker/%s" PATH_TODAY = "today/%s" PATH_STATS = "stats/%s" PATH_LENDBOOK = "lendbo...
true
true
1c31b4a81218c83e6510e31d8999caf6d59eb188
411
py
Python
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
mongodb_dialect/__init__.py
kitfactory/mongodb_dialect
1746d2aca08be4b12adb74e3a6806f8d840f6382
[ "MIT" ]
null
null
null
__version__ = '0.1.0' from .connection import connect from .exception import * from . dialect import * paramstyle = 'pyformat' threadsafety = 2 __all__ = [ 'MongoDBDialect', 'connect', 'apilevel', 'threadsafety', 'paramstyle', 'Warning', 'Error', 'InterfaceError', 'DatabaseError', 'DataError', 'Operatio...
27.4
109
0.705596
__version__ = '0.1.0' from .connection import connect from .exception import * from . dialect import * paramstyle = 'pyformat' threadsafety = 2 __all__ = [ 'MongoDBDialect', 'connect', 'apilevel', 'threadsafety', 'paramstyle', 'Warning', 'Error', 'InterfaceError', 'DatabaseError', 'DataError', 'Operatio...
true
true
1c31b657f81ad541c8ada79849a28f80c42ac404
1,367
py
Python
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
bluebottle/funding/migrations/0005_auto_20190604_1501.py
jayvdb/bluebottle
305fea238e6aa831598a8b227223a1a2f34c4fcc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-06-04 13:01 from __future__ import unicode_literals import bluebottle.utils.fields from decimal import Decimal from django.db import migrations import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('funding', '...
35.051282
149
0.62692
from __future__ import unicode_literals import bluebottle.utils.fields from decimal import Decimal from django.db import migrations import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('funding', '0004_auto_20190604_1501'), ] operations = [ migrations.Al...
true
true
1c31b77eb6b97b7bc5571ee6bb86ac4981a313f9
750
py
Python
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
tests/test_supersuit.py
happyCoderJDFJJ/pyrfuniverse
8ddb6e0d8f113015ba820a327388a528a8b215c7
[ "Apache-2.0" ]
null
null
null
from stable_baselines3.ppo import CnnPolicy from stable_baselines3 import PPO, SAC from stable_baselines3.common.monitor import Monitor from pettingzoo.butterfly import pistonball_v4 import supersuit as ss env = pistonball_v4.parallel_env(n_pistons=20, local_ratio=0, time_penalty=-0.1, continuous=True, random_drop=Tr...
39.473684
207
0.801333
from stable_baselines3.ppo import CnnPolicy from stable_baselines3 import PPO, SAC from stable_baselines3.common.monitor import Monitor from pettingzoo.butterfly import pistonball_v4 import supersuit as ss env = pistonball_v4.parallel_env(n_pistons=20, local_ratio=0, time_penalty=-0.1, continuous=True, random_drop=Tr...
true
true
1c31b7f706635b11d0d43ccc58b346296e89beb9
252
py
Python
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding_Solutions
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
1
2020-10-18T22:06:12.000Z
2020-10-18T22:06:12.000Z
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding-Solutions_Python3_C-_Oracle-SQL
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
null
null
null
Python/04. Sets/012. Check Subset.py
AnTeater515/HackerRank-Coding-Solutions_Python3_C-_Oracle-SQL
c5c1337ed6d70c6d7a1850b2a99aab10c285c290
[ "MIT" ]
null
null
null
# Problem: https://www.hackerrank.com/challenges/py-check-subset/problem # Score: 10 for i in range(int(input())): _, a = input(), set(map(int, input().split())) _, b = input(), set(map(int, input().split())) print(a.issubset(b))
28
73
0.599206
for i in range(int(input())): _, a = input(), set(map(int, input().split())) _, b = input(), set(map(int, input().split())) print(a.issubset(b))
true
true
1c31b82a678a1cc875ef2f4bf9fb114401204dc4
1,806
py
Python
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
14,886
2017-07-24T02:58:35.000Z
2022-03-31T18:17:04.000Z
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,361
2017-07-24T05:56:31.000Z
2022-03-31T13:26:35.000Z
tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py
fzyzcjy/ncnn
42e71609508fde1bd54d9d9de6ca5522ee3bcf37
[ "BSD-3-Clause" ]
3,786
2017-07-24T03:09:15.000Z
2022-03-31T16:56:40.000Z
# Tencent is pleased to support the open source community by making ncnn available. # # Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the...
28.666667
91
0.669989
import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.shuffle_0 = nn.ChannelShuffle(2) self.shuffle_1 = nn.ChannelShuffle(16) def forward(self, x, y): x = self.shuffle_0(x) x =...
true
true
1c31b952bea35ca4d28bfa63b911709bd56f3ded
1,550
py
Python
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
clone_repo/parse_repo_url.py
micktwomey/clone-repo
f3d64f286174df4e64d25d89c21105d9a2cb99cf
[ "MIT" ]
null
null
null
"""Parse git/hd/other repo urls into a neat usable format Tries to handle all the exotic repos, suitable for cloning. """ import dataclasses import pathlib import re import typing @dataclasses.dataclass class RepoURL: url: str tool: str host: str group: str project: str def parse_url(url: str...
26.724138
150
0.554194
import dataclasses import pathlib import re import typing @dataclasses.dataclass class RepoURL: url: str tool: str host: str group: str project: str def parse_url(url: str) -> typing.Optional[RepoURL]: if url.startswith("file://") or str(pathlib.Path(url).expanduser()).startswith("/"): ...
true
true
1c31b9609ade94f7c39616819c2323dc09113224
4,729
py
Python
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
src/boxes/datatypes/units.py
Peilonrayz/alphabet_learner
13229e53215e3c050f106e00e34f90ca2d6fa256
[ "MIT" ]
null
null
null
import enum from dataclasses import dataclass from typing import Optional, ClassVar, Dict class UnitTypes(enum.Enum): NONE = 0 FLEX = enum.auto() ANGLE = enum.auto() FREQUENCY = enum.auto() LENGTH = enum.auto() RESOLUTION = enum.auto() TIME = enum.auto() @dataclass class Unit: value:...
18.61811
93
0.635864
import enum from dataclasses import dataclass from typing import Optional, ClassVar, Dict class UnitTypes(enum.Enum): NONE = 0 FLEX = enum.auto() ANGLE = enum.auto() FREQUENCY = enum.auto() LENGTH = enum.auto() RESOLUTION = enum.auto() TIME = enum.auto() @dataclass class Unit: value:...
true
true
1c31bba40692dfe153c0db3dc2084f4d5e849a9e
7,912
py
Python
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
brendan1mcmanus/whartonfintech-v3
6de82024edfbf76e9fcf5dfce61ce528279bc888
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # whartonfintech documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values...
32.162602
80
0.710566
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'whartonfintech' copyright = u"2015, Sudipta Bandyopadhyay" # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. ver...
true
true
1c31bbaacea3596ce294897cfb99e0b71ef1b8b6
3,104
bzl
Python
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
null
null
null
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
null
null
null
asylo/bazel/sim_enclave.bzl
kevin405/mosl_vsgx_migration
76ddd438c8caad1051ea9a7e2040bf6ccee996a2
[ "Apache-2.0" ]
1
2019-01-02T22:04:21.000Z
2019-01-02T22:04:21.000Z
# # Copyright 2018 Asylo authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
33.73913
77
0.659794
load("@com_google_asylo_backend_provider//:enclave_info.bzl", "EnclaveInfo") SimEnclaveInfo = provider() def _reprovide_binary_with_enclave_info_impl(ctx): return [ DefaultInfo( files = ctx.attr.binary[DefaultInfo].files, data_runfiles = ctx.attr.binary[DefaultInfo].data_runfiles...
true
true
1c31bbda924e7db5495072a5358f0e9be6fe68ac
36,308
py
Python
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
7
2018-09-01T18:44:03.000Z
2022-03-05T15:10:47.000Z
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
30
2018-08-17T05:18:52.000Z
2021-02-06T13:43:41.000Z
test/segwit.py
MichaelHDesigns/lunarium
720e8815b8ac775efcdd99423f17337ad96b0e8c
[ "MIT" ]
18
2018-08-15T19:56:15.000Z
2022-02-17T02:14:01.000Z
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test the SegWit changeover logic # from test_framework.test_framework import BitcoinTestFramework from te...
61.538983
203
0.68478
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COutPoint, CTxOut from test_framework.address import script_to_p2sh, key_to_p2pkh from test_framework.script import CScript, OP_HASH160, OP_CHECK...
true
true
1c31bc0db543d1938a9073d536d060604a0f8615
38,282
py
Python
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
1
2021-06-01T12:34:37.000Z
2021-06-01T12:34:37.000Z
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
null
null
null
mindspore/_checkparam.py
ATestGroup233/mindspore
5d81221b5896cf7d7c6adb44daef28d92cb43352
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
40.812367
119
0.61094
import re import inspect import math from enum import Enum from functools import reduce, wraps from itertools import repeat, zip_longest from collections import deque from collections.abc import Iterable import numpy as np from mindspore import log as logger from mindspore.common import dtype as mstype class Rel(Enum...
true
true
1c31bf028ea222d543c043876f5486296c5d330b
769
py
Python
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPythonXmpToolkit(PythonPackage): """Python XMP Toolkit for working with metadata.""" ...
36.619048
95
0.708713
from spack import * class PyPythonXmpToolkit(PythonPackage): homepage = "https://github.com/python-xmp-toolkit/python-xmp-toolkit" pypi = "python-xmp-toolkit/python-xmp-toolkit-2.0.1.tar.gz" version('2.0.1', sha256='f8d912946ff9fd46ed5c7c355aa5d4ea193328b3f200909ef32d9a28a1419a38') depends_on(...
true
true
1c31bf04d83632ae657e52862ea3133cde8a472f
4,081
py
Python
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
null
null
null
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
1
2020-05-16T02:22:36.000Z
2020-05-16T02:22:36.000Z
.venv/Lib/site-packages/docutils/examples.py
sirZer0/Replace
e59ad89c43f901d409215353a7403781fb689c7e
[ "MIT" ]
null
null
null
# $Id: examples.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to c...
30.684211
77
0.684146
from docutils import core, io def html_parts( input_string, source_path=None, destination_path=None, input_encoding="unicode", doctitle=True, initial_header_level=1, ): overrides = { "input_encoding": input_encoding, "doctitle_xform": doctitle, "initial_header_lev...
true
true
1c31bf17913afdeb4bdb573c7ce2766dc07ba73a
5,397
py
Python
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
httpclient.py
Rikyyyyyyyyyy/Rikyyyyyyyyyy-CMPUT404-assignment-web-client-
6cb9604474d833b46dd647b7ad0af4d15e17822f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2016 Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust # # 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 # # ...
30.664773
235
0.593293
# Write your own HTTP GET and POST # The point is to understand what you have to send and get experience with it import sys import socket import re # you may use urllib to encode data appropriately import urllib.parse def help(): print("httpclient.py [GET/POST] [URL]\n") class HTTPResponse(object): def __in...
true
true
1c31bfa0b91d181c179596686bba312a5a272888
567
py
Python
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
opencv-semantic-segmentation/additional_code.py
Gengarrr/RN-nuScenes
00b0909db06439c489e06874f8f7aa1d3d3c9498
[ "Apache-2.0" ]
null
null
null
# loop over each of the individual class IDs in the image for classID in np.unique(classMap): # build a binary mask for the current class and then use the mask # to visualize all pixels in the image belonging to the class print("[INFO] class: {}".format(CLASSES[classID])) classMask = (mask == COLORS[classID]).astyp...
40.5
66
0.731922
for classID in np.unique(classMap): print("[INFO] class: {}".format(CLASSES[classID])) classMask = (mask == COLORS[classID]).astype("uint8") * 255 classMask = classMask[:, :, 0] classOutput = cv2.bitwise_and(image, image, mask=classMask) classMask = np.hstack([image, classOutput]) cv2.imshow("Class Vis", cla...
true
true
1c31c08e34ba376884f8639f325d9d7d97731cba
1,312
py
Python
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
tests/mock_sender.py
Inrixia/pyais
b50fd4d75c687d71b3c70ee939ac9112cfec991e
[ "MIT" ]
null
null
null
import socket import time MESSAGES = [ b"!AIVDM,1,1,,B,133S0:0P00PCsJ:MECBR0gv:0D8N,0*7F", b"!AIVDM,1,1,,A,4h2=a@Quho;O306WMpMIK<Q00826,0*42", b"!AIVDM,1,1,,A,402M3b@000Htt0K0Q0R3T<700t24,0*52", b"!AIVDM,1,1,,A,1>qc9ww000OkfS@MMI5004R60<0B,0*31", b"!AIVDM,1,1,,A,13P<GAh01pwM`GPDdu>T8SDV0@2c,0*7D", ...
32.8
71
0.61128
import socket import time MESSAGES = [ b"!AIVDM,1,1,,B,133S0:0P00PCsJ:MECBR0gv:0D8N,0*7F", b"!AIVDM,1,1,,A,4h2=a@Quho;O306WMpMIK<Q00826,0*42", b"!AIVDM,1,1,,A,402M3b@000Htt0K0Q0R3T<700t24,0*52", b"!AIVDM,1,1,,A,1>qc9ww000OkfS@MMI5004R60<0B,0*31", b"!AIVDM,1,1,,A,13P<GAh01pwM`GPDdu>T8SDV0@2c,0*7D", ...
true
true
1c31c1230e25d2b77a8ade22d528f72fdb565b38
13,113
py
Python
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
306
2021-07-13T10:09:25.000Z
2022-03-28T05:45:08.000Z
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
65
2021-07-14T13:18:25.000Z
2021-11-29T02:37:09.000Z
main.py
imtheohuang/HeytapTask
21607c6d070a87faeb9229c763e87a389ec02eb0
[ "MIT" ]
173
2021-07-13T10:09:27.000Z
2022-03-26T02:31:44.000Z
# -*- coding: utf-8 -*- # @Time : 2021/8/17 # @Author : hwkxk(丶大K丶) # @Email : k@hwkxk.cn import requests,json,time,logging,traceback,os,random,notify,datetime,configparser #用户登录全局变量 client = None session = None #日志基础配置 # 创建一个logger logger = logging.getLogger() logger.setLevel(logging.INFO) # 创建一个handler,用于写入日志...
39.260479
148
0.563487
import requests,json,time,logging,traceback,os,random,notify,datetime,configparser client = None session = None logger = logging.getLogger() logger.setLevel(logging.INFO) fh = logging.FileHandler('./log.txt', mode='a', encoding='utf-8') fh.setFormatter(logging.Formatter("%(message)s")) logger.addHandler(fh) ch = logg...
true
true
1c31c1d12e2620556ec42dcce135fa3807ea0e6f
108
py
Python
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
module1-entry point.py
dronovroman/gh2021
bd01d55b20c02916f28213776224f31bd96ac479
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Aug 20 23:29:59 2021 @author: roman Module 1 - entry point """
12
35
0.601852
true
true
1c31c270461e1b3f25e6ec99f42bacf1c46670f5
17,592
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_images_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.66313
221
0.659277
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.cor...
true
true
1c31c3da9136c83732f112cb3a9388021eb3870c
393
py
Python
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/EXT/texture_mirror_clamp.py
MontyThibault/centre-of-mass-awareness
58778f148e65749e1dfc443043e9fc054ca3ff4d
[ "MIT" ]
null
null
null
'''OpenGL extension EXT.texture_mirror_clamp This module customises the behaviour of the OpenGL.raw.GL.EXT.texture_mirror_clamp to provide a more Python-friendly API ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions, wrapper from OpenGL.GL import glget import ctypes from Open...
32.75
57
0.819338
from OpenGL import platform, constants, constant, arrays from OpenGL import extensions, wrapper from OpenGL.GL import glget import ctypes from OpenGL.raw.GL.EXT.texture_mirror_clamp import *
true
true
1c31c470c48b8e919191977565ad6b3e548938d3
153
py
Python
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
activecollab_digger/apps.py
kingsdigitallab/django-activecollab-digger
508c31eb4a3fe9887aa9d3a86ea160f3bc1e60b0
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class ActivecollabDiggerConfig(AppConfig): name = 'activecollab_digger'
19.125
42
0.823529
from __future__ import unicode_literals from django.apps import AppConfig class ActivecollabDiggerConfig(AppConfig): name = 'activecollab_digger'
true
true
1c31c5189c1a2703669a7843fe0163d5c35cc3c0
370
py
Python
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
null
null
null
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
10
2015-07-14T22:13:25.000Z
2016-07-05T20:25:38.000Z
tests/test_verdict.py
denverpost/trial-results
9d56570658b71c3ac5cfab0abe7979678b432572
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from spreadsheet import Sheet from verdict import Verdict def test_publish(): """ Test publish method. """ sheet = Sheet('test-sheet', 'worksheet-name') publish = Verdict(sheet) publish_value = p...
24.666667
49
0.691892
from __future__ import unicode_literals import pytest from spreadsheet import Sheet from verdict import Verdict def test_publish(): sheet = Sheet('test-sheet', 'worksheet-name') publish = Verdict(sheet) publish_value = publish.publish() assert publish_value == True
true
true
1c31c6199865b682ec556fa6878dcf7a1d7cb9b4
30,617
py
Python
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
1
2020-07-19T11:11:08.000Z
2020-07-19T11:11:08.000Z
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
null
null
null
kontranto_igra/game_logic.py
zd-mioc/Kontranto
928f8e6ca1c8c136878d0dd036321053ab461049
[ "MIT" ]
1
2021-03-01T08:39:41.000Z
2021-03-01T08:39:41.000Z
from kontranto_igra.models import Game, Move from django.core.exceptions import ObjectDoesNotExist from django.core.serializers.json import DjangoJSONEncoder from django.utils import timezone from random import choice import string import json def BlackOrWhite(color): #univerzalna funkcija - moze i kod jednog ...
57.877127
246
0.549727
from kontranto_igra.models import Game, Move from django.core.exceptions import ObjectDoesNotExist from django.core.serializers.json import DjangoJSONEncoder from django.utils import timezone from random import choice import string import json def BlackOrWhite(color): if color == '': return choice...
true
true
1c31c78d0621c40bcec3cdd165869a70fcf880a5
3,092
py
Python
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
null
null
null
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
1
2019-03-29T13:44:53.000Z
2019-03-29T16:17:40.000Z
smamp/convert_UA_to_AA.py
lukaselflein/smamp
2a0a8ce36b16aedd4c6a2bb576ba959061ec4e7e
[ "MIT" ]
null
null
null
""" Change structure with implicit Hydrogen to one with explicitely defined H-atoms. Copyright 2019 Simulation Lab University of Freiburg Author: Johannes Hoermann <johannes.hoermann@imtek.uni-freiburg.de> Modified: Lukas Elflein <elfleinl@cs.uni-freiburg.de> """ import os import ase.io import sys import warnings impo...
36.376471
93
0.67238
import os import ase.io import sys import warnings import numpy as np import parmed as pmd from ase.data import atomic_numbers from ase.neighborlist import NeighborList from matscipy.neighbours import neighbour_list from parmed import gromacs from smamp.insertHbyList import insertHbyList from smamp.tools import find ...
true
true
1c31c799afcd02d00be6c55536e837f3f97b10aa
8,073
py
Python
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
2
2021-07-03T17:02:51.000Z
2021-11-03T09:54:58.000Z
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
null
null
null
agrupar.py
Juane99/Leg-Recognition-CoppeliaSim
dad2ecde9dbc97965fbba07e1eb9d27458bff97b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Juan Emilio Martinez Manjon Asignatura: Programacion Tecnica y Cientifica Profesor: Eugenio Aguirre Molina Curso: 2020/2021 """ # agrupar.py """ Este fichero agrupa los puntos capturados desde el simulador en clusters. Para saber cuantos puntos hay en cada c...
35.721239
110
0.464635
import parametros import json import os from math import sqrt from copy import copy def main(): minimo_puntos = parametros.params.getMinPuntos() maximo_puntos = parametros.params.getMaxPuntos() umbral = parametros.params.getUmbral() numero_cluster = 0 fi...
true
true
1c31c8910abdd3dcc95e5c9b42e51f7b63ab7484
537
py
Python
env/lib/python3.8/site-packages/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs ): super(TemplateitemnameValidator, self...
29.833333
78
0.638734
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs ): super(TemplateitemnameValidator, self...
true
true
1c31c9c604c90a89fb3ae0d97caf87d474ab4172
7,200
py
Python
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
registry/tags.py
ewindisch/docker-registry
c95a344d03381e948336e36d45cda3f7be8002f7
[ "Apache-2.0" ]
null
null
null
import datetime import logging import re import time import flask import simplejson as json import signals import storage import toolkit from .app import app store = storage.load() logger = logging.getLogger(__name__) RE_USER_AGENT = re.compile('([^\s/]+)/([^\s/]+)') @app.route('/v1/repositories/<path:repositor...
34.951456
79
0.663333
import datetime import logging import re import time import flask import simplejson as json import signals import storage import toolkit from .app import app store = storage.load() logger = logging.getLogger(__name__) RE_USER_AGENT = re.compile('([^\s/]+)/([^\s/]+)') @app.route('/v1/repositories/<path:repositor...
true
true
1c31ca05aefdd7ae97611e51466681ff81e8955e
3,133
py
Python
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
project/models/project.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # Project models # --------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modules i...
31.646465
86
0.604532
import operator from threading import Lock from django.db import models import cachetools from noc.core.model.base import NOCModel from noc.core.model.decorator import on_delete_check from noc.core.model.fields import DocumentReferenceField from noc.main.models.glyph import Glyph from noc.main.models.remotesystem im...
true
true
1c31ca10d2ab9cbc594ee3845c8324feabaa2bfe
28,237
py
Python
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
manim/scene/scene.py
mrdon/manim
d023c76cdef915226bb9a1e41c20168959a02881
[ "MIT" ]
null
null
null
"""Basic canvas for animations.""" __all__ = ["Scene"] import inspect import random import warnings import platform import copy from tqdm import tqdm as ProgressDisplay import numpy as np from .. import config, logger from ..animation.animation import Animation, Wait from ..animation.transform import MoveToTarget...
32.234018
94
0.5882
__all__ = ["Scene"] import inspect import random import warnings import platform import copy from tqdm import tqdm as ProgressDisplay import numpy as np from .. import config, logger from ..animation.animation import Animation, Wait from ..animation.transform import MoveToTarget, ApplyMethod from ..camera.camera ...
true
true
1c31ca64a96685a842ffc2ac7f588afc6a361e73
1,303
py
Python
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
phelixdusengimana/django-backend-api-development
ce3b333b383a7d9f5aefb7335cad6be24b5dcf85
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email="phelixdusengimana@gmail.co...
32.575
68
0.638526
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email="phelixdusengimana@gmail.co...
true
true
1c31ca9c4fd078498dab4348fb8d043cf927f485
12,782
py
Python
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
22
2021-05-31T15:14:37.000Z
2022-03-18T06:26:21.000Z
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
3
2021-10-06T09:54:03.000Z
2021-10-13T12:11:53.000Z
fast_knn_nmt/custom_fairseq/train/train.py
Crazy-Chick/fast-knn-nmt
7336bbe0be1240e70d3c3ac71c4e7cfb4f4ea4ff
[ "Apache-2.0" ]
4
2021-06-02T16:12:02.000Z
2022-02-28T12:18:24.000Z
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import argparse import logging import math import os impor...
34.176471
116
0.657174
import argparse import logging import math import os import random import sys import numpy as np import torch from fairseq import ( checkpoint_utils, distributed_utils, options, quantization_utils, tasks, utils, ) from fairseq.data import iterators from fairseq.logging import meters, metrics, ...
true
true
1c31cb13529eef04215d2078b1a571c501de6798
17,719
py
Python
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/apps/reports/standard/project_health.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
import datetime from collections import namedtuple from itertools import chain from django.db.models import Sum from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from dimagi.ext import jsonobject from dimagi.utils.dates import add_mont...
41.016204
136
0.661832
import datetime from collections import namedtuple from itertools import chain from django.db.models import Sum from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from dimagi.ext import jsonobject from dimagi.utils.dates import add_mont...
true
true
1c31cb6a4d7b517d33ce839c490c9a39a16d59f9
2,925
py
Python
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
tle/__main__.py
skittles1412/TLE
a7d7ac399602071bf2c559003466e95862ce2a00
[ "MIT" ]
null
null
null
import argparse import asyncio import distutils.util import logging import os import discord from logging.handlers import TimedRotatingFileHandler from os import environ from pathlib import Path import seaborn as sns from discord.ext import commands from matplotlib import pyplot as plt from tle import constants from ...
31.117021
96
0.668718
import argparse import asyncio import distutils.util import logging import os import discord from logging.handlers import TimedRotatingFileHandler from os import environ from pathlib import Path import seaborn as sns from discord.ext import commands from matplotlib import pyplot as plt from tle import constants from ...
true
true
1c31cd8b355b3554479765522432b64185cead75
6,189
py
Python
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
21
2015-02-09T00:35:17.000Z
2021-12-14T16:41:05.000Z
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
672
2015-01-29T18:10:56.000Z
2022-03-24T13:04:51.000Z
emission/storage/decorations/place_queries.py
trevor-wu/e-mission-server
2e31986bd7c0faab7110b7eb69541b0b9eac62df
[ "BSD-3-Clause" ]
110
2015-01-29T18:11:10.000Z
2022-03-29T17:58:14.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.get_database as edb import emission.core...
46.886364
94
0.630473
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.get_database as edb import emission.core...
true
true
1c31ce27baf51df5e89dd769ec2e22576991ccaf
4,007
py
Python
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
tests/test_sbm.py
jernsting/nxt_gem
407af32250ab00aa17c54729cf0483adc0f8a658
[ "BSD-3-Clause" ]
null
null
null
""" Run the graph embedding methods on Karate graph and evaluate them on graph reconstruction and visualization. Please copy the gem/data/karate.edgelist to the working directory """ import os.path import unittest import networkx as nx import pickle import numpy as np from gem.embedding.gf import GraphFactorization f...
42.178947
119
0.649114
import os.path import unittest import networkx as nx import pickle import numpy as np from gem.embedding.gf import GraphFactorization from gem.embedding.hope import HOPE from gem.embedding.lap import LaplacianEigenmaps from gem.embedding.lle import LocallyLinearEmbedding from gem.embedding.node2vec import node2vec fr...
true
true
1c31d05f59c5c18d4835128551f94b0b2b968c51
493
py
Python
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
comments/migrations/0011_auto_20210702_2215.py
montukv/CommentAPI
3158f5b40cb21f192f292a3f3caae71d9f5d9020
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-02 16:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0010_auto_20210702_2058'), ] operations = [ migrations.RenameField( model_name='page', old_name='id', ...
20.541667
48
0.545639
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comments', '0010_auto_20210702_2058'), ] operations = [ migrations.RenameField( model_name='page', old_name='id', new_name='idno', ), migrations...
true
true
1c31d17673c7ffdca7d04acaf3793863f9f7516d
20,646
py
Python
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
1
2022-03-19T06:11:03.000Z
2022-03-19T06:11:03.000Z
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
1
2020-05-24T17:04:47.000Z
2020-05-24T17:04:47.000Z
src/prefect/agent/ecs/agent.py
jspeis/prefect
61154b21d2eaac21b7a597b6e9b63377ffffcb9a
[ "Apache-2.0" ]
null
null
null
import os from copy import deepcopy from typing import Iterable, Dict, Optional, Any import slugify import yaml from prefect import config from prefect.agent import Agent from prefect.run_configs import ECSRun from prefect.utilities.agent import get_flow_image, get_flow_run_command from prefect.utilities.filesystems ...
39.476099
98
0.608108
import os from copy import deepcopy from typing import Iterable, Dict, Optional, Any import slugify import yaml from prefect import config from prefect.agent import Agent from prefect.run_configs import ECSRun from prefect.utilities.agent import get_flow_image, get_flow_run_command from prefect.utilities.filesystems ...
true
true
1c31d3cee567475068402dd59b3d0cd44159485b
2,933
py
Python
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
students/models.py
harshalgalgale/alumni
52d8ecb8186abe5659f28a6555c069ec96f25269
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models # Create your models here. GENDER = [ ('M', 'Male'), ('F', 'Female'), ] DEGREE = [ ('btech', 'B.Tech'), ('mtech', 'M.Tech'), ('phd', 'PhD'), ] DEPARTMENT = [ ('ape...
38.090909
116
0.637572
from datetime import datetime from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models GENDER = [ ('M', 'Male'), ('F', 'Female'), ] DEGREE = [ ('btech', 'B.Tech'), ('mtech', 'M.Tech'), ('phd', 'PhD'), ] DEPARTMENT = [ ('ape', 'APE'), ('fmp', 'FMP...
true
true
1c31d430e14dd7191000e06cc94f70c42c3a4692
8,852
py
Python
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
16
2021-07-09T00:20:31.000Z
2022-02-17T19:29:26.000Z
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
62
2021-07-21T03:42:09.000Z
2022-03-18T09:08:20.000Z
pyzscaler/zpa/app_segments.py
mitchos/pyZscaler
c4c83345bf26e2883b9555d20a90f9387a45e05e
[ "MIT" ]
8
2021-09-11T08:14:53.000Z
2022-03-25T20:14:41.000Z
from box import Box, BoxList from restfly.endpoint import APIEndpoint from pyzscaler.utils import Iterator, add_id_groups, convert_keys, snake_to_camel class AppSegmentsAPI(APIEndpoint): # Params that need reformatting reformat_params = [ ("clientless_app_ids", "clientlessApps"), ("server_gro...
38.995595
115
0.585969
from box import Box, BoxList from restfly.endpoint import APIEndpoint from pyzscaler.utils import Iterator, add_id_groups, convert_keys, snake_to_camel class AppSegmentsAPI(APIEndpoint): reformat_params = [ ("clientless_app_ids", "clientlessApps"), ("server_group_ids", "serverGroups"), ] ...
true
true
1c31d499886ee8af2326cc361c43981590242571
215
py
Python
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
1
2020-12-24T04:52:06.000Z
2020-12-24T04:52:06.000Z
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
null
null
null
genome/genome/doctype/diseases/test_diseases.py
Havenir/genome
249469e7743af7cab05938c13c2fbc1576b75233
[ "MIT" ]
4
2020-09-17T06:05:31.000Z
2021-03-04T06:23:40.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Accurate Systems and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestDiseases(unittest.TestCase): pass
19.545455
55
0.772093
from __future__ import unicode_literals import frappe import unittest class TestDiseases(unittest.TestCase): pass
true
true
1c31d63a94965d0f41ae0edd1005c4fcf1cd168f
814
py
Python
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
null
null
null
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
null
null
null
internal/deprecated/internal/preprocessing/patch_preprocess.py
lucasace/caer
e077a81e8d5bb3d38039ff9289a93996b1133411
[ "MIT" ]
1
2021-01-01T10:37:55.000Z
2021-01-01T10:37:55.000Z
# _____ ______ _____ # / ____/ /\ | ____ | __ \ # | | / \ | |__ | |__) | Caer - Modern Computer Vision # | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda # | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer # \_____\/_/ \_ \______ |_| \_\ # Lic...
30.148148
85
0.593366
from ._patches import extract_patches_2d __all__ = [ 'PatchPreprocess' ] class PatchPreprocess: def __init__(self, width, height): self.width = width self.height = height def patch_preprocess(self, image): return extract_patches_2d(image, (self.height, self.width), max_patche...
true
true
1c31d678f356b6d1601126ce5cbf097e2f52d9ea
4,956
py
Python
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
4
2020-11-25T12:51:46.000Z
2022-03-23T15:58:08.000Z
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
null
null
null
be/.metadata/.plugins/org.eclipse.wildwebdeveloper.embedder.node/node-v14.15.4-win-x64/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
parksey/-
9d68e32781e4880f7c7230831908e3a208fc1751
[ "MIT" ]
1
2020-11-25T12:51:49.000Z
2020-11-25T12:51:49.000Z
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Pretty-prints the contents of a GYP file.""" from __future__ import print_function import sys import re # Regex to remo...
31.367089
81
0.624496
from __future__ import print_function import sys import re COMMENT_RE = re.compile(r'\s* # Regex to remove quoted strings when we're counting braces. QUOTE_RE_STR = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)' QUOTE_RE = re.compile(QUOTE_RE_STR) def comment_replace(matchobj): return matchobj.group...
true
true
1c31d7df3aa58c7a4c130b8a6891261ed6481aed
522
py
Python
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
null
null
null
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
null
null
null
launch.py
fanzhe98/FaceRecoCamera
3a5b5018e26e07a98036ca12e79d263e23e154f8
[ "MIT" ]
1
2018-10-20T02:09:45.000Z
2018-10-20T02:09:45.000Z
from flask import Flask, render_template import os app = Flask(__name__) @app.route("/") def hello(): DIRECTORY = "../yilun/static/Portrait/" nameList = [] pathList = [] for f in os.listdir(DIRECTORY): if os.path.splitext(f)[1].lower() in ('.jpg', '.jpeg'): nameList.append(f.spl...
23.727273
74
0.595785
from flask import Flask, render_template import os app = Flask(__name__) @app.route("/") def hello(): DIRECTORY = "../yilun/static/Portrait/" nameList = [] pathList = [] for f in os.listdir(DIRECTORY): if os.path.splitext(f)[1].lower() in ('.jpg', '.jpeg'): nameList.append(f.spl...
true
true
1c31d870a381eeddacc43630762e03a91786e791
1,980
py
Python
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
117
2019-01-21T09:40:26.000Z
2022-01-19T10:04:09.000Z
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
28
2019-01-21T15:26:41.000Z
2021-04-12T22:13:01.000Z
tests/test_frequency.py
kyokley/git-hammer
e72aa0f8cee4ab5b30ba2502be936660c1385854
[ "Apache-2.0" ]
6
2019-05-12T07:03:23.000Z
2020-04-29T06:17:14.000Z
import datetime import unittest from githammer import Frequency class FrequencyTest(unittest.TestCase): def setUp(self) -> None: print() print(self.id()) self.initial_date = datetime.datetime(2019, 10, 10, 10, 10, 10, tzinfo=datetime.timezone.utc) self.year_start_date = datetime.d...
58.235294
104
0.664646
import datetime import unittest from githammer import Frequency class FrequencyTest(unittest.TestCase): def setUp(self) -> None: print() print(self.id()) self.initial_date = datetime.datetime(2019, 10, 10, 10, 10, 10, tzinfo=datetime.timezone.utc) self.year_start_date = datetime.d...
true
true
1c31d8afda384495bd9a283d63ddb431e592d18f
157
py
Python
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
1
2021-07-07T00:51:19.000Z
2021-07-07T00:51:19.000Z
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
null
null
null
mdpreview/util.py
kevr/vim-mdpreview
c6b0baeeacfceb279e1323307095c0c2f9d2de8d
[ "MIT" ]
null
null
null
import os home = os.environ.get("HOME") share = os.environ.get("MDPREVIEW_PATH", os.path.join(home, ".local", "share", "mdpreview"))
26.166667
74
0.585987
import os home = os.environ.get("HOME") share = os.environ.get("MDPREVIEW_PATH", os.path.join(home, ".local", "share", "mdpreview"))
true
true
1c31db7e429a217f515b4d7c307a3c801a19678c
4,746
py
Python
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
3
2020-02-12T01:24:46.000Z
2020-02-13T00:50:46.000Z
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
32
2020-02-20T10:20:56.000Z
2022-02-10T01:42:46.000Z
src/executor/SegmentSplitter.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
1
2020-02-22T02:47:19.000Z
2020-02-22T02:47:19.000Z
from ..data.VideoItem import VideoItem from ..data.VideoFile import VideoFile from .iExecutor import iExecutor from ..signals.SkipSignal import SkipSignal import re import numpy as np class SegmentSplitter(iExecutor): def __init__(self, *parents, clip_length='5s', length_threshold='3s'): super().__init__(*...
40.913793
108
0.578592
from ..data.VideoItem import VideoItem from ..data.VideoFile import VideoFile from .iExecutor import iExecutor from ..signals.SkipSignal import SkipSignal import re import numpy as np class SegmentSplitter(iExecutor): def __init__(self, *parents, clip_length='5s', length_threshold='3s'): super().__init__(*...
true
true
1c31dbe58f6a8b1be16852af637bf05ffbc5739f
1,277
py
Python
lizard_ext/lizardcpre.py
BjrnJhsn/lizard
5c3f02b67f72f70f4dbdbd2e97249e0ec20d40fa
[ "MIT" ]
1,255
2015-01-07T20:24:45.000Z
2022-03-31T02:39:50.000Z
lizard_ext/lizardcpre.py
BjrnJhsn/lizard
5c3f02b67f72f70f4dbdbd2e97249e0ec20d40fa
[ "MIT" ]
293
2015-01-05T14:31:16.000Z
2022-03-24T18:12:16.000Z
lizard_ext/lizardcpre.py
sider/lizard
61ad3c1f9989280dfd4157c337e70e08174f7c34
[ "MIT" ]
217
2015-01-07T20:24:49.000Z
2022-03-30T19:20:21.000Z
''' This is an extension of lizard, It helps to deal with C code with preprocessors that is hard to parse. It works by always ignoring the code between #else and #end. ''' class LizardExtension(object): # pylint: disable=R0903 ordering_index = 0 def __call__(self, tokens, reader): def preprocess_to...
33.605263
73
0.477682
class LizardExtension(object): ordering_index = 0 def __call__(self, tokens, reader): def preprocess_tokens(tokens): else_count = 0 if_stack = [] for token in tokens: if token.startswith("#"): if_stack.append(token) ...
true
true
1c31dbec8103bddf1a2f3fe3c553d38c7d083aa5
4,020
py
Python
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
src/si/util/im2col.py
Joao16am/si
813ca373022fc5ee35eac69147b5567275718b46
[ "Apache-2.0" ]
null
null
null
import numpy as np def calc_pad_dims_2D(X_shape, out_dim, kernel_shape, stride): if not isinstance(X_shape, tuple): raise ValueError("`X_shape` must be of type tuple") if not isinstance(out_dim, tuple): raise ValueError("`out_dim` must be of type tuple") if not isinstance(kernel_shape, t...
30
81
0.574129
import numpy as np def calc_pad_dims_2D(X_shape, out_dim, kernel_shape, stride): if not isinstance(X_shape, tuple): raise ValueError("`X_shape` must be of type tuple") if not isinstance(out_dim, tuple): raise ValueError("`out_dim` must be of type tuple") if not isinstance(kernel_shape, t...
true
true
1c31dc1b2b97667d440a1d991f7121cb424b7e94
921
py
Python
research/clustering/lossy_short_deck.py
keithlee96/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
113
2020-08-06T15:03:18.000Z
2022-03-31T01:56:34.000Z
research/clustering/lossy_short_deck.py
jumbokun/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
null
null
null
research/clustering/lossy_short_deck.py
jumbokun/pluribus-poker-AI
15e52fe73dd09570e782dd0e7b9069865eb5823d
[ "MIT" ]
42
2020-08-17T15:51:30.000Z
2022-03-31T17:10:44.000Z
""" Simple script for converting card combos and clusters into a dictionary where a tuple of cards are the keys and the cluster id is the value Cd into clustering to run, it will attempt to drop off files in clustering/data """ import dill as pickle from tqdm import tqdm with open("data/information_abstraction.pkl"...
35.423077
107
0.652552
import dill as pickle from tqdm import tqdm with open("data/information_abstraction.pkl", "rb") as file: data = pickle.load(file) if __name__ == "__main__": rounds = ["flop", "turn", "river"] for round in rounds: print(f"Getting indices for {round}") card_combos = data[round] clust...
true
true
1c31dc2bad37aea0744fcab5ba2f10c4bd5e2092
3,820
py
Python
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
history.py
SWang848/DCRAC
695d83063cf484cd54d7744c8c719fde94c3cde5
[ "Apache-2.0" ]
null
null
null
import numpy as np import time import cv2 try: from PIL import Image except: import Image from utils import * class History(): """ Manages frame history """ def __init__(self, length, im_shape, nb_action): """ Args: length: How many frames should be st...
33.217391
109
0.590052
import numpy as np import time import cv2 try: from PIL import Image except: import Image from utils import * class History(): def __init__(self, length, im_shape, nb_action): if len(im_shape) == 3: self.im_shape = im_shape self.black_and_white = True if im_shape...
true
true
1c31dd354d5a42d55075a5ccdd336af3ea50688c
456
py
Python
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
CRM_project/accounts/urls.py
rzhvn1/Military_CRM
64856ebba988453148c0360d1e6f73cd0950f9e5
[ "MIT" ]
null
null
null
from django.urls import path, include from .views import * from rest_framework.routers import DefaultRouter router = DefaultRouter() # router.register('dossier', DossierModelViewSet, basename='dossier') router.register('register', RegisterViewSet, basename="register") urlpatterns = [ path('', include(router.urls)...
35.076923
69
0.741228
from django.urls import path, include from .views import * from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register('register', RegisterViewSet, basename="register") urlpatterns = [ path('', include(router.urls)), path('login/', AuthView.as_view(), name="authorization"), p...
true
true
1c31dd3666a6e69efaca05e0c7374cf000e8afd4
4,336
py
Python
tests/primitives.py
plotdevice/plotdevice
598f66a19cd58b8cfea8295024998b322ed66adf
[ "MIT" ]
110
2015-01-17T03:22:51.000Z
2022-02-12T06:04:27.000Z
tests/primitives.py
Jason-Cooke/plotdevice
598f66a19cd58b8cfea8295024998b322ed66adf
[ "MIT" ]
38
2015-01-02T01:06:59.000Z
2021-10-05T06:34:42.000Z
tests/primitives.py
Jason-Cooke/plotdevice
598f66a19cd58b8cfea8295024998b322ed66adf
[ "MIT" ]
17
2015-04-28T17:29:03.000Z
2021-07-11T21:26:25.000Z
# encoding: utf-8 import unittest from . import PlotDeviceTestCase, reference from plotdevice import * class PrimitivesTests(PlotDeviceTestCase): @reference('primitives/primitives-arc.png') def test_primitives_arc(self): # tut/Primitives (1) size(150, 75) arc(75,25, 25) @reference(...
26.278788
52
0.573801
import unittest from . import PlotDeviceTestCase, reference from plotdevice import * class PrimitivesTests(PlotDeviceTestCase): @reference('primitives/primitives-arc.png') def test_primitives_arc(self): size(150, 75) arc(75,25, 25) @reference('primitives/primitives-square.png') ...
true
true
1c31dd6a0b4063761667a82dffffdd16b7808469
333
py
Python
foreshadow/concrete/__init__.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
25
2018-07-26T17:30:31.000Z
2021-02-23T22:54:01.000Z
foreshadow/concrete/__init__.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
150
2018-11-02T18:09:12.000Z
2020-05-15T01:01:35.000Z
foreshadow/concrete/__init__.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
1
2019-02-20T22:24:00.000Z
2019-02-20T22:24:00.000Z
"""All the concrete transformers provided by foreshadow.""" from foreshadow.concrete.externals import * # noqa: F403, F401 from foreshadow.concrete.externals import __all__ as e_all from foreshadow.concrete.internals import * # noqa: F403, F401 from foreshadow.concrete.internals import __all__ as i_all __all__ = i...
33.3
63
0.78979
from foreshadow.concrete.externals import * from foreshadow.concrete.externals import __all__ as e_all from foreshadow.concrete.internals import * from foreshadow.concrete.internals import __all__ as i_all __all__ = i_all + e_all
true
true
1c31dd8a5d1d70e3cb9aa10c601dc19b9d8805e7
1,564
py
Python
flexget/components/bittorrent/magnet_info_hash.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
flexget/components/bittorrent/magnet_info_hash.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
1
2017-10-09T23:06:44.000Z
2017-10-09T23:06:44.000Z
flexget/components/bittorrent/magnet_info_hash.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import base64 import re from flexget import plugin from flexget.event import event log = logging.getLogger('magnet_btih') class MagnetBtih(object): "...
35.545455
91
0.582481
from __future__ import unicode_literals, division, absolute_import from builtins import * import logging import base64 import re from flexget import plugin from flexget.event import event log = logging.getLogger('magnet_btih') class MagnetBtih(object): schema = {'type': 'boolean'} def on_task_metainfo(s...
true
true
1c31df6c495e7182d04ca6e28ef9d3d06610c7dd
15,222
py
Python
src/sage/schemes/toric/ideal.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/toric/ideal.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/toric/ideal.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
r""" Toric ideals A toric ideal (associated to an integer matrix `A`) is an ideal of the form .. MATH:: I_A = \left< x^u - x^v : u,v \in \ZZ_\geq^n , u-v \in \ker(A) \right> In other words, it is an ideal generated by irreducible "binomials", that is, differences of monomials wit...
32.87689
100
0.549074
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.misc.misc_c import prod from sage.matrix.constructor import matrix from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal class ...
true
true
1c31e113234907191663c0d92055af47b297a82a
4,808
py
Python
utils.py
Wendy-Xiao/ext_summ_disco_tree_attn
5ff99c8260350c677e140b02521c75ac03d16673
[ "MIT" ]
6
2020-11-14T04:31:31.000Z
2021-12-31T02:18:56.000Z
utils.py
Wendy-Xiao/ext_summ_disco_tree_attn
5ff99c8260350c677e140b02521c75ac03d16673
[ "MIT" ]
1
2020-12-16T07:08:11.000Z
2020-12-16T19:46:29.000Z
utils.py
Wendy-Xiao/ext_summ_disco_tree_attn
5ff99c8260350c677e140b02521c75ac03d16673
[ "MIT" ]
1
2022-02-16T13:12:56.000Z
2022-02-16T13:12:56.000Z
from collections import Counter from pathlib import Path from random import random import rouge_papier_v2 import pandas as pd import re import numpy as np import os import json import torch import os import subprocess # import matplotlib.pyplot as plt # Utility functions def get_posweight(inputs_dir): inputs_dir = P...
35.614815
119
0.720674
from collections import Counter from pathlib import Path from random import random import rouge_papier_v2 import pandas as pd import re import numpy as np import os import json import torch import os import subprocess def get_posweight(inputs_dir): inputs_dir = Path(inputs_dir) all_files = [path for path in inputs_...
true
true
1c31e28c29cf19ed0c6c02d83971db1f3eb61dc1
3,107
py
Python
tests/unit/scenarios/ironic/test_nodes.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
tests/unit/scenarios/ironic/test_nodes.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
tests/unit/scenarios/ironic/test_nodes.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
1
2018-12-10T12:31:27.000Z
2018-12-10T12:31:27.000Z
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
37.890244
79
0.635661
import mock from rally import exceptions from rally_openstack.scenarios.ironic import nodes from tests.unit import test class IronicNodesTestCase(test.ScenarioTestCase): def test_create_and_list_node(self): class Node(object): def __init__(self, name): self.name = name ...
true
true
1c31e295e8c14d94e58e8f3701d4b9e685c4ce8f
486
py
Python
django-loaders/loaders/migrations/0003_auto_20171211_2042.py
nabbisen/python-django2-tutorials
c6fd75366587f936e22293e02e1c1c1e374adf2a
[ "MIT" ]
null
null
null
django-loaders/loaders/migrations/0003_auto_20171211_2042.py
nabbisen/python-django2-tutorials
c6fd75366587f936e22293e02e1c1c1e374adf2a
[ "MIT" ]
null
null
null
django-loaders/loaders/migrations/0003_auto_20171211_2042.py
nabbisen/python-django2-tutorials
c6fd75366587f936e22293e02e1c1c1e374adf2a
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2017-12-11 11:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('loaders', '0002_auto_20171211_1732'), ] operations = [ migrations.AlterField( model_name='agency'...
24.3
110
0.652263
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('loaders', '0002_auto_20171211_1732'), ] operations = [ migrations.AlterField( model_name='agency', name='commission_form', ...
true
true
1c31e2a3e3db553efe6f011e3997b03fa5efba1c
1,180
py
Python
tests/test_cli_serve_server.py
mwatts/datasette
8c401ee0f054de2f568c3a8302c9223555146407
[ "Apache-2.0" ]
5,978
2017-11-13T21:59:52.000Z
2022-03-31T12:10:42.000Z
tests/test_cli_serve_server.py
mwatts/datasette
8c401ee0f054de2f568c3a8302c9223555146407
[ "Apache-2.0" ]
1,482
2017-11-13T21:19:43.000Z
2022-03-31T07:45:26.000Z
tests/test_cli_serve_server.py
mwatts/datasette
8c401ee0f054de2f568c3a8302c9223555146407
[ "Apache-2.0" ]
439
2017-11-13T22:03:30.000Z
2022-03-30T08:00:39.000Z
import httpx import pytest import socket @pytest.mark.serial def test_serve_localhost_http(ds_localhost_http_server): response = httpx.get("http://localhost:8041/_memory.json") assert { "database": "_memory", "path": "/_memory", "tables": [], }.items() <= response.json().items() ...
28.780488
83
0.666102
import httpx import pytest import socket @pytest.mark.serial def test_serve_localhost_http(ds_localhost_http_server): response = httpx.get("http://localhost:8041/_memory.json") assert { "database": "_memory", "path": "/_memory", "tables": [], }.items() <= response.json().items() ...
true
true
1c31e2b3fe42291dc91cfb70aee5b32968fa8ba2
70,017
py
Python
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
stefanb995/azure-cli
d1c0c406d3ec42e496770fc3f81f53de06e4b18c
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
stefanb995/azure-cli
d1c0c406d3ec42e496770fc3f81f53de06e4b18c
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
stefanb995/azure-cli
d1c0c406d3ec42e496770fc3f81f53de06e4b18c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
39.006685
329
0.707185
from knack.help_files import helps helps['disk'] = """ type: group short-summary: Manage Azure Managed Disks. long-summary: >4 Azure Virtual Machines use disks as a place to store an operating system, applications, and data. All Azure virtual machines have at least two disks: An operating system disk, and a ...
true
true
1c31e33a225d329db4b0d6e1fde6090b3aa90df9
881
py
Python
back/depends/user.py
Bash-Air/bashair
76d07c0cca9323f5089d0c49450470bde887c4ea
[ "MIT" ]
null
null
null
back/depends/user.py
Bash-Air/bashair
76d07c0cca9323f5089d0c49450470bde887c4ea
[ "MIT" ]
null
null
null
back/depends/user.py
Bash-Air/bashair
76d07c0cca9323f5089d0c49450470bde887c4ea
[ "MIT" ]
1
2022-02-14T11:27:50.000Z
2022-02-14T11:27:50.000Z
from django.contrib.auth.models import User from fastapi import Depends, HTTPException from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials from fastapi_jwt_auth import AuthJWT from jose import JWTError from back.utils.exceptions import Credentials def get_current_user(auth: AuthJWT = Depends(), cre...
31.464286
115
0.750284
from django.contrib.auth.models import User from fastapi import Depends, HTTPException from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials from fastapi_jwt_auth import AuthJWT from jose import JWTError from back.utils.exceptions import Credentials def get_current_user(auth: AuthJWT = Depends(), cre...
true
true
1c31e3562725a00bab24cf0a53bf3d7bbc8ab967
32,836
py
Python
djangosaml2/tests/__init__.py
yvess/djangosaml2
5561d114c8721abde6d7b9967e9cc36732bcfb9d
[ "Apache-2.0" ]
2
2021-04-23T09:16:15.000Z
2021-06-14T14:35:49.000Z
djangosaml2/tests/__init__.py
yvess/djangosaml2
5561d114c8721abde6d7b9967e9cc36732bcfb9d
[ "Apache-2.0" ]
1
2018-11-26T17:02:54.000Z
2018-11-26T17:02:54.000Z
djangosaml2/tests/__init__.py
yvess/djangosaml2
5561d114c8721abde6d7b9967e9cc36732bcfb9d
[ "Apache-2.0" ]
1
2018-04-23T15:17:32.000Z
2018-04-23T15:17:32.000Z
# Copyright (C) 2012 Sam Bull (lsb@pocketuniverse.ca) # Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es) # Copyright (C) 2010 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
58.116814
1,852
0.701578
import datetime import base64 import re from unittest import skip import sys from django.conf import settings from django.contrib.auth import SESSION_KEY, get_user_model from django.contrib.auth.models import AnonymousUser from django.contrib.sessions.middleware import SessionMiddleware try: from django.urls impo...
true
true
1c31e595cdd83f4d43facb3e59e7e4944fd03f64
6,572
py
Python
continuous_delivery_scripts/plugins/golang.py
ARMmbed/continuous-delivery-scripts
3df724ae5705c675261349ecd3ac38b0781c1d65
[ "Apache-2.0" ]
2
2021-09-10T14:01:24.000Z
2022-02-08T10:21:27.000Z
continuous_delivery_scripts/plugins/golang.py
acabarbaye/continuous-delivery-scripts-1
3df724ae5705c675261349ecd3ac38b0781c1d65
[ "Apache-2.0" ]
29
2020-11-30T10:02:57.000Z
2022-03-29T06:14:54.000Z
continuous_delivery_scripts/plugins/golang.py
acabarbaye/continuous-delivery-scripts-1
3df724ae5705c675261349ecd3ac38b0781c1d65
[ "Apache-2.0" ]
1
2021-09-10T14:01:38.000Z
2021-09-10T14:01:38.000Z
# # Copyright (C) 2020-2021 Arm Limited or its affiliates and Contributors. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # """Plugin for Golang projects.""" import logging import os from pathlib import Path from typing import Optional, List from subprocess import check_call from continuous_delivery_script...
38.209302
113
0.706939
import logging import os from pathlib import Path from typing import Optional, List from subprocess import check_call from continuous_delivery_scripts.utils.language_specifics_base import BaseLanguage, get_language_from_file_name from continuous_delivery_scripts.spdx_report.spdx_project import SpdxProject from continuo...
true
true
1c31e59cfa13f341e8e9d09d9ddc476b52177ea9
7,442
py
Python
ml-agents/mlagents/trainers/tests/test_simple_rl.py
robertnoneman/ml-agents
797b0e880f4db61ab36783357bf555621affce2a
[ "Apache-2.0" ]
1
2019-01-20T19:57:46.000Z
2019-01-20T19:57:46.000Z
ml-agents/mlagents/trainers/tests/test_simple_rl.py
ruairidhcumming/ml-agents
d4205fed06b5ac5c2cac6c594bbd25dfe128103f
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/trainers/tests/test_simple_rl.py
ruairidhcumming/ml-agents
d4205fed06b5ac5c2cac6c594bbd25dfe128103f
[ "Apache-2.0" ]
null
null
null
import math import random import tempfile import pytest import yaml from typing import Any, Dict from mlagents.trainers.trainer_controller import TrainerController from mlagents.trainers.trainer_util import TrainerFactory from mlagents.envs.base_unity_environment import BaseUnityEnvironment from mlagents.envs.brain i...
29.41502
119
0.619323
import math import random import tempfile import pytest import yaml from typing import Any, Dict from mlagents.trainers.trainer_controller import TrainerController from mlagents.trainers.trainer_util import TrainerFactory from mlagents.envs.base_unity_environment import BaseUnityEnvironment from mlagents.envs.brain i...
true
true
1c31e777172d3840499c8f68ec880d29b6f62b21
1,307
py
Python
.github/scripts/build_assets/util.py
eldadfux/devicon
6a98c2349c7f8f7eb2ac4547c1cb95b3120d0005
[ "MIT" ]
null
null
null
.github/scripts/build_assets/util.py
eldadfux/devicon
6a98c2349c7f8f7eb2ac4547c1cb95b3120d0005
[ "MIT" ]
null
null
null
.github/scripts/build_assets/util.py
eldadfux/devicon
6a98c2349c7f8f7eb2ac4547c1cb95b3120d0005
[ "MIT" ]
null
null
null
from pathlib import Path from argparse import ArgumentParser from build_assets.PathResolverAction import PathResolverAction def get_commandline_args(): parser = ArgumentParser(description="Upload svgs to Icomoon to create icon files.") parser.add_argument("--headless", help="Whether to...
39.606061
102
0.614384
from pathlib import Path from argparse import ArgumentParser from build_assets.PathResolverAction import PathResolverAction def get_commandline_args(): parser = ArgumentParser(description="Upload svgs to Icomoon to create icon files.") parser.add_argument("--headless", help="Whether to...
true
true
1c31e8071a530c20a30e496539b63456f9d6a8c9
833
py
Python
computation_migration/distComputing/distComputing/urls.py
mengyingzhou/ipv6_firewall_computation_migration
3fbc1f910e1fffdf2d5bb25eed631dffc6d7d842
[ "MIT" ]
null
null
null
computation_migration/distComputing/distComputing/urls.py
mengyingzhou/ipv6_firewall_computation_migration
3fbc1f910e1fffdf2d5bb25eed631dffc6d7d842
[ "MIT" ]
null
null
null
computation_migration/distComputing/distComputing/urls.py
mengyingzhou/ipv6_firewall_computation_migration
3fbc1f910e1fffdf2d5bb25eed631dffc6d7d842
[ "MIT" ]
null
null
null
"""distComputing URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home'...
36.217391
78
0.687875
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('imgProc/', include('imgProc.urls')), path('admin/', admin.site.urls), ]
true
true
1c31e879297ecc47e67cac0d04f8704694e52b60
3,478
py
Python
examples/vn_trader/run.py
JonnyORZ/vnpy
c3bb624d95625412a2dd593326abf3833321d2e2
[ "MIT" ]
11
2019-11-18T06:07:16.000Z
2020-10-12T11:36:21.000Z
examples/vn_trader/run.py
dovnekai/vnpy
222475fdf97f77f60cec4ecee231f1b85f44df21
[ "MIT" ]
2
2019-07-17T09:39:34.000Z
2019-10-19T16:21:55.000Z
examples/vn_trader/run.py
dovnekai/vnpy
222475fdf97f77f60cec4ecee231f1b85f44df21
[ "MIT" ]
6
2019-10-30T14:52:21.000Z
2021-01-11T05:41:17.000Z
# flake8: noqa from vnpy.event import EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import MainWindow, create_qapp # from vnpy.gateway.binance import BinanceGateway from vnpy.gateway.bitmex import BitmexGateway # from vnpy.gateway.futu import FutuGateway # from vnpy.gateway.ib import IbGat...
36.229167
55
0.797297
from vnpy.event import EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import MainWindow, create_qapp from vnpy.gateway.bitmex import BitmexGateway from vnpy.gateway.bitfinex import BitfinexGateway from vnpy.gateway.okexf import OkexfGateway from vnpy.gateway.okexs import OkexsGateway from v...
true
true
1c31e8eafc6d1dc8ae142df00cc0a77b3b1bfb28
2,284
py
Python
tests/test_ext_graphviz.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
tests/test_ext_graphviz.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
tests/test_ext_graphviz.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test_ext_graphviz ~~~~~~~~~~~~~~~~~ Test sphinx.ext.graphviz extension. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pytest @pytest.mark.sphinx('html', testroot='ext-graphviz') @pytest....
34.606061
86
0.613398
import re import pytest @pytest.mark.sphinx('html', testroot='ext-graphviz') @pytest.mark.usefixtures('if_graphviz_found') def test_graphviz_html(app, status, warning): app.builder.build_all() content = (app.outdir / 'index.html').text() html = (r'<div class="figure" .*?>\s*<img .*?/>\s*<p class="capti...
true
true
1c31eaa2cf359f1c2f09be374a8e93c2bb06a001
41,569
py
Python
turfpy/measurement.py
synapticarbors/turfpy
fc25954354f08c4d326aea6303314962ee97688c
[ "MIT" ]
null
null
null
turfpy/measurement.py
synapticarbors/turfpy
fc25954354f08c4d326aea6303314962ee97688c
[ "MIT" ]
null
null
null
turfpy/measurement.py
synapticarbors/turfpy
fc25954354f08c4d326aea6303314962ee97688c
[ "MIT" ]
null
null
null
""" This module implements some of the spatial analysis techniques and processes used to understand the patterns and relationships of geographic features. This is mainly inspired by turf.js. link: http://turfjs.org/ """ from math import asin, atan2, cos, degrees, log, pi, pow, radians, sin, sqrt, tan from typing import...
31.161169
139
0.587722
from math import asin, atan2, cos, degrees, log, pi, pow, radians, sin, sqrt, tan from typing import Optional, Union from geojson import ( Feature, FeatureCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, ) from turfpy.helper import ( avg_earth_radi...
true
true
1c31eaa39d0ff84ca5d659ef2cfbd15c184a0b91
32,188
py
Python
release/scripts/modules/bpy_types.py
arubertoson/blender
9d3550d7819807064dd39365322295ebd8ea0a09
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-09-23T21:30:18.000Z
2020-09-23T21:30:18.000Z
release/scripts/modules/bpy_types.py
arubertoson/blender
9d3550d7819807064dd39365322295ebd8ea0a09
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/modules/bpy_types.py
arubertoson/blender
9d3550d7819807064dd39365322295ebd8ea0a09
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
30.42344
106
0.591929
from _bpy import types as bpy_types import _bpy StructRNA = bpy_types.bpy_struct StructMetaPropGroup = bpy_types.bpy_struct_meta_idprop class Context(StructRNA): __slots__ = () def copy(self): from types import BuiltinMethodType new_context = {} generic_attrs = ( *Struc...
true
true
1c31eb7da047e246ff8503a95a8181e5e53cb3d3
102
py
Python
utils/__init__.py
rizwan09/Tagger
7622f10561a0f6074abde0c9c26a4f25405b204b
[ "BSD-3-Clause" ]
null
null
null
utils/__init__.py
rizwan09/Tagger
7622f10561a0f6074abde0c9c26a4f25405b204b
[ "BSD-3-Clause" ]
null
null
null
utils/__init__.py
rizwan09/Tagger
7622f10561a0f6074abde0c9c26a4f25405b204b
[ "BSD-3-Clause" ]
null
null
null
# __init__.py # author: Playinf # email: playinf@stu.xmu.edu.cn from .parallel import parallel_model
17
36
0.764706
from .parallel import parallel_model
true
true
1c31ec3c6b93fee9e2dbf2f4584e4bd3c40726b0
1,525
py
Python
cad_tickers/news/ceo/scrap.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
2
2022-03-16T02:19:25.000Z
2022-03-16T02:22:39.000Z
cad_tickers/news/ceo/scrap.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
57
2020-07-30T15:43:43.000Z
2022-03-28T02:04:13.000Z
cad_tickers/news/ceo/scrap.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
null
null
null
import requests import bs4 from bs4 import BeautifulSoup from cad_tickers.news.ceo.utils import module_logger def extract_article(article_url: str)-> bs4.element.Tag: """Extracts data from given ceo news url""" r = requests.get(article_url) if r == None: module_logger.warning('No data returned f...
36.309524
117
0.656393
import requests import bs4 from bs4 import BeautifulSoup from cad_tickers.news.ceo.utils import module_logger def extract_article(article_url: str)-> bs4.element.Tag: r = requests.get(article_url) if r == None: module_logger.warning('No data returned from the url') data = r.text soup = Beaut...
true
true
1c31ed135cafc524fbead487f5bdf0e5b5daaa3e
18,480
py
Python
src_convertors/simple_convertors/analyzer.py
mansi-team/mansi_corpus
369c71b8bb9e4d19999a88edf31d0017069d0d40
[ "MIT" ]
null
null
null
src_convertors/simple_convertors/analyzer.py
mansi-team/mansi_corpus
369c71b8bb9e4d19999a88edf31d0017069d0d40
[ "MIT" ]
1
2021-02-07T17:52:22.000Z
2021-02-07T17:52:22.000Z
src_convertors/simple_convertors/analyzer.py
mansi-team/mansi_corpus
369c71b8bb9e4d19999a88edf31d0017069d0d40
[ "MIT" ]
1
2020-06-13T06:44:22.000Z
2020-06-13T06:44:22.000Z
import re import copy import os class DumbMorphParser: """ Contains methods that add context-independent word-level morhological information from a parsed word list to a collection of JSON sentences. No actual parsing takes place here. """ rxWordsRNC = re.compile('<w>(<ana.*?/(?:ana)?>)([...
40.526316
113
0.516126
import re import copy import os class DumbMorphParser: rxWordsRNC = re.compile('<w>(<ana.*?/(?:ana)?>)([^<>]+)</w>', flags=re.DOTALL) rxAnalysesRNC = re.compile('<ana *([^<>]+)(?:></ana>|/>)\\s*') rxAnaFieldRNC = re.compile('([^ <>"=]+) *= *"([^<>"]+)') rxSplitGramTags = re.compile('[,, /=]') rxH...
true
true
1c31ef0bec97c351e5a257803f09682c31dad000
5,653
py
Python
plotly/graph_objs/surface/contours/x/_project.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/surface/contours/x/_project.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
null
null
null
plotly/graph_objs/surface/contours/x/_project.py
omridanan/plotly.py
a8d26670cba49ce15ce9b7639ae0f55a6088a825
[ "MIT" ]
1
2019-02-18T04:12:56.000Z
2019-02-18T04:12:56.000Z
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Project(BaseTraceHierarchyType): # x # - @property def x(self): """ Determines whether or not these contour lines are projected on the x plane. If `highlight` is set to *true* (the default), the ...
31.405556
79
0.546082
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Project(BaseTraceHierarchyType): @property def x(self): return self['x'] @x.setter def x(self, val): self['x'] = val @property def y(self): return self['y'] @y.setter d...
true
true