hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
f3c9e8bc32964f64bb16234f3c7a882861b05962
6,093
py
Python
Code/project/accounts/views.py
NSU-SU21-CSE299-SAS3/Group01
3d6bf6da87504d3532c92a8188bc2aee64b35373
[ "MIT" ]
null
null
null
Code/project/accounts/views.py
NSU-SU21-CSE299-SAS3/Group01
3d6bf6da87504d3532c92a8188bc2aee64b35373
[ "MIT" ]
null
null
null
Code/project/accounts/views.py
NSU-SU21-CSE299-SAS3/Group01
3d6bf6da87504d3532c92a8188bc2aee64b35373
[ "MIT" ]
1
2021-09-13T14:13:41.000Z
2021-09-13T14:13:41.000Z
from django.shortcuts import render, redirect from .forms import RegistrationForm from .models import Account from django.contrib import messages, auth from django.contrib.auth.decorators import login_required from django.http import HttpResponse from carts.models import Cart, CartItem from carts.views import _cart_id ...
30.61809
126
0.731167
from django.shortcuts import render, redirect from .forms import RegistrationForm from .models import Account from django.contrib import messages, auth from django.contrib.auth.decorators import login_required from django.http import HttpResponse from carts.models import Cart, CartItem from carts.views import _cart_id ...
5,108
0
181
375657e1ff70527a6502d8ff3f3342674e4182ad
2,097
py
Python
nova/api/ec2/cloud.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/ec2/cloud.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/ec2/cloud.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright 2010 United States Government as represented by the' nl|'\n' comment|'# Administrator of the National Aeronautics and Space Administration.' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); ...
19.238532
88
0.666667
begin_unit comment|'# Copyright 2010 United States Government as represented by the' nl|'\n' comment|'# Administrator of the National Aeronautics and Space Administration.' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); ...
0
0
0
8da42d22a1c9b9cb0d434edec6f20530d6708d11
569
py
Python
api/google_cloud.py
alejandropadronn/PhotoSpeech
1d32266547b0a88eee962624346cd5e607a16126
[ "MIT" ]
3
2017-03-16T18:16:26.000Z
2017-05-04T03:40:46.000Z
api/google_cloud.py
alejandropadronn/PhotoSpeech
1d32266547b0a88eee962624346cd5e607a16126
[ "MIT" ]
null
null
null
api/google_cloud.py
alejandropadronn/PhotoSpeech
1d32266547b0a88eee962624346cd5e607a16126
[ "MIT" ]
null
null
null
import io from google.cloud import vision # Prepare image to be classified # Get the labels for an image
28.45
59
0.629174
import io from google.cloud import vision class VisualRecognition(object): def __init__(self): self.client = vision.Client() # Prepare image to be classified def load_image(self, file): # Loads the image into memory print('Loading image...') with io.open(file, 'rb') as ...
342
11
101
524dd71578c02543ff8cec0dc08d53ac970f7c5f
4,432
py
Python
app/rate/models.py
SadraMoghadam/software_engineering_undergraduate_project
9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf
[ "MIT" ]
1
2019-12-30T16:49:02.000Z
2019-12-30T16:49:02.000Z
app/rate/models.py
SadraMoghadam/software_engineering_undergraduate_project
9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf
[ "MIT" ]
null
null
null
app/rate/models.py
SadraMoghadam/software_engineering_undergraduate_project
9fd638a6e2a06167fe6f893ab58322f5f3a5dbbf
[ "MIT" ]
null
null
null
from django.db import models from django.db.models.signals import pre_save from user.models import CustomUser # Signals pre_save.connect(caculate_university_overall_score, sender=UniversityRate) pre_save.connect(caculate_professor_overall_score, sender=ProfessorRate)
28.779221
79
0.672383
from django.db import models from django.db.models.signals import pre_save from user.models import CustomUser class TagManager(models.Manager): def get_or_create(self, name): tag = None try: tag = self.get(name=name) return tag except Tag.DoesNotExist: t...
971
2,925
255
3b55af8729820b5b5a0f3c45e2bb3995831ee0dc
5,312
py
Python
knowit/__main__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
knowit/__main__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
knowit/__main__.py
labrys/knowit
eea9ac18e38c930230cf81b5dca4a9af9fb10d4e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import logging import sys from argparse import ArgumentParser from six import PY2 import yaml from . import ( __url__, __version__, api, ) from .provider import ProviderError from .serializer import ( get_json_encoder, ge...
34.947368
115
0.6218
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import logging import sys from argparse import ArgumentParser from six import PY2 import yaml from . import ( __url__, __version__, api, ) from .provider import ProviderError from .serializer import ( get_json_encoder, ge...
0
0
0
6ea8aa9ca433a57b507e0146be2be1dee37f74a2
5,118
py
Python
tests/test_roman_range.py
alvistack/daveoncode-python-string-utils
78929d88d90b1f90cb4837528ed955166bf0f559
[ "MIT" ]
3
2020-08-20T10:27:13.000Z
2021-11-02T20:28:16.000Z
tests/test_roman_range.py
alvistack/daveoncode-python-string-utils
78929d88d90b1f90cb4837528ed955166bf0f559
[ "MIT" ]
null
null
null
tests/test_roman_range.py
alvistack/daveoncode-python-string-utils
78929d88d90b1f90cb4837528ed955166bf0f559
[ "MIT" ]
null
null
null
from unittest import TestCase from string_utils.generation import roman_range
43.372881
93
0.688746
from unittest import TestCase from string_utils.generation import roman_range class RomanRangeTestCase(TestCase): def test_range_raise_exception_if_stop_is_invalid(self): msg = '"stop" must be an integer in the range 1-3999' with self.assertRaises(ValueError) as raised: roman_range(0...
4,759
14
265
5dbab7e909abcb25f55a021575aea3214a7bbc6f
1,409
py
Python
pyuppaal/pyuppaal/ulp/_build_tables.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
pyuppaal/pyuppaal/ulp/_build_tables.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
pyuppaal/pyuppaal/ulp/_build_tables.py
sen-uni-kn/tartar
5148f8737ab39c09aa0ca4907b1af7c44cf8b8a0
[ "MIT" ]
null
null
null
""" Copyright (C) 2011 Mads Chr. Olesen <mchro@cs.aau.dk> 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 3 of the License, or (at your option) any later versi...
32.022727
78
0.672108
""" Copyright (C) 2011 Mads Chr. Olesen <mchro@cs.aau.dk> 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 3 of the License, or (at your option) any later versi...
0
0
0
ead243e787a5c46722f00dc2c547197cd0d31c83
550
py
Python
archive/oldmons/cpun.py
benc-uk/ziz
4e05e5f90c33007d17d4f8bd4b7347284a32eb40
[ "Apache-2.0" ]
null
null
null
archive/oldmons/cpun.py
benc-uk/ziz
4e05e5f90c33007d17d4f8bd4b7347284a32eb40
[ "Apache-2.0" ]
null
null
null
archive/oldmons/cpun.py
benc-uk/ziz
4e05e5f90c33007d17d4f8bd4b7347284a32eb40
[ "Apache-2.0" ]
null
null
null
from org.nsclient4j import NSClient4j, NSClient4JException
26.190476
59
0.681818
from org.nsclient4j import NSClient4j, NSClient4JException def main(): try: ns_port = 12489 if("port" in globals()): ns_port = int(port) client = NSClient4j(hostname, ns_port) cpu_val = client.getCPUUsage().split('&')[0] client.close() result.value = float(cpu_val) result.msg = "C...
467
0
24
00488e2bc1817896a70432cf999d842c0f6e9e4b
1,223
py
Python
uninstrumented/lower/lower.py
timescale/promscale-tracing-demo
a71fce67369a5b222c8617ea2a4c96b873a90680
[ "Apache-2.0" ]
1
2022-01-25T14:41:47.000Z
2022-01-25T14:41:47.000Z
uninstrumented/lower/lower.py
timescale/promscale-tracing-demo
a71fce67369a5b222c8617ea2a4c96b873a90680
[ "Apache-2.0" ]
null
null
null
uninstrumented/lower/lower.py
timescale/promscale-tracing-demo
a71fce67369a5b222c8617ea2a4c96b873a90680
[ "Apache-2.0" ]
null
null
null
import string import random import time from flask import Flask, Response from flask.json import jsonify app = Flask(__name__) @app.route('/') if __name__ == '__main__': app.run()
21.45614
57
0.603434
import string import random import time from flask import Flask, Response from flask.json import jsonify app = Flask(__name__) def work(mu: float, sigma: float) -> None: # simulate work being done time.sleep(max(0.0, random.normalvariate(mu, sigma))) def random_lower() -> str: # gets progressively slow...
908
0
114
9bdd2307e4acfef95d4bbe1e8033a47eee81b24f
527
py
Python
tests/test_api.py
hrgupta/dogapp
ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a
[ "MIT" ]
null
null
null
tests/test_api.py
hrgupta/dogapp
ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a
[ "MIT" ]
null
null
null
tests/test_api.py
hrgupta/dogapp
ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a
[ "MIT" ]
null
null
null
from fastapi.testclient import TestClient from dogapp.app import app client = TestClient(app)
37.642857
196
0.745731
from fastapi.testclient import TestClient from dogapp.app import app client = TestClient(app) def test_index(): response = client.get("/") assert response.status_code == 200 def test_predict(): body = {"urls": ["https://www.thesprucepets.com/thmb/wpN_ZunUaRQAc_WRdAQRxeTbyoc=/4231x2820/filters:fill(auto,1...
387
0
46
264d8ba2c220bd5539794618d18f2873eb943500
5,463
py
Python
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
1
2019-11-27T11:50:15.000Z
2019-11-27T11:50:15.000Z
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
null
null
null
faraday_gui.py
MartinCapraro/2d-faraday-cage
689aa882aa5d805102630eca7a0618a8264e8435
[ "MIT" ]
null
null
null
import math # Import appropriate version of tkinter try: import Tkinter as tk except ImportError: import tkinter as tk import numpy as np import matplotlib as mpl import matplotlib.backends.backend_tkagg as backend_tkagg import faraday_numerics import entry_boxes import options if __name__ == '__main__': ...
30.519553
133
0.580633
import math # Import appropriate version of tkinter try: import Tkinter as tk except ImportError: import tkinter as tk import numpy as np import matplotlib as mpl import matplotlib.backends.backend_tkagg as backend_tkagg import faraday_numerics import entry_boxes import options class FaradayCageApplication(...
4,237
849
46
32ef6826eeb2b3c8bb1b52d36ad656fab909a46c
372
py
Python
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
joc.py
Adrianlov/Python_study
ccd5b309fda7c50caea062b690b894478d656cd0
[ "Apache-2.0" ]
null
null
null
comanda = "" while comanda != "quit": comanda = input("> ").lower() if comanda == "start": print("Masina a pornit") elif comanda == "stop": print("Masina sa oprit") elif comanda == "help": print(''' Start - Masina porneste Stop - Masina se opreste quit - A iesi ...
20.666667
32
0.521505
comanda = "" while comanda != "quit": comanda = input("> ").lower() if comanda == "start": print("Masina a pornit") elif comanda == "stop": print("Masina sa oprit") elif comanda == "help": print(''' Start - Masina porneste Stop - Masina se opreste quit - A iesi ...
0
0
0
f942dc0edd2abaac164a4973ff199336f55c5e56
4,691
py
Python
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
xls/CMXlsByHall.py
pengphei/cinemaman
f2de21e9034f7dc07f25980a653d8af82342136f
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # global import from xlwt import * # local import # global vars header_names = [ u"影片名称", u"片长", u"语言", u"开映时间", u"结束时间", u"场间", ] ## HEADER STYLE header_pat = Pattern() header_pat.pattern = header_pat.SOLID_PATTERN header_pat.pattern_fore_colour = 1 header_pat.patte...
33.748201
125
0.698785
# -*- coding: utf-8 -*- # global import from xlwt import * # local import # global vars header_names = [ u"影片名称", u"片长", u"语言", u"开映时间", u"结束时间", u"场间", ] ## HEADER STYLE header_pat = Pattern() header_pat.pattern = header_pat.SOLID_PATTERN header_pat.pattern_fore_colour = 1 header_pat.patte...
2,893
-1
147
f63c464e281d5fd54bd4105acf8ac53ec39c33b6
1,819
py
Python
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
14
2015-09-12T01:32:05.000Z
2021-10-13T02:52:53.000Z
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
Scripts/dk/spline.py
hhg128/DKGL
c61bc6546ac5655da97462cc532a9034ba08516d
[ "PSF-2.0", "BSD-3-Clause" ]
3
2015-11-10T03:12:49.000Z
2018-10-15T15:38:31.000Z
import _dk_core as core # interpolation type CATMULL_ROM = 0 UNIFORM_CUBIC = 1 HERMITE = 2 BEZIER = 3 Spline = core.Spline class Spline2: '''spline for Vector2''' class Spline3: '''spline for Vector3''' class Spline4: '''spline for Vector4'''
30.316667
89
0.59923
import _dk_core as core # interpolation type CATMULL_ROM = 0 UNIFORM_CUBIC = 1 HERMITE = 2 BEZIER = 3 Spline = core.Spline class Spline1(core.Spline): pass class Spline2: '''spline for Vector2''' def __init__(self, p0, p1, p2, p3): self.p0 = p0 self.p1 = p1 self.p2 = p2 ...
1,337
15
205
e80d00dbfeac10dab4858318d86530d0832d1665
17,598
py
Python
lit_nlp/examples/models/t5.py
eichinflo/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
2,854
2020-08-12T15:51:12.000Z
2022-03-31T08:24:13.000Z
lit_nlp/examples/models/t5.py
soma2000-lang/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
156
2020-08-16T21:09:05.000Z
2022-03-30T18:04:53.000Z
lit_nlp/examples/models/t5.py
soma2000-lang/lit
b46c0cac34baa571242637b53b78cfd69de536d0
[ "Apache-2.0" ]
301
2020-08-14T05:52:56.000Z
2022-03-25T22:48:01.000Z
# Lint as: python3 """LIT wrappers for T5, supporting both HuggingFace and SavedModel formats.""" import re from typing import List import attr from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types from lit_nlp.examples.models import model_utils from lit_nlp.lib import utils import ten...
36.284536
80
0.698034
# Lint as: python3 """LIT wrappers for T5, supporting both HuggingFace and SavedModel formats.""" import re from typing import List import attr from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types from lit_nlp.examples.models import model_utils from lit_nlp.lib import utils import ten...
5,007
0
593
8c6303badf0da3979a9584cc59fec3a57c1ef4a8
3,526
py
Python
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
3
2016-11-27T05:02:52.000Z
2017-01-31T17:36:36.000Z
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
61
2016-11-05T00:27:34.000Z
2017-09-15T23:37:58.000Z
projects/migrations/0011_auto_20170118_1449.py
18F/acquisitions.18f.gov
7ef7091fd65b4b6797ddeb1c1f56def29522c43b
[ "CC0-1.0" ]
2
2017-07-14T06:21:26.000Z
2021-02-14T11:53:05.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-18 14:49 from __future__ import unicode_literals from django.db import migrations, models
38.326087
261
0.592456
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-18 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0010_auto_20170117_2357'), ] operations = [ migrations.RemoveFi...
0
3,347
23
3c7f3794d55a5a7497bada6694896e246c94aeb6
107
py
Python
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
chances/__init__.py
JohanMollevik/chances
4d4cd8d952b97ced55de7602e65744cb29ce6979
[ "MIT" ]
null
null
null
from .methods import Randomizer from .plots import oned, twod from .utils import * __version__ = "0.1.4"
15.285714
31
0.738318
from .methods import Randomizer from .plots import oned, twod from .utils import * __version__ = "0.1.4"
0
0
0
5026d54aea765c38bfd225661ff5f91cb006826c
1,357
py
Python
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
null
null
null
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
null
null
null
Pollination/1_PollinationDataProcessing.py
jandrewjohnson/natcap_accounting
21854a62d168274cce662e225ae8eee9f33898ef
[ "BSD-3-Clause" ]
1
2018-03-22T19:07:11.000Z
2018-03-22T19:07:11.000Z
##Script to prepare data for pollination analyses ##Before running, you must have the NLCD and CDL rasters for your year(s) of analysis and the states raster in one folder # Import modules, reset environments import arcpy arcpy.CheckOutExtension("spatial") arcpy.ResetEnvironments() import tkFileDialog # Se...
34.794872
146
0.731024
##Script to prepare data for pollination analyses ##Before running, you must have the NLCD and CDL rasters for your year(s) of analysis and the states raster in one folder # Import modules, reset environments import arcpy arcpy.CheckOutExtension("spatial") arcpy.ResetEnvironments() import tkFileDialog # Se...
0
0
0
096a4cf71a8055086f8e9399752cfe1dff6ea0e3
633
py
Python
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
1
2020-12-11T05:54:59.000Z
2020-12-11T05:54:59.000Z
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
1
2021-04-10T06:53:30.000Z
2021-04-10T06:53:30.000Z
src/daily-coding-problem/medium/kaprekars-constant/test_keprekars_constant.py
nwthomas/code-challenges
49c2532ff597495474e67b13f2ed9b9ad93d40b5
[ "MIT" ]
7
2019-11-24T12:10:35.000Z
2020-12-14T22:36:31.000Z
from keprekars_constant import find_keprekars_constant_steps import unittest if __name__ == "__main__": unittest.main()
27.521739
72
0.693523
from keprekars_constant import find_keprekars_constant_steps import unittest class TestKeprekarsConstant(unittest.TestCase): def test_returns_for_number(self): """ Returns the number of steps required to find Keprekar's Constant """ result = find_keprekars_constant_steps(9988) ...
0
483
23
bd1ea0abb4e98998f1481ee67451cc092912d47d
494
py
Python
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
tests/utils/test_focus_measure.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
import cv2 from qualipy.utils.focus_measure import * IMAGE = cv2.imread('tests/images/lama.jpg', 0) BLURRED = cv2.blur(IMAGE, (10, 10))
21.478261
47
0.761134
import cv2 from qualipy.utils.focus_measure import * IMAGE = cv2.imread('tests/images/lama.jpg', 0) BLURRED = cv2.blur(IMAGE, (10, 10)) def test_LAPV_returns_less_for_blurred_image(): assert LAPV(BLURRED) < LAPV(IMAGE) def test_LAPM_returns_less_for_blurred_image(): assert LAPM(BLURRED) < LAPM(IMAGE) de...
260
0
92
ed3723abfda63c3955edbeacaeb3b52a175d8223
22
py
Python
mythtv_client/__init__.py
plumdog/mythtv_client
edc17294f3a894734330225157c3da03af3c1be9
[ "MIT" ]
null
null
null
mythtv_client/__init__.py
plumdog/mythtv_client
edc17294f3a894734330225157c3da03af3c1be9
[ "MIT" ]
null
null
null
mythtv_client/__init__.py
plumdog/mythtv_client
edc17294f3a894734330225157c3da03af3c1be9
[ "MIT" ]
null
null
null
from .api import API
7.333333
20
0.727273
from .api import API
0
0
0
22877fe254989fac12206a77e4d2e89b0cb08aee
3,894
py
Python
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
10
2021-11-13T12:39:06.000Z
2022-03-19T13:40:05.000Z
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
22
2021-11-13T12:57:10.000Z
2022-03-15T21:42:05.000Z
meta/typeset_keywords.py
JohnDTill/Forscape
dbbab01f30597af00f87527a8a3d7b468c04b67b
[ "MIT" ]
null
null
null
from utils import cpp, table_reader if __name__ == "__main__": main()
41.425532
115
0.476117
from utils import cpp, table_reader def main(): constructs = table_reader.csv_to_list_of_tuples( csv_filepath="construct_codes.csv", tuple_name="Construct", ) keywords = table_reader.csv_to_list_of_tuples( csv_filepath="typeset_keywords.csv", tuple_name="Shortcut", ) ...
3,794
0
23
5b58e15f538009e46e43e040ea9f0a2da92a7873
644
py
Python
send.py
alixnovosi/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
1
2016-12-02T10:51:02.000Z
2016-12-02T10:51:02.000Z
send.py
andrewmichaud/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
null
null
null
send.py
andrewmichaud/not5oclock_bot
9eb7f79a79e8f2c4d5b5dfac0d6190890a0f6765
[ "BSD-3-Clause" ]
null
null
null
"""Send file for not5oclock_bot""" import argparse from os import path import botskeleton if __name__ == "__main__": SECRETS_DIR = path.join(path.abspath(path.dirname(__file__)), "SECRETS") botskeleton = botskeleton.BotSkeleton(SECRETS_DIR, bot_name="not5oclock_bot") # Get arg. # Could probably do i...
30.666667
82
0.687888
"""Send file for not5oclock_bot""" import argparse from os import path import botskeleton if __name__ == "__main__": SECRETS_DIR = path.join(path.abspath(path.dirname(__file__)), "SECRETS") botskeleton = botskeleton.BotSkeleton(SECRETS_DIR, bot_name="not5oclock_bot") # Get arg. # Could probably do i...
0
0
0
1c7c656fa1f628d738c08443ca5aa9f4c0513d0c
1,191
py
Python
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
stancode_projects/breakout_game/breakout.py
JochenMa/stancode_projects
1f7bc363cdc4fcc4ce95e0cc9ff78a46f4de323e
[ "MIT" ]
null
null
null
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. This is a breakout game with loading animation, two levels of games, and a score board """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE ...
28.357143
86
0.632242
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. This is a breakout game with loading animation, two levels of games, and a score board """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE ...
769
0
23
0baa18485463b66f114b88aa64c9d3d4bbd918f0
1,886
py
Python
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
tools_yuan/convert_data/cvc-09-pkl.py
DouCir/mmdetection
44613202c379d85315ed47ca670fd9853f90c3a5
[ "Apache-2.0" ]
null
null
null
import os.path as osp import mmcv from tools_yuan.convert_data.utils import parse_xml from tools_yuan.convert_data.utils import track_progress_yuan import getpass """ Author: Yuan Yuan Date:2018/12/16 Location:SCU """ if __name__ == '__main__': main()
41.911111
96
0.692471
import os.path as osp import mmcv from tools_yuan.convert_data.utils import parse_xml from tools_yuan.convert_data.utils import track_progress_yuan import getpass """ Author: Yuan Yuan Date:2018/12/16 Location:SCU """ def main(): username = getpass.getuser() xml_dir = osp.join('/media/', username, 'Data/Doub...
1,604
0
23
d1e56e7dab51cf73192a49b5477b005921d42e4e
1,653
py
Python
ros/src/control/servers/heave.py
srmauvsoftware/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
30
2019-03-23T13:25:13.000Z
2022-03-31T07:41:27.000Z
ros/src/control/servers/heave.py
SIA-Underwater-Robots/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
2
2021-02-02T16:29:03.000Z
2021-05-08T10:07:43.000Z
ros/src/control/servers/heave.py
SIA-Underwater-Robots/URSim
feb7d257e61f192067209de5456965d7d0a3a612
[ "Apache-2.0" ]
12
2020-02-06T11:56:45.000Z
2022-02-03T05:30:03.000Z
#!/usr/bin/env python from control.msg import heaveFeedback, heaveAction, heaveResult import rospy import time import actionlib if __name__ == '__main__': rospy.init_node('heaveServer') server = Heave(rospy.get_name()) rospy.spin()
34.4375
81
0.584997
#!/usr/bin/env python from control.msg import heaveFeedback, heaveAction, heaveResult import rospy import time import actionlib class Heave(object): feedback = heaveFeedback() result = heaveResult() def __init__(self, name): self.heavePub = rospy.Publisher('/heave_setpoint', Float64, queue_size=1)...
1,247
138
23
332684750726cf5d7a2597dcbab550629a0b790e
7,077
py
Python
xdream/Generators.py
willwx/XDream
ee7022a35e94f00d08fdb1e49ca784fc497740c0
[ "MIT" ]
38
2019-04-19T16:37:37.000Z
2022-02-15T21:42:24.000Z
xdream/Generators.py
willwx/XDream
ee7022a35e94f00d08fdb1e49ca784fc497740c0
[ "MIT" ]
null
null
null
xdream/Generators.py
willwx/XDream
ee7022a35e94f00d08fdb1e49ca784fc497740c0
[ "MIT" ]
12
2019-05-01T20:29:26.000Z
2021-04-30T07:49:25.000Z
import numpy as np from net_utils import net_catalogue from net_utils.local_settings import gpu_available from utils import resize_image
33.225352
110
0.625406
import numpy as np from net_utils import net_catalogue from net_utils.local_settings import gpu_available from utils import resize_image class Generator: def __init__(self, digitize_image, load_on_init): self._digitize = bool(digitize_image) if load_on_init: self.load_generator() ...
4,785
2,058
92
ebdad07000afa14f7bcce41d2a28ea72df3e6551
3,796
py
Python
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
2
2022-02-21T09:27:12.000Z
2022-02-25T03:32:10.000Z
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
null
null
null
main.py
ababier/open-kbp-opt
c7909ee8c1561ec9c0199f3c0a79ac0fd0720478
[ "MIT" ]
2
2022-02-21T09:27:16.000Z
2022-02-22T01:04:58.000Z
from itertools import product as it_product import tqdm from scipy import sparse from provided_code.constants_class import ModelParameters from provided_code.data_loader import DataLoader from provided_code.general_functions import get_paths, get_predictions_to_optimize from provided_code.optimizer import PlanningMod...
54.228571
113
0.650421
from itertools import product as it_product import tqdm from scipy import sparse from provided_code.constants_class import ModelParameters from provided_code.data_loader import DataLoader from provided_code.general_functions import get_paths, get_predictions_to_optimize from provided_code.optimizer import PlanningMod...
0
0
0
4ae3624c5d54ec2df9ea28870ce455547096fc54
3,936
py
Python
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
19
2019-06-15T06:23:26.000Z
2021-03-01T11:09:08.000Z
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
3
2021-02-17T20:57:11.000Z
2021-03-27T13:41:52.000Z
alig/tf/alig_tf1.py
oval-group/ali-g
568947a2bbb651be3401fbae60229e2fcbf8a505
[ "MIT" ]
6
2019-06-17T13:18:27.000Z
2022-03-04T15:29:17.000Z
"""Implementation of ALI-G in tensorflow 1.""" import tensorflow as tf def minimize(optimizer, loss, global_step=None, var_list=None, gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None): ...
45.767442
95
0.667683
"""Implementation of ALI-G in tensorflow 1.""" import tensorflow as tf def minimize(optimizer, loss, global_step=None, var_list=None, gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None): ...
2,012
0
131
ef7badf555a062e8001543f128edae7d4fdb8121
376
py
Python
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
10
2017-06-22T21:05:17.000Z
2020-09-25T08:36:59.000Z
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
2
2018-04-14T08:43:59.000Z
2018-09-19T14:51:46.000Z
xii/assembler/__init__.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
6
2018-04-13T20:33:53.000Z
2020-09-25T08:37:01.000Z
from . trace_form import Trace from . average_form import Average from . extension_form import Extension from . restriction_form import Restriction from . injection_form import Injection from . point_trace_form import PointTrace from . xii_assembly import assemble as ii_assemble from . average_shape import Square, Squa...
37.6
59
0.835106
from . trace_form import Trace from . average_form import Average from . extension_form import Extension from . restriction_form import Restriction from . injection_form import Injection from . point_trace_form import PointTrace from . xii_assembly import assemble as ii_assemble from . average_shape import Square, Squa...
0
0
0
c777e07b672f4292d431b3be35b47f7c951ddf04
868
py
Python
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
1
2021-08-14T19:17:50.000Z
2021-08-14T19:17:50.000Z
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
2
2022-03-05T14:04:54.000Z
2022-03-20T13:36:00.000Z
ip-whois-mail.py
DIVD-NL/scripts
a81c4d74bfaa0a5cde52af324cf60b06d3caa21f
[ "Apache-2.0" ]
3
2021-11-14T13:08:29.000Z
2022-03-05T13:53:28.000Z
#!/bin/python3 # https://www.DIVD.nl # Developed by Hidde Smit & Wietse Boonstra # Usage: cat ips.txt | python3 ip-whois-mail.py # ips.txt 1 ip per line # Debugging: sys.stdin = ['1.1.1.1', '8.8.8.8'] from ipwhois import IPWhois import sys for line in sys.stdin: try: ip = line.strip('\n') obj = IP...
32.148148
65
0.574885
#!/bin/python3 # https://www.DIVD.nl # Developed by Hidde Smit & Wietse Boonstra # Usage: cat ips.txt | python3 ip-whois-mail.py # ips.txt 1 ip per line # Debugging: sys.stdin = ['1.1.1.1', '8.8.8.8'] from ipwhois import IPWhois import sys for line in sys.stdin: try: ip = line.strip('\n') obj = IP...
0
0
0
d31ec4bd3a1e7af2c0bc92f9bc8aa4ad444f5b3d
3,518
py
Python
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/__init__.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
1
2018-12-13T12:15:09.000Z
2018-12-13T12:15:09.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # 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...
27.920635
77
0.662877
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # 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...
1,241
0
23
ee56f9746263c4d84d24762619ef9546cf81f20e
698
py
Python
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
abc202/abc202_d.py
Vermee81/practice-coding-contests
78aada60fa75f208ee0eef337b33b27b1c260d18
[ "MIT" ]
null
null
null
# https://atcoder.jp/contests/abc202/tasks/abc202_d A, B, K = map(int, input().split()) # memo[a][b] aがa個, bがb個の時の場合の数 memo = [[0 for _ in range(31)] for _ in range(31)] memo[0][0] = 1 for i in range(A + 1): for j in range(B + 1): if i == 0: memo[i][j] = 1 continue if j == 0...
23.266667
56
0.444126
# https://atcoder.jp/contests/abc202/tasks/abc202_d A, B, K = map(int, input().split()) # memo[a][b] aがa個, bがb個の時の場合の数 memo = [[0 for _ in range(31)] for _ in range(31)] memo[0][0] = 1 for i in range(A + 1): for j in range(B + 1): if i == 0: memo[i][j] = 1 continue if j == 0...
226
0
23
70589e653b6e630bb2205f6da1d790c6ab6c2c58
2,567
py
Python
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
8
2021-08-03T03:57:10.000Z
2021-12-13T01:19:02.000Z
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
17
2021-08-12T19:38:42.000Z
2022-01-27T14:39:35.000Z
tensorflow/compiler/mlir/tfrt/python_tests/tf_matmul_test.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
30.559524
80
0.625633
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
1,319
19
165
badf16efb214aa645124c980135c059532f5ebf5
22
py
Python
_proofreading/__init__.py
haehn/proofreading
2a1217e34e70b8ba1caba98e4bb14a5409170274
[ "MIT" ]
1
2019-12-12T14:04:26.000Z
2019-12-12T14:04:26.000Z
_proofreading/__init__.py
haehn/proofreading
2a1217e34e70b8ba1caba98e4bb14a5409170274
[ "MIT" ]
null
null
null
_proofreading/__init__.py
haehn/proofreading
2a1217e34e70b8ba1caba98e4bb14a5409170274
[ "MIT" ]
null
null
null
from util import Util
11
21
0.818182
from util import Util
0
0
0
c3bbf538b562202aa596e9b0bffb514d5d906e89
11,373
py
Python
src/appengine/handlers/cron/fuzzer_weights.py
mikiec84/clusterfuzz
fb053896ee5b5f1468479e75223c07b4281a72d3
[ "Apache-2.0" ]
1
2020-11-09T21:05:50.000Z
2020-11-09T21:05:50.000Z
src/appengine/handlers/cron/fuzzer_weights.py
M31MOTH/clusterfuzz
a614d2e09238f11ae578337e10dfeaba38dcae76
[ "Apache-2.0" ]
12
2020-11-13T18:58:31.000Z
2022-03-21T22:19:55.000Z
src/appengine/handlers/cron/fuzzer_weights.py
gaybro8777/clusterfuzz
fb053896ee5b5f1468479e75223c07b4281a72d3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.869942
80
0.741053
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
655f2e364853371f596b18db8ae3dd9dfeacd2ac
5,866
py
Python
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
21
2019-02-05T22:08:32.000Z
2022-03-07T03:37:59.000Z
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
10
2019-07-25T04:03:44.000Z
2021-08-12T21:31:37.000Z
examples/qt_avbmodel.py
markreidvfx/pyavb
48b05a84ff9752703a9218d5ca157ee672b020ab
[ "MIT" ]
1
2020-02-20T15:08:40.000Z
2020-02-20T15:08:40.000Z
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys from PySide2 import QtCore import avb if str is not bytes: unicode = str if __name__ == "__main__": from PySide2 import QtWidgets from optparse import OptionParser parser = Opti...
24.543933
81
0.588817
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys from PySide2 import QtCore import avb if str is not bytes: unicode = str def pretty_value(value): if isinstance(value, bytearray): return "bytearray(%d)" % len(value) # retur...
3,990
23
550
a6c5dd98fd237c9117cb0917f59efec51d4f2bee
4,152
py
Python
pytensor/ops/rnn_ops.py
shuida/pytensor
d00d188dcc2da12d43afa749b3b23dd27e42698d
[ "MIT" ]
1
2019-01-10T12:03:29.000Z
2019-01-10T12:03:29.000Z
pytensor/ops/rnn_ops.py
shuida/pytensor
d00d188dcc2da12d43afa749b3b23dd27e42698d
[ "MIT" ]
null
null
null
pytensor/ops/rnn_ops.py
shuida/pytensor
d00d188dcc2da12d43afa749b3b23dd27e42698d
[ "MIT" ]
null
null
null
from pytensor.network.variable import * from pytensor.network.parameter import * from pytensor.network.operation import *
31.938462
101
0.638728
from pytensor.network.variable import * from pytensor.network.parameter import * from pytensor.network.operation import * class RNNCell(Operation): def __init__(self, name='RNNCell', argument=None, graph=None): super(RNNCell, self).__init__(name, argument, graph) # intialize size self.i...
1,194
2,790
46
2997477dfa190f25ae19e618f8064176980b342f
18,401
py
Python
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
93
2018-04-21T01:03:06.000Z
2019-06-23T14:22:37.000Z
src/friendlyshell/base_shell.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
"""Common shell interaction logic shared between different shells""" from __future__ import print_function import os import sys import inspect import subprocess import pyparsing as pp from six.moves import input from friendlyshell.command_parsers import default_line_parser # Path where configuration data is stored for...
37.248988
89
0.607087
"""Common shell interaction logic shared between different shells""" from __future__ import print_function import os import sys import inspect import subprocess import pyparsing as pp from six.moves import input from friendlyshell.command_parsers import default_line_parser # Path where configuration data is stored for...
963
0
26
293ae57c61e3117e02596a06527405a882bd94fb
9,882
py
Python
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
ibmdbpy/tests/test_geoSeries.py
marc-mclean1/ibmdbpy
46d885e793da52c58424885d74ab1a6668c391b3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
40.666667
78
0.699858
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
7,788
11
1,264
7024ee02b3c7015ba174d9a7e43b8b0421f75dde
640
py
Python
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
1
2022-02-13T15:07:41.000Z
2022-02-13T15:07:41.000Z
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
null
null
null
thanos/train.py
nntrongnghia/thanos_project
6db56bc232541d2c857ace0cd0d4681d53290422
[ "MIT" ]
null
null
null
import os import wandb import pytorch_lightning as pl import argparse from thanos.trainers.lit_detector import LitGestureTransformer from thanos.trainers import load_config if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("config", type=str, help="Path to config py file") ...
32
78
0.759375
import os import wandb import pytorch_lightning as pl import argparse from thanos.trainers.lit_detector import LitGestureTransformer from thanos.trainers import load_config if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("config", type=str, help="Path to config py file") ...
0
0
0
3355356edd64d34b575db36745c83670220183c9
813
py
Python
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
2
2022-01-18T08:57:13.000Z
2022-01-18T15:49:06.000Z
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
solutions/796.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
# Rotate String if __name__ == "__main__": sol = Solution() s = "abcde" goal = "cdeab" s = "abcde" goal = "abced" s = "bbbacddceeb" goal = "ceebbbbacdd" print(sol.rotateString(s, goal))
23.911765
79
0.510455
# Rotate String class Solution: def check(self, s: str, goal: str, start: int) -> bool: for i in range(len(s)): gi = (start + i) % len(s) if s[i] != goal[gi]: return False return True def rotateString(self, s: str, goal: str) -> bool: if len(s) !...
524
-6
76
0ad55b78084b83ebe23ad5b807de58e01cb11379
1,486
py
Python
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
2
2020-11-23T13:46:37.000Z
2020-12-20T02:02:38.000Z
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
tests/st/ops/cpu/test_unique_op.py
dongkcs/mindspore
cd7df6dbf463ff3128e9181e9d0c779cecb81320
[ "Apache-2.0" ]
1
2021-05-12T06:30:29.000Z
2021-05-12T06:30:29.000Z
# Copyright 2020 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 agreed to...
30.958333
78
0.661507
# Copyright 2020 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 agreed to...
454
-2
99
6d1513081c7e6fb2b07be1477020d68104c3afa5
871
py
Python
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
null
null
null
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
10
2022-01-15T19:08:13.000Z
2022-01-15T19:59:26.000Z
alembic/versions/cb98a72750ab_bugfix_correct_active_to_is_active.py
rmcguire6/leitner-box-v-2-
a5c84c5ee8ded61bc8ce18ac497b1811e0efc634
[ "MIT" ]
null
null
null
"""bugfix: correct active to is_active Revision ID: cb98a72750ab Revises: 7685fd00e696 Create Date: 2021-12-03 12:16:09.979253 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cb98a72750ab' down_revision = '7685fd00e696' branch_labels = None depends_on = None ...
28.096774
130
0.700344
"""bugfix: correct active to is_active Revision ID: cb98a72750ab Revises: 7685fd00e696 Create Date: 2021-12-03 12:16:09.979253 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cb98a72750ab' down_revision = '7685fd00e696' branch_labels = None depends_on = None ...
504
0
46
b5533c3c3ac96eac66ad42b8b70a975885f119e2
7,707
py
Python
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
2
2020-04-26T04:46:44.000Z
2020-05-22T18:45:41.000Z
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
null
null
null
vn_lang.py
Tranquangdai/seq2seq
5211d49e87d34a1a66c2541519ed9ccc669153b7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs from unidecode import unidecode from itertools import product SUBSTITUTIONS = { u'a': u'áảàãạâấẩẫầậăắẳẵằặ', u'á': u'aảàãạâấẩẫầậăắẳẵằặ', ...
23.354545
67
0.500843
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs from unidecode import unidecode from itertools import product SUBSTITUTIONS = { u'a': u'áảàãạâấẩẫầậăắẳẵằặ', u'á': u'aảàãạâấẩẫầậăắẳẵằặ', ...
1,140
0
92
cc5252c9c600d5b5b17b1bab38b0aa762eeec90c
3,865
py
Python
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
src/dataloaders.py
OsvaldFrisk/dp-not-all-noise-is-equal
a9293eab2e68577f5244d21c672cf18de33d5d29
[ "MIT" ]
null
null
null
"""Dataloaders for MNIST, FashionMNIST, CIFAR10""" from typing import Tuple import torchvision from torch.utils.data import DataLoader from opacus.utils.uniform_sampler import UniformWithReplacementSampler
24.775641
73
0.652523
"""Dataloaders for MNIST, FashionMNIST, CIFAR10""" from typing import Tuple import torchvision from torch.utils.data import DataLoader from opacus.utils.uniform_sampler import UniformWithReplacementSampler def MNIST_dataloaders( trainloader_sample_rate: float, test_batch_size: int, root: str = './', ...
3,562
0
92
386582d6fac6cdb4b34d6690284d4cf4e29f313b
6,679
py
Python
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
lemmatized_text/models.py
eldarion-client/hedera
a01d44232fadab4e60e8d06971feba9fad21e3f2
[ "MIT" ]
null
null
null
import logging from django.db import models from django.template.defaultfilters import floatformat from django.urls import reverse from django.utils import timezone from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django_rq import get_connection, job from iso639 i...
31.654028
103
0.628537
import logging from django.db import models from django.template.defaultfilters import floatformat from django.urls import reverse from django.utils import timezone from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django_rq import get_connection, job from iso639 i...
3,971
2,111
91
f41e8a6c1c7a86a44724cfeba65fa24d78242ee7
8,188
py
Python
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
pypy/tool/pytest/htmlreport.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
#! /usr/bin/env python """ the html test reporter """ import sys, os, re import pprint import py from pypy.tool.pytest import result from pypy.tool.pytest.overview import ResultCache # # various interesting path objects # html = py.xml.html NBSP = py.xml.raw("&nbsp;") # # rendering # #...
34.116667
83
0.557401
#! /usr/bin/env python """ the html test reporter """ import sys, os, re import pprint import py from pypy.tool.pytest import result from pypy.tool.pytest.overview import ResultCache # # various interesting path objects # html = py.xml.html NBSP = py.xml.raw("&nbsp;") class HtmlReport(object): def __init...
7,157
19
621
34e02ec0c6d12f72f95771aa7fd5b3e8268430c5
633
py
Python
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
src/lesson02/10-populationWebServer.py
shq-shq-shq/python-lessons
fac96b0c95c676e8256329ac269ad4530f245d84
[ "MIT" ]
null
null
null
from simpleWebServer import SimpleWebServer #--------------------------------------------------- usersCount = 0 estonianPopulation = { "tallinn" : 441000, "tartu" : 94000, "narva" : 58000, "parnu" : 41000 } #--------------------------------------------------- SimpleWebServer().serve(8088, getPopul...
22.607143
115
0.524487
from simpleWebServer import SimpleWebServer #--------------------------------------------------- usersCount = 0 estonianPopulation = { "tallinn" : 441000, "tartu" : 94000, "narva" : 58000, "parnu" : 41000 } def getPopulation(path): global usersCount usersCount += 1 city = path[1:] ...
284
0
23
1f0f576fabff5223aaa4e1593dde0eaac9e1c439
17,457
py
Python
hpimdm/tree/tree_if_non_root.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
1
2020-02-04T20:59:03.000Z
2020-02-04T20:59:03.000Z
hpimdm/tree/tree_if_non_root.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
3
2020-06-09T16:37:01.000Z
2021-08-30T00:31:12.000Z
hpimdm/tree/tree_if_non_root.py
pedrofran12/hpim_dm
fe949294b5e75ab544dcd40ff51ceafc1d3b2f0c
[ "MIT" ]
1
2020-11-23T06:47:46.000Z
2020-11-23T06:47:46.000Z
import logging import _thread from threading import Timer from . import hpim_globals from .metric import AssertMetric, Metric from .tree_interface import TreeInterface from .non_root_state_machine import SFMRNonRootState from .assert_state import AssertState, SFMRAssertABC from .downstream_state import SFMRPruneState,...
52.581325
153
0.664604
import logging import _thread from threading import Timer from . import hpim_globals from .metric import AssertMetric, Metric from .tree_interface import TreeInterface from .non_root_state_machine import SFMRNonRootState from .assert_state import AssertState, SFMRAssertABC from .downstream_state import SFMRPruneState,...
3,508
13,582
23
79b472404e3b277d60f5ef3b54f5b7775f5f0353
991
py
Python
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
Static_data.py
leoc98/FGO-
6b331d78fae6f14fa54438787addb352c128bb75
[ "MIT" ]
null
null
null
from Automator import Automator position_dictionary = { "skill_1": (54, 432), "skill_2": (123, 432), "skill_3": (192, 432), "skill_4": (291, 432), "skill_5": (362, 432), "skill_6": (432, 432), "skill_7": (530, 432), "skill_8": (600, 432), "skill_9": (672, 432), "mast...
27.527778
44
0.564077
from Automator import Automator position_dictionary = { "skill_1": (54, 432), "skill_2": (123, 432), "skill_3": (192, 432), "skill_4": (291, 432), "skill_5": (362, 432), "skill_6": (432, 432), "skill_7": (530, 432), "skill_8": (600, 432), "skill_9": (672, 432), "mast...
0
0
0
8db3d0b05b87692cb1b140db9d3cf555bf2b87b9
348
py
Python
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
yash7raut/IoT-For-Beginners
074f4880e655f19008f2fa9dfca03e18f94cf441
[ "MIT" ]
9,718
2021-03-17T12:14:37.000Z
2022-03-31T21:34:50.000Z
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
bennice/IoT-For-Beginners
caaca7b5b6dac7298d72c3bfa802fda4c3a49e29
[ "MIT" ]
123
2021-05-17T17:24:15.000Z
2022-03-04T06:58:47.000Z
4-manufacturing/lessons/4-trigger-fruit-detector/code-proximity/virtual-iot-device/fruit-quality-detector/distance_sensor.py
bennice/IoT-For-Beginners
caaca7b5b6dac7298d72c3bfa802fda4c3a49e29
[ "MIT" ]
1,115
2021-07-08T13:56:20.000Z
2022-03-31T22:54:25.000Z
from counterfit_connection import CounterFitConnection CounterFitConnection.init('127.0.0.1', 5000) import time from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X distance_sensor = VL53L0X() distance_sensor.begin() while True: distance_sensor.wait_ready() print(f'Distance = {distance_sensor.get_distan...
24.857143
60
0.793103
from counterfit_connection import CounterFitConnection CounterFitConnection.init('127.0.0.1', 5000) import time from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X distance_sensor = VL53L0X() distance_sensor.begin() while True: distance_sensor.wait_ready() print(f'Distance = {distance_sensor.get_distan...
0
0
0
849fa35b226a7ed4b5ca143481e191075a486f06
826
py
Python
GasStationAutomation/Managements/MarketSalesManagement.py
enesdorukbasi/Gas-Station-Automation
0d14199f54d288881bdd70b7d1c75bab27494947
[ "MIT" ]
null
null
null
GasStationAutomation/Managements/MarketSalesManagement.py
enesdorukbasi/Gas-Station-Automation
0d14199f54d288881bdd70b7d1c75bab27494947
[ "MIT" ]
null
null
null
GasStationAutomation/Managements/MarketSalesManagement.py
enesdorukbasi/Gas-Station-Automation
0d14199f54d288881bdd70b7d1c75bab27494947
[ "MIT" ]
null
null
null
from Database import DatabaseContext
30.592593
122
0.598063
from Database import DatabaseContext def List(): cursor = DatabaseContext.connect.cursor() cursor.execute("SELECT * FROM dbo_MarketSales") rows = cursor.fetchall() for row in rows: print(f""" Id {row[0]}, Product {row[1]}, Number {row[2]}, Price {row[3]} ...
721
0
69
d05f95d2b4d3e1888071c6110a6849c73c69c852
1,193
py
Python
engine/standard_library.py
yczhangsjtu/DartSharp
f25171e1a9c7b462f4f6b931fe1785ebf7adf333
[ "MIT" ]
null
null
null
engine/standard_library.py
yczhangsjtu/DartSharp
f25171e1a9c7b462f4f6b931fe1785ebf7adf333
[ "MIT" ]
null
null
null
engine/standard_library.py
yczhangsjtu/DartSharp
f25171e1a9c7b462f4f6b931fe1785ebf7adf333
[ "MIT" ]
null
null
null
import re
27.113636
67
0.682313
import re class StandardLibrary(object): def __init__(self): super(StandardLibrary, self).__init__() self.package_namespace_map = { } self.keyword_namespace_map = { "RegExp": "System.Text.RegularExpressions", "Iterable": "System.Collections.Generic", "StringBuffer": "System.Text", } self.word_map...
1,033
9
142
e530cb2060a25b0c5a85ce3635e1da636cc05d01
7,566
py
Python
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
2
2019-02-18T16:31:14.000Z
2019-03-05T18:24:39.000Z
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
null
null
null
src/greyd/active_user.py
canberk/greyd
b3ce055ba856277d5efd5e2bbb9b59ff8d3b3c58
[ "MIT" ]
1
2019-02-20T21:42:20.000Z
2019-02-20T21:42:20.000Z
# -*- coding: utf-8 -*- """Active user in game. Greyd Rule: 1xx """ import logging from datetime import datetime, timedelta from greyd.db import session from greyd.models.user import User from greyd.models.lobby import Lobby from greyd.models.user_to_lobby import UserToLobby from greyd.models.chat import Chat from g...
37.270936
79
0.577452
# -*- coding: utf-8 -*- """Active user in game. Greyd Rule: 1xx """ import logging from datetime import datetime, timedelta from greyd.db import session from greyd.models.user import User from greyd.models.lobby import Lobby from greyd.models.user_to_lobby import UserToLobby from greyd.models.chat import Chat from g...
194
0
27
cc509c24aa8c7051a7516a656786559975dfc474
875
py
Python
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/Numba/Primes/primes.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python from argparse import ArgumentParser import sys if __name__ == '__main__': arg_parser = ArgumentParser(description='compute primes') arg_parser.add_argument('implmentation', choices=['python', 'numba' 'python_array', ...
38.043478
71
0.549714
#!/usr/bin/env python from argparse import ArgumentParser import sys if __name__ == '__main__': arg_parser = ArgumentParser(description='compute primes') arg_parser.add_argument('implmentation', choices=['python', 'numba' 'python_array', ...
0
0
0
19d01c8d8e2f79014cfabea11d56a370264f08f3
1,663
py
Python
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
90
2020-11-13T07:42:32.000Z
2022-03-29T08:54:20.000Z
applications/migrations/0029_application_and_basket_city.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
8
2021-02-10T11:31:22.000Z
2022-01-28T14:33:47.000Z
# Generated by Django 3.1.7 on 2021-04-08 07:14 from django.db import migrations, models import django.db.models.deletion
42.641026
160
0.671678
# Generated by Django 3.1.7 on 2021-04-08 07:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('applications', '0028_organisation_email'), ] operations = [ migrations.CreateModel( name='City'...
0
1,516
23
55f6d4fd574e5bddd638687ef708156ec2c6caa8
6,628
py
Python
api/views.py
amanmyrats/fiche-produit
37bc109e63a7eaeab05078a268c798bb54136475
[ "Unlicense" ]
null
null
null
api/views.py
amanmyrats/fiche-produit
37bc109e63a7eaeab05078a268c798bb54136475
[ "Unlicense" ]
null
null
null
api/views.py
amanmyrats/fiche-produit
37bc109e63a7eaeab05078a268c798bb54136475
[ "Unlicense" ]
null
null
null
from django.db.models.query import QuerySet from rest_framework import generics, mixins, viewsets from rest_framework import filters import django_filters.rest_framework from django.http import JsonResponse from rest_framework.renderers import JSONRenderer from django.shortcuts import get_object_or_404 from fiche_prod...
43.605263
158
0.748793
from django.db.models.query import QuerySet from rest_framework import generics, mixins, viewsets from rest_framework import filters import django_filters.rest_framework from django.http import JsonResponse from rest_framework.renderers import JSONRenderer from django.shortcuts import get_object_or_404 from fiche_prod...
1,197
3,943
325
1b9b70269ddb5dd0e669e8360b18f5ecc15e5c05
221
py
Python
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
123
2016-02-10T19:55:59.000Z
2021-01-13T03:52:05.000Z
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
117
2016-02-17T09:51:22.000Z
2021-01-14T09:02:02.000Z
django_auth_adfs/drf-urls.py
mmcclelland1002/django-auth-adfs
e716f9d8c1be7afcf67e3296f3d340a25a8f1810
[ "BSD-2-Clause" ]
56
2016-02-21T04:07:28.000Z
2021-01-14T07:42:17.000Z
# flake8: noqa import warnings from .drf_urls import * warnings.warn( "drf-urls.py is not a valid module name and will be " "removed in a future version, use drf_urls.py instead", PendingDeprecationWarning )
22.1
59
0.728507
# flake8: noqa import warnings from .drf_urls import * warnings.warn( "drf-urls.py is not a valid module name and will be " "removed in a future version, use drf_urls.py instead", PendingDeprecationWarning )
0
0
0
b8c9b53e38c8d63cb97c7d6ff09045af00012ead
2,165
py
Python
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
5
2019-07-21T00:08:21.000Z
2021-04-21T23:13:58.000Z
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
3
2019-08-08T17:52:58.000Z
2019-08-25T20:36:20.000Z
nimses-adimate/android/screencap.py
GiantTreeLP/nimses-adimate
e3bac4780012b670be3f7b14cc5100e2545f0e58
[ "MIT" ]
null
null
null
import logging import socket from concurrent.futures import Executor from time import time import cv2 import numpy as np from adbutils import AdbDevice from .raw_socket import send_raw logger = logging.getLogger(__name__)
32.80303
115
0.637875
import logging import socket from concurrent.futures import Executor from time import time import cv2 import numpy as np from adbutils import AdbDevice from .raw_socket import send_raw logger = logging.getLogger(__name__) def screencap_raw(device: AdbDevice): start = time() buffer = send_raw(device, "frame...
1,868
0
69
d32dd05e45d4a97f6417af61b721892fec3ce4ad
4,699
py
Python
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
manual_test_phase.py
slimpotatoes/Holo_EM_magn_rev
84bfa4ab1d344fd3d04d33dd4153ebe6b707efb8
[ "BSD-3-Clause" ]
null
null
null
# Test of phase Module (Manual) import numpy as np import math as math import data as data import phase as phase import matplotlib.pyplot as plt import statistics ########################################################## # Test Difference of identical phase # 1 #######################################################...
37
103
0.746755
# Test of phase Module (Manual) import numpy as np import math as math import data as data import phase as phase import matplotlib.pyplot as plt import statistics ########################################################## # Test Difference of identical phase # 1 #######################################################...
0
0
0
fb69a59361750e7a978d2d006b14c5727bcc5d1a
646
py
Python
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-06-02T16:37:03.000Z
2021-11-25T13:54:59.000Z
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
9
2019-01-03T14:57:39.000Z
2021-02-08T12:28:58.000Z
tests/shared/TestIpv4Validator.py
svensp/hcloud_ocf
aff82e100187f84f04916752ea3c1f95805fc54b
[ "MIT" ]
5
2019-08-13T16:35:41.000Z
2021-11-18T13:43:53.000Z
#!/usr/bin/python3 import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../..' ) from shared import Ipv4Validator from common import Parameter import unittest import mock if __name__ == '__main__': unittest.main()
25.84
75
0.668731
#!/usr/bin/python3 import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../..' ) from shared import Ipv4Validator from common import Parameter import unittest import mock class TestTestHostFinder(unittest.TestCase): def test_validates_ipv4(self): ip = Parameter('ip') ...
292
23
76
831f25d2fa4d1737702566ad6b4f189f8980db4a
1,816
py
Python
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_unittests/ut_td_1a/test_classique.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
""" @brief test log(time=1s) """ import sys import os import unittest from datetime import datetime from pyquickhelper.loghelper import fLOG try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
24.540541
106
0.595264
""" @brief test log(time=1s) """ import sys import os import unittest from datetime import datetime from pyquickhelper.loghelper import fLOG try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
965
20
158
be26e4e72445c847a40f17a9f0a78efbc25f7b30
2,170
py
Python
app/sensors/ads1115_piezo_sensor.py
frozenjava/TidePod-Pi
3f74a1c087d3b067d5a82989773123d90606e362
[ "MIT" ]
1
2020-05-27T01:13:31.000Z
2020-05-27T01:13:31.000Z
app/sensors/ads1115_piezo_sensor.py
frozenjava/TidePod-Pi
3f74a1c087d3b067d5a82989773123d90606e362
[ "MIT" ]
null
null
null
app/sensors/ads1115_piezo_sensor.py
frozenjava/TidePod-Pi
3f74a1c087d3b067d5a82989773123d90606e362
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import List, Generic from datetime import datetime import Adafruit_ADS1x15 from app.sensors.sensor import Sensor @dataclass
35
107
0.643779
from dataclasses import dataclass from typing import List, Generic from datetime import datetime import Adafruit_ADS1x15 from app.sensors.sensor import Sensor @dataclass class ADS1115PiezoConfig: channel: int gain: int time_interval: int gate_threshold: int class ADS1115PiezoSensor(Sensor[ADS1115P...
495
1,455
45
e20edf8307b8232cdf4b54a9c69cc4d832fa9fe2
1,060
py
Python
ship.py
baczkowskij/Star_Wars_Invasion
41cca74cd2885432a710e210f22269ffc9568e66
[ "MIT" ]
null
null
null
ship.py
baczkowskij/Star_Wars_Invasion
41cca74cd2885432a710e210f22269ffc9568e66
[ "MIT" ]
null
null
null
ship.py
baczkowskij/Star_Wars_Invasion
41cca74cd2885432a710e210f22269ffc9568e66
[ "MIT" ]
null
null
null
import pygame from pygame.sprite import Sprite
33.125
72
0.626415
import pygame from pygame.sprite import Sprite class Ship(Sprite): def __init__(self,ai_game): super().__init__() self.screen = ai_game.screen self.screen_rect = ai_game.screen.get_rect() self.image = pygame.image.load("data/x_wing.bmp") self.rect = self.image.get_rect() ...
787
205
22
e808618cb7b31d99f35db8ba3b0a90fe6d9e417a
8,194
py
Python
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
9
2018-11-25T02:13:12.000Z
2019-01-24T17:52:03.000Z
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
5
2018-11-25T13:54:39.000Z
2018-12-23T22:15:03.000Z
NCS1/Classes/Data.py
AdamMiltonBarker/ALL-Detection-System-2019
d548aec257d89927a4e933c2487606bfbc64b02f
[ "MIT" ]
6
2019-05-05T15:38:34.000Z
2020-02-21T14:08:06.000Z
############################################################################################ # # Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project # Repository: ALL Detection System 2019 # Project: Facial Authentication Server # # Author: Adam Milton-Barker (AdamMilton...
35.318966
133
0.562729
############################################################################################ # # Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project # Repository: ALL Detection System 2019 # Project: Facial Authentication Server # # Author: Adam Milton-Barker (AdamMilton...
429
0
27
e3f9507871806531b8e8c9ee4673f9fcc5fbd87d
53,577
py
Python
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
Instrument_Turi_Project/venv/lib/python3.6/site-packages/mxnet/ndarray/gen_sparse.py
fozoglu/instrument-recognition
8cc14a481c2736c4ba55f48f00794684271d82cd
[ "MIT" ]
null
null
null
# File content is auto-generated. Do not modify. # pylint: skip-file from ._internal import NDArrayBase from ..base import _Null def ElementWiseSum(*args, **kwargs): r"""Adds all input arguments element-wise. .. math:: add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n ``add_n`` is potentially mor...
26.483935
602
0.60819
# File content is auto-generated. Do not modify. # pylint: skip-file from ._internal import NDArrayBase from ..base import _Null def ElementWiseSum(*args, **kwargs): r"""Adds all input arguments element-wise. .. math:: add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n ``add_n`` is potentially mor...
0
0
0
45e2384aaa2dcdf1e8cbcdbe1b60819efd424ddd
180
py
Python
addon/pycThermopack/pyctp/platform_specifics.py
Helarga/thermopack
2f9231c921b8133ccb41749ca4d7d6f57fe0ef44
[ "MIT" ]
28
2020-10-14T07:51:21.000Z
2022-03-21T04:59:23.000Z
addon/pycThermopack/pyctp/platform_specifics.py
Helarga/thermopack
2f9231c921b8133ccb41749ca4d7d6f57fe0ef44
[ "MIT" ]
20
2020-10-26T11:43:43.000Z
2022-03-30T22:06:30.000Z
addon/pycThermopack/pyctp/platform_specifics.py
morteham/thermopack
67deaf74a2ae974e880be25026738cc32e3a6c1e
[ "MIT" ]
13
2020-10-27T13:04:19.000Z
2022-03-21T04:59:24.000Z
# Module for platform specific stuff. from . import map_platform_specifics
25.714286
72
0.838889
# Module for platform specific stuff. from . import map_platform_specifics def get_platform_specifics(): return map_platform_specifics.get_platform_specifics_from_platform()
81
0
23
b57231936b242854c52779803cd114c32679bd5e
2,431
py
Python
server/inventory_item/views.py
makchamp/ALTA
eaa52a91a0bc19e3bb9ee803fac28f056ecff870
[ "Apache-2.0" ]
null
null
null
server/inventory_item/views.py
makchamp/ALTA
eaa52a91a0bc19e3bb9ee803fac28f056ecff870
[ "Apache-2.0" ]
3
2020-10-10T06:26:45.000Z
2021-01-29T22:06:51.000Z
server/inventory_item/views.py
makchamp/ALTA
eaa52a91a0bc19e3bb9ee803fac28f056ecff870
[ "Apache-2.0" ]
null
null
null
from rest_framework import viewsets from rest_framework import filters from rest_framework.permissions import IsAuthenticated from rest_framework.pagination import PageNumberPagination from .serializers import ItemSerializer from .models import Item class CustomSearchFilter(filters.SearchFilter): """ Filte...
38.587302
91
0.658988
from rest_framework import viewsets from rest_framework import filters from rest_framework.permissions import IsAuthenticated from rest_framework.pagination import PageNumberPagination from .serializers import ItemSerializer from .models import Item class DynamicSearchFilter(filters.SearchFilter): def get_search...
1,191
143
98
1fa38135a0d19f9640d49eb49191283aaa77867e
4,216
py
Python
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
28
2017-04-25T10:06:38.000Z
2022-02-09T07:25:34.000Z
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
null
null
null
m2cpp.py
emc2norway/m2cpp
81943057c184c539b409282cbbd47bbf933db04f
[ "BSD-3-Clause" ]
5
2017-04-25T17:54:53.000Z
2022-03-21T20:15:15.000Z
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob import matlab2cpp hstring = "*** Matlab2cpp version " + str(matlab2cpp.__version__) + " ***\n\n" + """\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and semi-automatic tr...
40.152381
118
0.696157
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob import matlab2cpp hstring = "*** Matlab2cpp version " + str(matlab2cpp.__version__) + " ***\n\n" + """\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and semi-automatic tr...
0
0
0
c656ec934e368eacdd0825f8fd6b30c88276fee3
5,075
py
Python
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
199
2020-08-25T00:39:19.000Z
2022-03-03T09:00:46.000Z
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
2
2020-08-28T04:38:25.000Z
2021-09-16T06:53:04.000Z
biggan_discovery/hessian_penalty.py
andreasjansson/OroJaR
ebb8c0333bbd33c063b6dd4a21a0559eb86d13e9
[ "BSD-2-Clause" ]
22
2020-08-25T08:46:51.000Z
2022-01-03T14:20:27.000Z
import torch def rademacher(shape, gpu=True): """ Creates a random tensor of size [shape] under the Rademacher distribution (P(x=1) == P(x=-1) == 0.5) """ x = torch.empty(shape) if gpu: x = x.cuda() x.random_(0, 2) x[x == 0] = -1 return x def second_directional_derivative(G, ...
44.517544
119
0.652808
import torch def rademacher(shape, gpu=True): """ Creates a random tensor of size [shape] under the Rademacher distribution (P(x=1) == P(x=-1) == 0.5) """ x = torch.empty(shape) if gpu: x = x.cuda() x.random_(0, 2) x[x == 0] = -1 return x def second_directional_derivative(G, ...
1,241
0
69
816bf89da47faf24ec8824adc1c762d92b8d7bc5
4,221
py
Python
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
t/unit/asynchronous/http/test_http.py
CountRedClaw/kombu
14d395aa859b905874d8b4abd677a4c7ac86e10b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations from io import BytesIO from unittest.mock import Mock import pytest from vine import promise import t.skip from kombu.asynchronous import http from kombu.asynchronous.http.base import BaseClient, normalize_header from kombu.exceptions import HttpError from t.mocks import PromiseMoc...
27.057692
75
0.614309
from __future__ import annotations from io import BytesIO from unittest.mock import Mock import pytest from vine import promise import t.skip from kombu.asynchronous import http from kombu.asynchronous.http.base import BaseClient, normalize_header from kombu.exceptions import HttpError from t.mocks import PromiseMoc...
3,294
216
301
d87e43b6491c4f731ff2ee4f47b555a2d95633c4
6,237
py
Python
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
113
2015-03-10T03:10:16.000Z
2022-01-19T12:26:35.000Z
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
29
2016-03-06T18:56:59.000Z
2022-02-06T19:36:30.000Z
burger/toppings/sounds.py
mat-1/Burger
80f12b6c09d4f6781ec766c4d0790847805b051f
[ "MIT" ]
23
2015-03-10T04:51:51.000Z
2021-12-16T12:43:48.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
38.030488
100
0.575116
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
4,007
0
26
a2a6d2c66b50c18623dd7b11cffa422c1a64fba5
14,034
py
Python
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
1
2020-06-09T15:11:02.000Z
2020-06-09T15:11:02.000Z
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
pipelines/toast_ground_sim_simple.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """ Simpler version of the ground simulation script """ import argparse import dateutil.parser import...
28.294355
87
0.608308
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """ Simpler version of the ground simulation script """ import argparse import dateutil.parser import...
8,008
0
115
abec02c390148730d0ab72efb05642ec6bb9ec61
235
py
Python
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
1
2019-07-31T15:14:30.000Z
2019-07-31T15:14:30.000Z
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
null
null
null
argparsetools/types/datetimes.py
Lukisn/argparsetools
b02a42ef3aa51bc4d68c8d0433e6306a7a685192
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Type checking functions for datetime related types for use with arparse.""" from argparse import ArgumentTypeError
23.5
78
0.748936
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Type checking functions for datetime related types for use with arparse.""" from argparse import ArgumentTypeError def datetime_string(string, format): raise NotImplementedError
45
0
23
6377fd6481d1fb580855eaf03c8de68704f1a558
32,167
py
Python
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
13
2016-03-14T17:55:03.000Z
2021-03-26T07:18:26.000Z
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
7
2016-08-04T17:39:11.000Z
2017-09-19T13:42:35.000Z
pyhpeimc/plat/device.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
17
2016-03-03T05:24:20.000Z
2022-03-10T08:16:31.000Z
#!/usr/bin/env python3 # coding=utf-8 # author: @netmanchris # -*- coding: utf-8 -*- """ This module contains functions for working with the device capabilities of the HPE IMC NMS platform using the RESTful API """ # This section imports required libraries import json import requests from pyhpeimc.auth import HEADE...
35.940782
120
0.661641
#!/usr/bin/env python3 # coding=utf-8 # author: @netmanchris # -*- coding: utf-8 -*- """ This module contains functions for working with the device capabilities of the HPE IMC NMS platform using the RESTful API """ # This section imports required libraries import json import requests from pyhpeimc.auth import HEADE...
31
0
23
a4244f0fbcffc9f9abb10abfad68b90676596106
1,207
py
Python
canadapost/objects/option.py
archeti-org/canadapost
96898e8eb81529ed857ec61aa80c73fd0827c7e5
[ "Apache-2.0" ]
null
null
null
canadapost/objects/option.py
archeti-org/canadapost
96898e8eb81529ed857ec61aa80c73fd0827c7e5
[ "Apache-2.0" ]
null
null
null
canadapost/objects/option.py
archeti-org/canadapost
96898e8eb81529ed857ec61aa80c73fd0827c7e5
[ "Apache-2.0" ]
null
null
null
from .base import ( CPObject, TextField, ObjectField, BooleanField, LinkField, CollectionField ) from .qualifier import Qualifier
33.527778
78
0.619718
from .base import ( CPObject, TextField, ObjectField, BooleanField, LinkField, CollectionField ) from .qualifier import Qualifier class Option(CPObject): _name = 'option' _fields = { "code": TextField('option-code'), "name": TextField('option-name'), "price": TextField('option-pri...
0
1,049
23
bf396846a675bc0ea10ca6db7a5c883da3aa26e8
1,432
py
Python
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
Libraries_Benchmark/Normally_distributed_dataset_experiments/Code/Python/openmined_pydp.py
gonzalo-munillag/Benchmarking_Differential_Privacy_Analytics_Libraries
eb0aaa38686812112d421085b0b61fa9880c4f87
[ "MIT" ]
null
null
null
from pydp.algorithms import laplacian as dp import numpy as np import pandas as pd import time import os import psutil from utils import * epsilon = pd.read_pickle('epsilon.pkl') library_name = 'pydp'
39.777778
203
0.643156
from pydp.algorithms import laplacian as dp import numpy as np import pandas as pd import time import os import psutil from utils import * epsilon = pd.read_pickle('epsilon.pkl') library_name = 'pydp' def openmind_pydp_single_query(dataset_folder_path, number_of_csv_files, query_name, number_of_experiments): f...
1,190
0
23
29ff2fdd120271a6b26f455b6fce77c49a675b6e
99
py
Python
LPYTHON-Exercies/vnstockai/stockdataapi/apps.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
LPYTHON-Exercies/vnstockai/stockdataapi/apps.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
LPYTHON-Exercies/vnstockai/stockdataapi/apps.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
from django.apps import AppConfig
16.5
36
0.777778
from django.apps import AppConfig class StockdataapiConfig(AppConfig): name = 'stockdataapi'
0
41
23
0225cd4a747f7101c950fab541053c3f752e28e5
1,372
py
Python
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
nsist/tests/test_main.py
bastimeyer/pynsist
ca4c2cea9c0c1eba277d9cd79f30eb61ac0951de
[ "MIT" ]
null
null
null
import io from pathlib import Path import re import responses from shutil import copy from testpath import MockCommand, modified_env, assert_isfile, assert_isdir from testpath.tempdir import TemporaryWorkingDirectory from zipfile import ZipFile from nsist import main from nsist.util import CACHE_ENV_VAR from .utils im...
30.488889
79
0.684402
import io from pathlib import Path import re import responses from shutil import copy from testpath import MockCommand, modified_env, assert_isfile, assert_isdir from testpath.tempdir import TemporaryWorkingDirectory from zipfile import ZipFile from nsist import main from nsist.util import CACHE_ENV_VAR from .utils im...
923
0
45
dfd4bbbd85d05603f82476217937f7f0a8d5a223
8,019
py
Python
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
42
2015-02-09T10:17:26.000Z
2021-12-21T09:38:04.000Z
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
3
2015-03-20T12:00:40.000Z
2015-03-20T12:01:16.000Z
magni/utils/config.py
SIP-AAU/Magni
6328dc98a273506f433af52e6bd394754a844550
[ "BSD-2-Clause" ]
14
2015-04-28T03:08:32.000Z
2021-07-24T13:29:24.000Z
""" .. Copyright (c) 2014-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing a robust configger class. Routine listings ---------------- Configger(object) Provide functionality to access a set of configuration options. Notes ----- This module does n...
25.538217
79
0.56416
""" .. Copyright (c) 2014-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing a robust configger class. Routine listings ---------------- Configger(object) Provide functionality to access a set of configuration options. Notes ----- This module does n...
1,136
0
117
238c4fbb86fe849ff908da43f3497e8471d121f4
217
py
Python
examples/grouped_boxplot.py
PhilipeRLeal/seaborn
c1b49102b0b38223fd5cf9811427368250b586a2
[ "MIT", "BSD-3-Clause" ]
3
2016-01-25T16:54:25.000Z
2020-05-01T15:15:30.000Z
examples/grouped_boxplot.py
PureW/seaborn
f400d86002c6d4b2d67eb9740adad908e84f8328
[ "MIT", "BSD-3-Clause" ]
1
2021-06-23T16:40:53.000Z
2021-06-23T16:40:53.000Z
examples/grouped_boxplot.py
PureW/seaborn
f400d86002c6d4b2d67eb9740adad908e84f8328
[ "MIT", "BSD-3-Clause" ]
2
2019-04-02T19:52:25.000Z
2021-07-06T21:17:27.000Z
""" Grouped boxplots ================ """ import seaborn as sns sns.set(style="ticks") tips = sns.load_dataset("tips") sns.boxplot("day", "total_bill", "sex", tips, palette="PRGn") sns.despine(offset=10, trim=True)
18.083333
61
0.640553
""" Grouped boxplots ================ """ import seaborn as sns sns.set(style="ticks") tips = sns.load_dataset("tips") sns.boxplot("day", "total_bill", "sex", tips, palette="PRGn") sns.despine(offset=10, trim=True)
0
0
0
380c4076778a5b91bf6b65e5d942d1230724a161
2,529
py
Python
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
null
null
null
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
null
null
null
plugins/polio/admin.py
BLSQ/iaso-copy
85fb17f408c15e8c2d730416d1312f58f8db39b7
[ "MIT" ]
1
2022-03-23T16:44:12.000Z
2022-03-23T16:44:12.000Z
import gspread.utils from django.contrib import admin from django.utils.safestring import mark_safe from .models import ( Campaign, Preparedness, Surge, Round, Config, CountryUsersGroup, URLCache, SpreadSheetImport, LQASIMCache, IMStatsCache, ) admin.site.register(Campaign,...
30.107143
100
0.596283
import gspread.utils from django.contrib import admin from django.utils.safestring import mark_safe from .models import ( Campaign, Preparedness, Surge, Round, Config, CountryUsersGroup, URLCache, SpreadSheetImport, LQASIMCache, IMStatsCache, ) class CampaignAdmin(admin.ModelA...
1,302
488
69
7149196c4a39f227832e0055528d98c424a3c906
1,522
py
Python
src/settings/cartpole_target.py
ginevracoal/adversarialGAN
7a38e037a5ddbbe0bb4daed35fcb0e6fbf9b311e
[ "CC-BY-4.0" ]
1
2020-12-15T03:03:47.000Z
2020-12-15T03:03:47.000Z
src/settings/cartpole_target.py
ginevracoal/adversarialGAN
7a38e037a5ddbbe0bb4daed35fcb0e6fbf9b311e
[ "CC-BY-4.0" ]
null
null
null
src/settings/cartpole_target.py
ginevracoal/adversarialGAN
7a38e037a5ddbbe0bb4daed35fcb0e6fbf9b311e
[ "CC-BY-4.0" ]
1
2020-11-05T09:35:11.000Z
2020-11-05T09:35:11.000Z
import numpy as np
35.395349
106
0.603154
import numpy as np def get_settings(name, mode): safe_theta = 0.2 safe_dist = 2. robustness_theta = f'G(theta >= -{safe_theta} & theta <= {safe_theta})' robustness_dist = f'G(dist <= {safe_dist})' alpha=0.4 # distace robustness weight norm_theta=1.5 norm_dist=30. # PARAMS GRID ...
1,481
0
23
8d43939abe7f45a191c9e77b134e484966644ca2
593
py
Python
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
readframe.py
trungbanh/hand_dance
b4e985eaf94fa3f27b61b3f9697e006a56e3604a
[ "Apache-2.0" ]
null
null
null
import cv2 def read(path, video): """ @get path, video as string @return void """ realpath = path + video i = 0 myvideo = cv2.VideoCapture(realpath) while(myvideo.isOpened()): ret, frame = myvideo.read() i += 1 cv2.imshow('frame', frame) if (c...
19.129032
53
0.532884
import cv2 def read(path, video): """ @get path, video as string @return void """ realpath = path + video i = 0 myvideo = cv2.VideoCapture(realpath) while(myvideo.isOpened()): ret, frame = myvideo.read() i += 1 cv2.imshow('frame', frame) if (c...
0
0
0
45b1655a63f0b4308227be11e06df93b3de01b10
779
py
Python
tests/conftest.py
Bakhtiyar-Garashov/flake8-fastapi
81e774defcae377e77c1986ca780a922b27d2757
[ "MIT" ]
20
2021-06-01T20:53:46.000Z
2022-01-29T21:35:46.000Z
tests/conftest.py
Bakhtiyar-Garashov/flake8-fastapi
81e774defcae377e77c1986ca780a922b27d2757
[ "MIT" ]
13
2021-06-02T15:26:22.000Z
2021-07-25T13:27:59.000Z
tests/conftest.py
Bakhtiyar-Garashov/flake8-fastapi
81e774defcae377e77c1986ca780a922b27d2757
[ "MIT" ]
3
2021-06-01T21:16:58.000Z
2022-01-29T21:39:29.000Z
import os from pathlib import Path from typing import List import pytest
31.16
69
0.667522
import os from pathlib import Path from typing import List import pytest def filter_files(parent: Path, pattern: str) -> List[str]: codes = [] for file in os.listdir(parent): if file.startswith(pattern): codes.append((parent / file).read_text()) return codes def pytest_generate_test...
657
0
46
c4865c0d2e04d02b69cca31241d7c4b1b2c9cb5e
10,597
py
Python
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
balloon_learning_environment/agents/quantile_agent.py
taodav/balloon-learning-environment
4beb45f52ab7127a4c051df25894738420e8e691
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment 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 require...
41.556863
103
0.670567
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment 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 require...
3,731
0
150
1aaabbb6aefc564f534c47a529184a713858f26b
10,446
py
Python
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
6
2021-09-07T13:32:28.000Z
2022-03-30T21:32:17.000Z
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
null
null
null
scripts/preprocess.py
edwardoughton/globalsat
f4d53e94eb54f939a6afa816810ba1ff5bbf83cf
[ "MIT" ]
null
null
null
""" Process settlement layer Written by Ed Oughton. December 2020 """ import os import configparser import json import math import glob import numpy as np import pandas as pd import geopandas as gpd import pyproj from shapely.geometry import Point, LineString, Polygon, MultiPolygon, shape, mapping, box from shapely....
26.716113
93
0.645319
""" Process settlement layer Written by Ed Oughton. December 2020 """ import os import configparser import json import math import glob import numpy as np import pandas as pd import geopandas as gpd import pyproj from shapely.geometry import Point, LineString, Polygon, MultiPolygon, shape, mapping, box from shapely....
0
0
0
c2947a27a4fe3fa1fdbb5b79bc22f70941807f2d
373
py
Python
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
scripts/plot_hists.py
jrekoske/reduced-order-shaking
cd01ef9d6a313a06d2083d7dcb1cc59cb767cc47
[ "MIT" ]
null
null
null
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(9, 3)) cols = ['vp', 'vs', 'rho'] labels = ['$V_p$ (m/s)', '$V_s$ (m/s)', 'Density (kg/m$^3$)'] for i, ax in enumerate(axes): ax.hist(df[cols[i]], density=True, edgecolor='k', linewidth=0.5) ax.set_xlabel(labels[i]) ax.set_ylabel('Probability') plt.tight_l...
33.909091
68
0.627346
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(9, 3)) cols = ['vp', 'vs', 'rho'] labels = ['$V_p$ (m/s)', '$V_s$ (m/s)', 'Density (kg/m$^3$)'] for i, ax in enumerate(axes): ax.hist(df[cols[i]], density=True, edgecolor='k', linewidth=0.5) ax.set_xlabel(labels[i]) ax.set_ylabel('Probability') plt.tight_l...
0
0
0
bc70228e599dcf695ef31aae0d14d06e8973a735
4,059
py
Python
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
breadthanalysis.py
oxym/honeypot_analysis
7b2d00f935a3012e235bcf01e9fd9ee8450bd1a0
[ "MIT" ]
null
null
null
import re import json from functools import reduce from operator import itemgetter from ip2loc import ip2loc, ip2loc_bulk from funcs import count_occurence, folding, get_events_before_timestamp, get_timestamp, get_first_timestamp, get_unique_values LOG_FILE_PATH = 'honey.log' COUNTRY_STAT_HEADER_FORMAT = '{:<2...
43.180851
160
0.703868
import re import json from functools import reduce from operator import itemgetter from ip2loc import ip2loc, ip2loc_bulk from funcs import count_occurence, folding, get_events_before_timestamp, get_timestamp, get_first_timestamp, get_unique_values LOG_FILE_PATH = 'honey.log' COUNTRY_STAT_HEADER_FORMAT = '{:<2...
47
0
25
461d2fc40a4ede7edcebc5d960da4388fa3abe0e
9,504
py
Python
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
LL_RR_faceAligner.py
keshariS/FacialAsymmetry
8686f914c1af019b6dcb1484c4feace7fbfdcc09
[ "MIT" ]
null
null
null
from imutils import face_utils from imutils.face_utils import FaceAligner import numpy as np import imutils import dlib import cv2 from skimage.metrics import structural_similarity as ssim #import os import glob #import time from tkinter import * import tkinter as tk from tkinter import filedialog from pandas import D...
40.965517
148
0.650779
from imutils import face_utils from imutils.face_utils import FaceAligner import numpy as np import imutils import dlib import cv2 from skimage.metrics import structural_similarity as ssim #import os import glob #import time from tkinter import * import tkinter as tk from tkinter import filedialog from pandas import D...
2,220
0
23
03b789ec8ee0e70dbab1e3e6a321e2b1b04b9baa
453
py
Python
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
null
null
null
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
2
2021-09-28T05:42:28.000Z
2022-02-26T10:28:38.000Z
talk_like/scraper.py
devacto/talk_like
52b8864255c21d131f9414b7755a7aa21ed63d2e
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_scraper.ipynb (unless otherwise specified). __all__ = ['Scraper', 'print_something'] # Cell # Cell from fastcore.foundation import patch from facebook_scraper import get_posts @patch # Cell
20.590909
90
0.739514
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_scraper.ipynb (unless otherwise specified). __all__ = ['Scraper', 'print_something'] # Cell class Scraper: def __init__(self, username=''): self.username = username # Cell from fastcore.foundation import patch from facebook_scraper import get_posts @patch ...
125
-7
94
611d47a1836149111477e7f762985ba05e3cb24d
8,027
py
Python
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
tests/framework_starlette/test_application.py
Sybret/newrelic-python-agent
ca208ec0ab916dffceb225794acb032d22815899
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
39.737624
167
0.749969
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
3,422
0
220
f17a9dc7dd89f46e01de769ee41ea37985d718e1
211
py
Python
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
3
2018-06-28T07:09:04.000Z
2019-03-04T14:43:52.000Z
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
null
null
null
snippets/Jira Rest API Consumer/main.py
keremkoseoglu/Python-Library
f66ab246da4eabea94596494cf2bc9b416b65b1d
[ "MIT" ]
5
2018-06-28T07:12:28.000Z
2021-06-03T18:20:21.000Z
import jira __URL = "http://jira.example.com" __USER = "my_user" __PASS = "my_pass" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
21.1
42
0.739336
import jira __URL = "http://jira.example.com" __USER = "my_user" __PASS = "my_pass" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
0
0
0
d1d4046c56da08fd4fd832b87470ceb2640e55da
5,105
py
Python
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
null
null
null
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
1
2022-03-20T02:04:24.000Z
2022-03-20T02:04:24.000Z
backend/app/routers/videos.py
jcwillox/deeplabcut-webui
6cdf6c33486f416551172a3285919dff3b6a8b90
[ "MIT" ]
null
null
null
import os from typing import List import cv2 from fastapi import APIRouter, Depends, HTTPException, status from fastapi.requests import Request from fastapi.responses import FileResponse from natsort import os_sorted from pydantic import BaseModel, validator from .projects import ProjectType from ..config import Sett...
31.319018
80
0.687953
import os from typing import List import cv2 from fastapi import APIRouter, Depends, HTTPException, status from fastapi.requests import Request from fastapi.responses import FileResponse from natsort import os_sorted from pydantic import BaseModel, validator from .projects import ProjectType from ..config import Sett...
3,645
291
268
a0c69bef70fb2b54318bf150b6bf9daab3eb791e
378
py
Python
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
1
2016-04-01T04:02:28.000Z
2016-04-01T04:02:28.000Z
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
Deprecated/GGP/kif/R03_mod/test.py
sleyzerzon/soar
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
[ "Unlicense" ]
null
null
null
r = range(8) for x in r: for y in r: for x1 in r: if x < x1: print '(nCell %d east %d %d %d %d)' % (x1-x, x, y, x1, y) elif x > x1: print '(nCell %d west %d %d %d %d)' % (x-x1, x, y, x1, y) for y1 in r: if y < y1: print '(nCell %d south %d %d %d %d)' % (y1-y, x, y, x, y1) elif y > y1: p...
27
62
0.452381
r = range(8) for x in r: for y in r: for x1 in r: if x < x1: print '(nCell %d east %d %d %d %d)' % (x1-x, x, y, x1, y) elif x > x1: print '(nCell %d west %d %d %d %d)' % (x-x1, x, y, x1, y) for y1 in r: if y < y1: print '(nCell %d south %d %d %d %d)' % (y1-y, x, y, x, y1) elif y > y1: p...
0
0
0
6e1d744d3f6560c3f69b8910a8293effeb2a32fc
1,963
py
Python
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
null
null
null
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
1
2021-03-25T22:13:30.000Z
2021-03-25T22:13:30.000Z
examples/responses/lst_kml.py
nkoshell/iss-positioner
a8222e31394f232f1b6aef2b9c79304d8ccd6e12
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta import requests import lxml from pykml.factory import KML_ElementMaker as KML URL = 'http://iss-positioner.nkoshelev.tech/lst' NOW = datetime.utcnow() PARAMS = dict(start_dt=NOW.isoformat(), end_dt=(NOW + timedelta(days=21)).i...
30.671875
115
0.527254
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta import requests import lxml from pykml.factory import KML_ElementMaker as KML URL = 'http://iss-positioner.nkoshelev.tech/lst' NOW = datetime.utcnow() PARAMS = dict(start_dt=NOW.isoformat(), end_dt=(NOW + timedelta(days=21)).i...
1,389
0
46
0ef6f4cf9f99c15e487d9d9c4ca0ea1d83727ba6
1,571
py
Python
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
main.py
juliaaz/Naibe-Bayes-Classifier
eff29b5fbaa40ff09c71577e89aa9d07c3a727f9
[ "MIT" ]
null
null
null
""" Module for implementation Naive Bayes Classifier. """ import string from collections import Counter from typing import Dict from bayesian_classifier import * import pandas as pd from nltk.corpus import stopwords from nltk.tokenize import word_tokenize def process_data(data_file): """ Function for data pro...
29.092593
110
0.668364
""" Module for implementation Naive Bayes Classifier. """ import string from collections import Counter from typing import Dict from bayesian_classifier import * import pandas as pd from nltk.corpus import stopwords from nltk.tokenize import word_tokenize def process_data(data_file): """ Function for data pro...
0
0
0
02426620c8822e20a9020af67111430a424e28d7
15,007
py
Python
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
2
2015-04-03T14:15:48.000Z
2019-08-06T07:09:58.000Z
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
null
null
null
lib/query.py
vitalif/viewvc-4intranet
3c1cfef827ce3841fd10769f28f2e9f2117ba7fc
[ "BSD-2-Clause" ]
1
2022-01-11T13:02:46.000Z
2022-01-11T13:02:46.000Z
#!/usr/bin/env python # -*-python-*- # # Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For mor...
30.317172
87
0.540548
#!/usr/bin/env python # -*-python-*- # # Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For mor...
12,077
-6
226
5467ab58572e20cc133937491512034c881f8ee9
383
py
Python
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
22
2015-01-16T01:36:32.000Z
2020-06-08T00:46:18.000Z
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
9
2019-03-15T11:39:32.000Z
2019-04-30T00:59:50.000Z
vendor-local/src/django-piston/piston/__init__.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
13
2015-01-13T20:56:22.000Z
2022-02-23T06:01:17.000Z
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: # don't prevent use of paste if pkg_resources isn't installed from pkgutil import extend_path __path__ = extend_path(__path__, __name__) try: import modulefinder except ImportError: pass else: for p...
23.9375
65
0.741514
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: # don't prevent use of paste if pkg_resources isn't installed from pkgutil import extend_path __path__ = extend_path(__path__, __name__) try: import modulefinder except ImportError: pass else: for p...
0
0
0