hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
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
130
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
130
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.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
f112c3c7f3993e3a6456b203d747ff3176963dc6
1,366
py
Python
webroot/python/goldXp.py
peemoRoyal/dotadude
a90faee23a6ce7755d0c7266f1dcdb46816a8d6d
[ "MIT" ]
null
null
null
webroot/python/goldXp.py
peemoRoyal/dotadude
a90faee23a6ce7755d0c7266f1dcdb46816a8d6d
[ "MIT" ]
null
null
null
webroot/python/goldXp.py
peemoRoyal/dotadude
a90faee23a6ce7755d0c7266f1dcdb46816a8d6d
[ "MIT" ]
null
null
null
#!/usr/bin/python2.4 # Small script to show PostgreSQL and Pyscopg together # import json import psycopg2 import sys match_id = sys.argv[1] match_id = 2125002095 conn = psycopg2.connect("dbname='postgres' user='petergleixner' host='localhost' password=''") cursor = conn.cursor() cursor.execute('''SELECT replay_file F...
28.458333
150
0.662518
#!/usr/bin/python2.4 # Small script to show PostgreSQL and Pyscopg together # import json import psycopg2 import sys match_id = sys.argv[1] match_id = 2125002095 conn = psycopg2.connect("dbname='postgres' user='petergleixner' host='localhost' password=''") cursor = conn.cursor() cursor.execute('''SELECT replay_file F...
0
0
0
0
0
0
0
0
0
6b21fb3112526e3c6d130cc689c8ac09c81f6b73
1,032
py
Python
url_shortener/database/migrations/versions/0001_initial_migration.py
tiesjan/url-shortener
395ffc7b88dfe97c88914e8c4047690185b54ea7
[ "BSD-3-Clause" ]
null
null
null
url_shortener/database/migrations/versions/0001_initial_migration.py
tiesjan/url-shortener
395ffc7b88dfe97c88914e8c4047690185b54ea7
[ "BSD-3-Clause" ]
null
null
null
url_shortener/database/migrations/versions/0001_initial_migration.py
tiesjan/url-shortener
395ffc7b88dfe97c88914e8c4047690185b54ea7
[ "BSD-3-Clause" ]
null
null
null
""" Initial migration Revision ID: 4defdf508e78 Revises: (none) Create Date: 2021-10-19 20:14:59.350979 """ # revision identifiers, used by Alembic. revision = '4defdf508e78' down_revision = None branch_labels = None depends_on = None
24.571429
92
0.672481
""" Initial migration Revision ID: 4defdf508e78 Revises: (none) Create Date: 2021-10-19 20:14:59.350979 """ from alembic import op import sqlalchemy as sa from url_shortener.database.functions import utc_now # revision identifiers, used by Alembic. revision = '4defdf508e78' down_revision = None branch_labels = Non...
0
0
0
0
0
644
0
34
114
9e6783c49f88b098a9e898f6e0d5fe94e9ffbd08
755
py
Python
SplitterFile.py
abrahamalbert18/Image-Annotation-Application
bd5f0f7adffea2d749de568a41518986744d6846
[ "MIT" ]
null
null
null
SplitterFile.py
abrahamalbert18/Image-Annotation-Application
bd5f0f7adffea2d749de568a41518986744d6846
[ "MIT" ]
null
null
null
SplitterFile.py
abrahamalbert18/Image-Annotation-Application
bd5f0f7adffea2d749de568a41518986744d6846
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 17 16:25:07 2018 @author: Albert """ import pandas as pd import numpy as np df = pd.read_csv("./PreprocessedDataFiles/MergedPreprocessedDataFiles/MergedPreprocessedDrinkingDataLabels v2.csv") # originalDF = df df['index'] = range(0, len(df)) splitRatio = [0.6,0.2,0.2] ...
29.038462
115
0.684768
# -*- coding: utf-8 -*- """ Created on Mon Dec 17 16:25:07 2018 @author: Albert """ import pandas as pd import numpy as np df = pd.read_csv("./PreprocessedDataFiles/MergedPreprocessedDataFiles/MergedPreprocessedDrinkingDataLabels v2.csv") # originalDF = df df['index'] = range(0, len(df)) splitRatio = [0.6,0.2,0.2] ...
0
0
0
0
0
253
0
0
23
c525cf86b9d588c851934b1a4b781869fe7ba93d
11,363
py
Python
doubles/allowance.py
fakeNetflix/uber-repo-doubles
15e68dcf98f709b19a581915fa6af5ef49ebdd8a
[ "MIT" ]
150
2015-01-06T11:40:39.000Z
2022-01-10T10:29:59.000Z
doubles/allowance.py
fakeNetflix/uber-repo-doubles
15e68dcf98f709b19a581915fa6af5ef49ebdd8a
[ "MIT" ]
78
2015-01-13T21:04:13.000Z
2022-02-11T13:22:56.000Z
doubles/allowance.py
fakeNetflix/uber-repo-doubles
15e68dcf98f709b19a581915fa6af5ef49ebdd8a
[ "MIT" ]
22
2015-03-11T18:33:33.000Z
2022-01-13T01:54:19.000Z
_any = object()
31.131507
100
0.627299
import functools import inspect import six from doubles.call_count_accumulator import CallCountAccumulator from doubles.exceptions import MockExpectationError, VerifyingBuiltinDoubleArgumentError import doubles.lifecycle from doubles.verification import verify_arguments _any = object() def _get_future(): try: ...
0
738
0
9,338
0
877
0
117
271
167eec23d426971e1b913e6c330bb3abd675f342
241
py
Python
simple_wo_blueprint_example/myapp/models.py
gtsofa/mnseriesflask
58a84b698527ff3e790f0f7179193335bd440e3c
[ "MIT" ]
null
null
null
simple_wo_blueprint_example/myapp/models.py
gtsofa/mnseriesflask
58a84b698527ff3e790f0f7179193335bd440e3c
[ "MIT" ]
null
null
null
simple_wo_blueprint_example/myapp/models.py
gtsofa/mnseriesflask
58a84b698527ff3e790f0f7179193335bd440e3c
[ "MIT" ]
null
null
null
# myapp/models.py # define model here
24.1
48
0.684647
# myapp/models.py from myapp import db # define model here class Member(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50)) email = db.Column(db.String(50)) random = db.Column(db.Integer)
0
0
0
159
0
0
0
-1
44
1b3d360d3d104a1f9e57c1cbb72e5d717d4819c7
2,625
py
Python
external_libs/link/ci/run-tests.py
llloret/sp_link
b87ee622517fc68845b8f1d19c735c0e3bd05176
[ "MIT" ]
null
null
null
external_libs/link/ci/run-tests.py
llloret/sp_link
b87ee622517fc68845b8f1d19c735c0e3bd05176
[ "MIT" ]
null
null
null
external_libs/link/ci/run-tests.py
llloret/sp_link
b87ee622517fc68845b8f1d19c735c0e3bd05176
[ "MIT" ]
1
2021-02-22T11:37:41.000Z
2021-02-22T11:37:41.000Z
#!/usr/bin/env python import logging import sys if __name__ == '__main__': logging.basicConfig(format='%(message)s', level=logging.INFO, stream=sys.stdout) sys.exit(run_tests(parse_args()))
27.925532
88
0.649143
#!/usr/bin/env python import argparse import logging import os import sys from distutils.spawn import find_executable from subprocess import call def parse_args(): arg_parser = argparse.ArgumentParser() arg_parser.add_argument( '-t', '--target', help='Target to test') arg_parser.add_ar...
0
0
0
0
0
2,205
0
10
205
c458dae29fdfeaad53ba796122d7d999a3528470
241
py
Python
vnpy/trader/gateway/okcoinGateway/__init__.py
Adam1679/vnpy_adam
91e384c9372ee36689d9bb600fe7f45fbb68976e
[ "MIT" ]
1
2019-03-28T15:45:21.000Z
2019-03-28T15:45:21.000Z
vnpy/trader/gateway/okcoinGateway/__init__.py
Adam1679/vnpy_adam
91e384c9372ee36689d9bb600fe7f45fbb68976e
[ "MIT" ]
null
null
null
vnpy/trader/gateway/okcoinGateway/__init__.py
Adam1679/vnpy_adam
91e384c9372ee36689d9bb600fe7f45fbb68976e
[ "MIT" ]
null
null
null
# encoding: UTF-8 from vnpy.trader import vtConstant from okcoinGateway import OkcoinGateway gatewayClass = OkcoinGateway gatewayName = 'OKEX' gatewayDisplayName = u'OkEx' gatewayType = vtConstant.GATEWAYTYPE_BTC gatewayQryEnabled = True
20.083333
40
0.821577
# encoding: UTF-8 from vnpy.trader import vtConstant from okcoinGateway import OkcoinGateway gatewayClass = OkcoinGateway gatewayName = 'OKEX' gatewayDisplayName = u'OkEx' gatewayType = vtConstant.GATEWAYTYPE_BTC gatewayQryEnabled = True
0
0
0
0
0
0
0
0
0
c4e9bbaf69c142bb6022e73c6da05f216a4b4b48
947
py
Python
tests/unit/_helpers.py
metabolize-forks/booby
4e15e4e263dc387420398f808ffb345b760364d4
[ "Apache-2.0" ]
null
null
null
tests/unit/_helpers.py
metabolize-forks/booby
4e15e4e263dc387420398f808ffb345b760364d4
[ "Apache-2.0" ]
null
null
null
tests/unit/_helpers.py
metabolize-forks/booby
4e15e4e263dc387420398f808ffb345b760364d4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
16.910714
42
0.606125
# -*- coding: utf-8 -*- import collections def stub_validator(value): pass class Spy(object): def __init__(self): self.times_called = 0 def __call__(self): self.times_called += 1 class MyList(collections.MutableSequence): def __init__(self, *args): self._store = list(args...
0
0
0
793
0
14
0
-3
115
00cfbc4ba62476b2efa5d02b11c24a2c7078eb23
2,250
py
Python
notes/code/trie.py
Divya-Bhargavi/msds689
7bc4e2c5f06ef1889a887d7f49ec367749e473af
[ "MIT" ]
1
2019-08-26T04:11:13.000Z
2019-08-26T04:11:13.000Z
notes/code/trie.py
khanhbrandy/msds689
7f8ee791fda9d4fa65c4b047fef6b37948e5bb7f
[ "MIT" ]
null
null
null
notes/code/trie.py
khanhbrandy/msds689
7f8ee791fda9d4fa65c4b047fef6b37948e5bb7f
[ "MIT" ]
1
2019-07-02T08:58:59.000Z
2019-07-02T08:58:59.000Z
import os import psutil def search(root:TrieNode, s:str, i=0) -> bool: "Return true if s is prefix of word in Trie or full word in Trie" p = root while p is not None: if i>=len(s): return True e = ord(s[i]) - ord('a') if p.edges[e] is None: return False p = p.edges[e] ...
25
85
0.577333
from lolviz import * import time import os import psutil class TrieNode: def __init__(self): self.edges = [] # init edges, one per a..z letter for c in range(ord('a'), ord('z')+1): self.edges.append(None) def add(p:TrieNode, s:str, i=0) -> None: if i>=len(s): return e = ord(s[i]) - ord('a...
0
0
0
146
0
1,077
0
-11
182
df67bea4c9819ec52d3d60e17f46ad9238dc3a6d
3,166
py
Python
third_party/blink/renderer/build/scripts/make_runtime_features_utilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
third_party/blink/renderer/build/scripts/make_runtime_features_utilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
third_party/blink/renderer/build/scripts/make_runtime_features_utilities.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict def _validate_runtime_features_graph(features): """ Raises AssertionError when sanity check failed. @param...
34.791209
94
0.639924
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict def _error_message(message, feature, other_feature=None): message = 'runtime_enabled_features.json5: {}: {}'.format...
0
0
0
0
0
552
0
0
77
16f2f307f2a23c4ea9298468f8941e54ddc89b6d
587
py
Python
K_Mathematical_Modeling/Section 0/solutionExo2.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
7
2019-07-03T07:41:55.000Z
2022-02-06T20:25:37.000Z
K_Mathematical_Modeling/Section 0/solutionExo2.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
9
2019-03-14T15:15:09.000Z
2019-08-01T14:18:21.000Z
K_Mathematical_Modeling/Section 0/solutionExo2.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
11
2019-03-12T10:43:11.000Z
2021-10-05T12:15:00.000Z
Birds_year0 = 100 Birth_rate = 0.5 Death_rate = 0.2 # We repeat the "for" loop with an additional step: every time bird population reaches 1000, an epidemic kills half of them Time=[0] Birds=[100] for year in range (1,51) : Birds = Birds + [Birds[-1] + Birds[-1] * Birth_rate - Birds[-1] * Death_rate ] ...
27.952381
124
0.637138
Birds_year0 = 100 Birth_rate = 0.5 Death_rate = 0.2 # We repeat the "for" loop with an additional step: every time bird population reaches 1000, an epidemic kills half of them Time=[0] Birds=[100] for year in range (1,51) : Birds = Birds + [Birds[-1] + Birds[-1] * Birth_rate - Birds[-1] * Death_rate ] ...
0
0
0
0
0
0
0
0
0
0cd24154039f132d5322d370540651a26ee7c32d
3,682
py
Python
Topic_modelling_output.py
Dushyanttara/ASR_SD
a7bfc07fc8ecb3b77dfd43cdadbfb2a491b66103
[ "MIT" ]
null
null
null
Topic_modelling_output.py
Dushyanttara/ASR_SD
a7bfc07fc8ecb3b77dfd43cdadbfb2a491b66103
[ "MIT" ]
null
null
null
Topic_modelling_output.py
Dushyanttara/ASR_SD
a7bfc07fc8ecb3b77dfd43cdadbfb2a491b66103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Dec 6 00:06:55 2019 @author: - """ import pandas as pd import os from gensim import corpora, models from nltk.tokenize import RegexpTokenizer from nltk.corpus import stopwords os.getcwd() os.chdir('C:\\Users\\abhishekpandey\\Desktop') articles = pd.read_ex...
42.813953
156
0.710483
# -*- coding: utf-8 -*- """ Created on Fri Dec 6 00:06:55 2019 @author: - """ import pandas as pd import numpy as np from matplotlib import pyplot as plt import os from datetime import datetime from gensim import corpora, models, similarities from nltk.tokenize import RegexpTokenizer from nltk.corpus i...
0
0
0
0
0
787
0
34
119
75d3beb4b4c7a19de10f0742149b98b76a7a51f4
3,230
py
Python
dakara_server/playlist/management/commands/createplayer.py
DakaraProject/dakara-server
b28fc1a8561e431d562102932f3d6ff3607e545b
[ "MIT" ]
4
2018-07-24T18:22:16.000Z
2020-01-24T16:30:54.000Z
dakara_server/playlist/management/commands/createplayer.py
DakaraProject/dakara-server
b28fc1a8561e431d562102932f3d6ff3607e545b
[ "MIT" ]
88
2017-11-04T08:58:02.000Z
2022-03-30T11:39:08.000Z
dakara_server/playlist/management/commands/createplayer.py
DakaraProject/dakara-server
b28fc1a8561e431d562102932f3d6ff3607e545b
[ "MIT" ]
1
2018-05-05T15:37:20.000Z
2018-05-05T15:37:20.000Z
from django.contrib.auth import get_user_model UserModel = get_user_model() USERNAME_DEFAULT = "player"
27.606838
88
0.5613
from getpass import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError UserModel = get_user_model() USERNAME_DEFAULT = "player" class Command(BaseCommand): """Create the player special user.""" help = "Creat...
0
232
0
2,744
0
0
0
57
89
92bf5938cadd673401ef50232fe50e8eb090235a
24,621
py
Python
python/ga4gh/schemas/ga4gh/genotype_phenotype_service_pb2.py
david4096/ga4gh-schemas
774db498cc047cc64cc070325472c7dba60e6d42
[ "Apache-2.0" ]
114
2015-01-05T22:19:34.000Z
2017-02-18T18:51:22.000Z
python/ga4gh/schemas/ga4gh/genotype_phenotype_service_pb2.py
david4096/ga4gh-schemas
774db498cc047cc64cc070325472c7dba60e6d42
[ "Apache-2.0" ]
608
2015-01-06T00:24:39.000Z
2017-03-09T05:29:16.000Z
python/ga4gh/schemas/ga4gh/genotype_phenotype_service_pb2.py
david4096/ga4gh-schemas
774db498cc047cc64cc070325472c7dba60e6d42
[ "Apache-2.0" ]
98
2015-01-12T18:09:52.000Z
2017-02-15T15:49:17.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: ga4gh/schemas/ga4gh/genotype_phenotype_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goog...
46.454717
3,000
0.779213
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: ga4gh/schemas/ga4gh/genotype_phenotype_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goog...
0
0
0
0
0
0
0
21
22
910af70fde3d4b24a60b0a876965bc7f748573ce
4,695
py
Python
aiounittest/helpers.py
tmaila/aiounittest
c43d3b619fd6a8fd071758996a5f42310b0293dc
[ "MIT" ]
null
null
null
aiounittest/helpers.py
tmaila/aiounittest
c43d3b619fd6a8fd071758996a5f42310b0293dc
[ "MIT" ]
null
null
null
aiounittest/helpers.py
tmaila/aiounittest
c43d3b619fd6a8fd071758996a5f42310b0293dc
[ "MIT" ]
null
null
null
import asyncio def futurized(o): ''' Makes the given object to be awaitable. :param any o: Object to wrap :return: awaitable that resolves to provided object :rtype: asyncio.Future Anything passed to :code:`futurized` is wrapped in :code:`asyncio.Future`. This makes it awaitable (can be run ...
30.888158
147
0.594249
import asyncio import functools def futurized(o): ''' Makes the given object to be awaitable. :param any o: Object to wrap :return: awaitable that resolves to provided object :rtype: asyncio.Future Anything passed to :code:`futurized` is wrapped in :code:`asyncio.Future`. This makes it await...
0
658
0
0
0
278
0
-5
75
a01937274946e3d3dc59bb59097e6ddcb1f8f4f7
4,528
py
Python
daemon/core/gui/dialogs/alerts.py
kleberango/core
87ca431e73fec22faeaebd6b25fc76e0b165c639
[ "BSD-2-Clause" ]
null
null
null
daemon/core/gui/dialogs/alerts.py
kleberango/core
87ca431e73fec22faeaebd6b25fc76e0b165c639
[ "BSD-2-Clause" ]
null
null
null
daemon/core/gui/dialogs/alerts.py
kleberango/core
87ca431e73fec22faeaebd6b25fc76e0b165c639
[ "BSD-2-Clause" ]
1
2021-09-03T19:18:54.000Z
2021-09-03T19:18:54.000Z
""" check engine light """ from typing import TYPE_CHECKING if TYPE_CHECKING:
39.373913
87
0.628092
""" check engine light """ import tkinter as tk from tkinter import ttk from typing import TYPE_CHECKING, Dict, Optional from core.gui.dialogs.dialog import Dialog from core.gui.themes import PADX, PADY from core.gui.widgets import CodeText from core.gui.wrappers import ExceptionEvent, ExceptionLevel if TYPE_CHECKING...
0
0
0
4,141
0
0
0
125
182
13445cd76a57b0cfb98ffb3231749aa5d5c91508
195
py
Python
gamefixes/356500.py
manueliglesiasgarcia/protonfixes
d676b6bf39f6e4268b4791d3d71c6d74e2127121
[ "BSD-2-Clause" ]
54
2019-06-21T22:03:45.000Z
2022-03-20T19:24:36.000Z
gamefixes/356500.py
manueliglesiasgarcia/protonfixes
d676b6bf39f6e4268b4791d3d71c6d74e2127121
[ "BSD-2-Clause" ]
21
2020-06-13T22:49:18.000Z
2022-03-20T08:28:39.000Z
gamefixes/356500.py
manueliglesiasgarcia/protonfixes
d676b6bf39f6e4268b4791d3d71c6d74e2127121
[ "BSD-2-Clause" ]
53
2019-09-11T15:23:25.000Z
2022-03-20T08:18:49.000Z
""" Game fix for STAR WARS Galactic Battlegrounds Saga """ #pylint: disable=C0103
17.727273
54
0.728205
""" Game fix for STAR WARS Galactic Battlegrounds Saga """ #pylint: disable=C0103 from protonfixes import util def main(): util.protontricks('icodecs') util.protontricks('directplay')
0
0
0
0
0
59
0
7
46
9693d0adc1ee8de233d3015aa07f6141ff5843be
28
py
Python
test/login.py
huang880/test
9c65ffd470dd52633ded4eb2b8e1cd89d3b7c5d0
[ "MIT" ]
null
null
null
test/login.py
huang880/test
9c65ffd470dd52633ded4eb2b8e1cd89d3b7c5d0
[ "MIT" ]
null
null
null
test/login.py
huang880/test
9c65ffd470dd52633ded4eb2b8e1cd89d3b7c5d0
[ "MIT" ]
null
null
null
a=1 b=2 c=3 d=4 f=6
4
7
0.607143
a=1 b=2 c=3 d=4 你是不是个沙雕 f=6
21
0
0
0
0
0
0
0
0
e051ca2acbd4d511635ff08104c916ea3c6f9804
1,841
py
Python
tests/integration/tasks/test_azure_data_lake.py
gwieloch/viadot
8026c4f5e48e5bec7bf62ea3e3e044e81ef3321f
[ "MIT" ]
23
2021-05-04T13:28:30.000Z
2022-02-16T18:51:24.000Z
tests/integration/tasks/test_azure_data_lake.py
gwieloch/viadot
8026c4f5e48e5bec7bf62ea3e3e044e81ef3321f
[ "MIT" ]
142
2021-05-01T10:48:12.000Z
2022-03-28T15:00:06.000Z
tests/integration/tasks/test_azure_data_lake.py
gwieloch/viadot
8026c4f5e48e5bec7bf62ea3e3e044e81ef3321f
[ "MIT" ]
13
2021-05-14T18:28:10.000Z
2022-03-17T10:17:17.000Z
import uuid uuid_4 = uuid.uuid4() uuid_4_2 = uuid.uuid4() file_name = f"test_file_{uuid_4}.csv" file_name_2 = f"test_file_{uuid_4}.csv" adls_path = f"raw/supermetrics/{file_name}" adls_path_2 = f"raw/supermetrics/{file_name_2}" file_name_parquet = f"test_file_{uuid_4}.parquet" adls_path_parquet = f"raw/supermetrics/...
27.073529
80
0.767518
import os import uuid from viadot.sources import AzureDataLake from viadot.tasks import ( AzureDataLakeDownload, AzureDataLakeToDF, AzureDataLakeUpload, AzureDataLakeCopy, AzureDataLakeList, ) uuid_4 = uuid.uuid4() uuid_4_2 = uuid.uuid4() file_name = f"test_file_{uuid_4}.csv" file_name_2 = f"test...
0
0
0
0
0
1,057
0
135
205
3210d5af97fee381968e118be3cb3f5b7f008957
2,093
py
Python
denoising_autoencoder.py
JiananGao/DP-NMF
be96e67bd8955e46baa4d3f477f40c32a009c1cd
[ "MIT" ]
2
2019-03-16T16:59:39.000Z
2020-12-22T02:09:42.000Z
denoising_autoencoder.py
JiananGao/DP-NMF
be96e67bd8955e46baa4d3f477f40c32a009c1cd
[ "MIT" ]
null
null
null
denoising_autoencoder.py
JiananGao/DP-NMF
be96e67bd8955e46baa4d3f477f40c32a009c1cd
[ "MIT" ]
null
null
null
#Author: Satwik Bhattamishra import tensorflow.examples.tutorials.mnist.input_data as input_data if __name__ == '__main__': denoising_autoencoder()
26.493671
116
0.68753
#Author: Satwik Bhattamishra import tensorflow as tf import numpy as np import tensorflow.examples.tutorials.mnist.input_data as input_data def denoising_autoencoder(hidden_units= 500, prob=0.4): learning_rate = 0.001 batch_size = 50 n_epochs = 10 x = tf.placeholder(tf.float32, [None, 784], name='x') x_ = tf....
0
0
0
0
0
1,875
0
-1
68
a7c06cb92e54c73f18c82681723c99eff1f48301
1,097
py
Python
Array/longestMountain/longestMountain.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
Array/longestMountain/longestMountain.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
Array/longestMountain/longestMountain.py
qyp1997/leetcoder
4c01f11e5138cbb9aa12b4f6ef0c4a60d25b92c2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @Time : 2020/10/25 17:14 @Auth : Qi @IDE : PyCharm @Title: 845. @Link : https://leetcode-cn.com/problems/longest-mountain-in-array/ """ if __name__ == '__main__': # s = Solution() print(s.longestMountain([2, 1, 4, 7, 3, 2, 5])) print(s.longestMountain([0, 1, 0, 0, 1, 1,...
29.648649
76
0.441203
# -*- coding: utf-8 -*- """ @Time : 2020/10/25 17:14 @Auth : Qi @IDE : PyCharm @Title: 845. 数组中的最长山脉 @Link : https://leetcode-cn.com/problems/longest-mountain-in-array/ """ class Solution: def longestMountain(self, A) -> int: up, down, maxRet = 0, 0, 0 for i in range(1, len(A)): if A[...
36
0
0
693
0
0
0
0
23
004dae0bab2e65b2b02c2b31eb46c43d4c61bc03
3,626
py
Python
software/inpainting/inpainting_iterative_rgbd/inpaint_rgbd_tiled.py
venkai/deploy_core3d
6333c634f8f79b3ed9d7b13f39137c406f374a4f
[ "BSD-2-Clause" ]
3
2020-05-03T10:22:46.000Z
2021-06-26T16:17:09.000Z
software/inpainting/inpainting_iterative_rgbd/inpaint_rgbd_tiled.py
venkai/deploy_core3d
6333c634f8f79b3ed9d7b13f39137c406f374a4f
[ "BSD-2-Clause" ]
null
null
null
software/inpainting/inpainting_iterative_rgbd/inpaint_rgbd_tiled.py
venkai/deploy_core3d
6333c634f8f79b3ed9d7b13f39137c406f374a4f
[ "BSD-2-Clause" ]
1
2021-01-19T19:49:58.000Z
2021-01-19T19:49:58.000Z
import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description="Command for running the Inpainting Pipeline on RGBD satellite imagery") parser.add_argument('--gpu', type=str, default='0', help='the gpu that will be used, e.g "0"') parser.add_argument('--nrep', type=int, default=9,...
54.119403
129
0.664368
import os import time import cv2 from inference_new import * import argparse from glob import glob def main(): st = time.time() outputdir = args.outputdir if not os.path.isdir(outputdir): os.makedirs(outputdir) # Load network test_prototxt=args.trn_dir + '/test_' + args.model_type + ('_...
0
0
0
0
0
1,839
0
-27
133
6257c7f64cd12ee5ad761bbc7011d80335ead4b9
22,819
py
Python
threeML/utils/time_series/time_series.py
Husky22/threeML
2ef3401e3edf82ceffd85ad0a9ea9e8b2bba3520
[ "BSD-3-Clause" ]
null
null
null
threeML/utils/time_series/time_series.py
Husky22/threeML
2ef3401e3edf82ceffd85ad0a9ea9e8b2bba3520
[ "BSD-3-Clause" ]
null
null
null
threeML/utils/time_series/time_series.py
Husky22/threeML
2ef3401e3edf82ceffd85ad0a9ea9e8b2bba3520
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from __future__ import division __author__ = 'grburgess' # find out how many splits we need to make
29.55829
139
0.603401
from __future__ import print_function from __future__ import division from builtins import zip from builtins import range from builtins import object from past.utils import old_div __author__ = 'grburgess' import collections import os import numpy as np import pandas as pd from pandas import HDFStore from threeML.ex...
0
693
0
21,320
0
19
0
218
425
0f7f3b70073770b5b01ea972277895a04e2450c4
382
py
Python
serivce/run.py
LupusAnay/gateway-prototype
e40426e05ca7b2a83bfd8d31fec252086f586eb8
[ "MIT" ]
null
null
null
serivce/run.py
LupusAnay/gateway-prototype
e40426e05ca7b2a83bfd8d31fec252086f586eb8
[ "MIT" ]
null
null
null
serivce/run.py
LupusAnay/gateway-prototype
e40426e05ca7b2a83bfd8d31fec252086f586eb8
[ "MIT" ]
null
null
null
import requests import json from flask.cli import FlaskGroup from serivce.app import create_app app = create_app() data = json.dumps(dict(name='service', port='8000')) headers = {'Content-type': 'application/json'} requests.post('http://localhost:5000/instance', headers=headers, data=data) cli = FlaskGroup(app) i...
20.105263
75
0.73822
import requests import json from flask.cli import FlaskGroup from flask import jsonify from serivce.app import create_app app = create_app() data = json.dumps(dict(name='service', port='8000')) headers = {'Content-type': 'application/json'} requests.post('http://localhost:5000/instance', headers=headers, data=data)...
0
0
0
0
0
0
0
4
22
a5de7750593cb2f7bb8b789eae2fd2281336211a
24,635
py
Python
src/dorfromantik_helper/ui.py
mcdonnnj/dorfromantik_helper
adba24c135d54fc38d8879860972a869a0eba59e
[ "MIT" ]
null
null
null
src/dorfromantik_helper/ui.py
mcdonnnj/dorfromantik_helper
adba24c135d54fc38d8879860972a869a0eba59e
[ "MIT" ]
null
null
null
src/dorfromantik_helper/ui.py
mcdonnnj/dorfromantik_helper
adba24c135d54fc38d8879860972a869a0eba59e
[ "MIT" ]
null
null
null
"""Canvas that displays the full game board.""" # Standard Python Libraries # Third-Party Libraries
38.372274
97
0.577349
"""Canvas that displays the full game board.""" # Standard Python Libraries import tkinter as tk # Third-Party Libraries import numpy as np from . import constants from .board import DorfBoard class DorfBoardCanvas(tk.Canvas): def __init__( self, master, board, tile_canvas, pix_height, pix_width, *args,...
0
206
0
24,162
0
0
0
5
158
16ba5d46a3f627000bdc25262e6704e3cd4ff7a4
13,288
py
Python
tests/parsers/cups_ipp.py
jonathan-greig/plaso
b88a6e54c06a162295d09b016bddbfbfe7ca9070
[ "Apache-2.0" ]
6
2015-07-30T11:07:24.000Z
2021-07-23T07:12:30.000Z
tests/parsers/cups_ipp.py
jonathan-greig/plaso
b88a6e54c06a162295d09b016bddbfbfe7ca9070
[ "Apache-2.0" ]
null
null
null
tests/parsers/cups_ipp.py
jonathan-greig/plaso
b88a6e54c06a162295d09b016bddbfbfe7ca9070
[ "Apache-2.0" ]
1
2021-07-23T07:12:37.000Z
2021-07-23T07:12:37.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Parser test for MacOS Cups IPP Log files.""" import unittest if __name__ == '__main__': unittest.main()
35.060686
79
0.72637
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Parser test for MacOS Cups IPP Log files.""" import unittest from dfvfs.helpers import fake_file_system_builder from dfvfs.path import fake_path_spec from plaso.lib import definitions from plaso.lib import errors from plaso.parsers import cups_ipp from tests.parsers...
0
0
0
12,880
0
0
0
90
158
5cc078595469499a2573ffbe88997b94b12bfd24
769
py
Python
Backend/oeda/rtxlib/preprocessors/__init__.py
iliasger/OEDA
0b5d94156cfc2d9252062f5d90dcb266466498d6
[ "Apache-2.0" ]
2
2019-10-11T10:40:11.000Z
2021-05-17T14:56:18.000Z
Backend/oeda/rtxlib/preprocessors/__init__.py
iliasger/OEDA
0b5d94156cfc2d9252062f5d90dcb266466498d6
[ "Apache-2.0" ]
3
2022-02-15T05:11:34.000Z
2022-03-02T13:01:36.000Z
Backend/oeda/rtxlib/preprocessors/__init__.py
iliasger/OEDA
0b5d94156cfc2d9252062f5d90dcb266466498d6
[ "Apache-2.0" ]
2
2019-05-27T13:01:23.000Z
2020-10-23T14:47:31.000Z
from colorama import Fore from oeda.rtxlib.preprocessors.SparkPreProcessor import SparkPreProcessor def init_pre_processors(wf): """ we look into the workflows definition and run the required preprocessors """ if hasattr(wf, "pre_processors"): pp = wf.pre_processors for p in pp: if...
29.576923
84
0.622887
from colorama import Fore from oeda.log import * from oeda.rtxlib.preprocessors.SparkPreProcessor import SparkPreProcessor def init_pre_processors(wf): """ we look into the workflows definition and run the required preprocessors """ if hasattr(wf, "pre_processors"): pp = wf.pre_processors for...
0
0
0
0
0
0
0
1
23
aab2fb48530b34760ffc1b2b1c43e3ed7ef58254
260
py
Python
pythainlp/translate/__init__.py
wannaphongcom/pythai-nlp
efcbe7f1881351fadf62d28cc0415d22156a2e71
[ "Apache-2.0" ]
125
2016-06-27T06:16:38.000Z
2017-10-14T08:02:26.000Z
pythainlp/translate/__init__.py
wannaphongcom/pythainlp
efcbe7f1881351fadf62d28cc0415d22156a2e71
[ "Apache-2.0" ]
48
2016-08-31T02:01:03.000Z
2017-10-07T16:33:47.000Z
pythainlp/translate/__init__.py
wannaphongcom/pythai-nlp
efcbe7f1881351fadf62d28cc0415d22156a2e71
[ "Apache-2.0" ]
40
2016-06-27T00:19:12.000Z
2017-10-16T06:32:20.000Z
# -*- coding: utf-8 -*- """ Language translation. """ __all__ = [ "ThZhTranslator", "ZhThTranslator", "Translate" ] from pythainlp.translate.core import Translate from pythainlp.translate.zh_th import (ThZhTranslator, ZhThTranslator)
14.444444
46
0.673077
# -*- coding: utf-8 -*- """ Language translation. """ __all__ = [ "ThZhTranslator", "ZhThTranslator", "Translate" ] from pythainlp.translate.core import Translate from pythainlp.translate.zh_th import ( ThZhTranslator, ZhThTranslator, )
0
0
0
0
0
0
0
11
0
23102cfdc377911d6f7c24434ac0713380ea8134
1,005
py
Python
test/unit/ggrc/models/test_custom_attribute_definition.py
ks-manish/ggrc-core
f9499236e0c6d2e29ff9d2acf403fdecd9c8a173
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/unit/ggrc/models/test_custom_attribute_definition.py
ks-manish/ggrc-core
f9499236e0c6d2e29ff9d2acf403fdecd9c8a173
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/unit/ggrc/models/test_custom_attribute_definition.py
ks-manish/ggrc-core
f9499236e0c6d2e29ff9d2acf403fdecd9c8a173
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Test Custom Attribute Definition validation"""
34.655172
79
0.753234
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Test Custom Attribute Definition validation""" import unittest from mock import MagicMock from ggrc.models import all_models from ggrc.access_control import role as acr class TestCustomAttributeDefini...
0
0
0
694
0
0
0
34
113
0b7b1e425f8017f791073b532d42d48a2786d924
171
py
Python
13.py
kwoshvick/project-euler
d27370b0f22b51ad9ccb15afa912983d8fd8be5c
[ "MIT" ]
null
null
null
13.py
kwoshvick/project-euler
d27370b0f22b51ad9ccb15afa912983d8fd8be5c
[ "MIT" ]
null
null
null
13.py
kwoshvick/project-euler
d27370b0f22b51ad9ccb15afa912983d8fd8be5c
[ "MIT" ]
null
null
null
file = open("13") sum = 0 for numbers in file: #print(numbers.rstrip()) numbers = int(numbers) sum += numbers; print(sum) sum = str(sum) print(sum[:10])
10.6875
28
0.596491
file = open("13") sum = 0 for numbers in file: #print(numbers.rstrip()) numbers = int(numbers) sum += numbers; print(sum) sum = str(sum) print(sum[:10])
0
0
0
0
0
0
0
0
0
41a4a212bdd800f5254430c0e4838186564b6a70
5,422
py
Python
autoencoder_use_mnist.py
deeplearningathome/autoencoder
7cd4a54e1ed47bbcf0cf97e2eafc7cb0cc8ad1af
[ "MIT" ]
3
2017-08-08T09:43:12.000Z
2018-05-23T09:29:41.000Z
autoencoder_use_mnist.py
deeplearningathome/autoencoder
7cd4a54e1ed47bbcf0cf97e2eafc7cb0cc8ad1af
[ "MIT" ]
null
null
null
autoencoder_use_mnist.py
deeplearningathome/autoencoder
7cd4a54e1ed47bbcf0cf97e2eafc7cb0cc8ad1af
[ "MIT" ]
2
2016-12-26T09:27:00.000Z
2019-12-13T13:14:05.000Z
""" MIT License Copyright (c) 2016 deeplearningathome. http://deeplearningathome.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
50.672897
134
0.71007
""" MIT License Copyright (c) 2016 deeplearningathome. http://deeplearningathome.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
0
0
0
0
0
3,262
0
95
133
8dc572c5ddfe9278604ffcd87024633538f518d4
9,925
py
Python
www/app/views/api.py
YuiJL/myweblog
82f355d32b6d37cf329f1852459d40d5410de810
[ "MIT" ]
2
2016-09-18T12:41:44.000Z
2016-10-26T04:27:25.000Z
www/app/views/api.py
YuiJL/webblog
82f355d32b6d37cf329f1852459d40d5410de810
[ "MIT" ]
null
null
null
www/app/views/api.py
YuiJL/webblog
82f355d32b6d37cf329f1852459d40d5410de810
[ "MIT" ]
2
2016-09-22T05:31:18.000Z
2016-10-05T18:39:29.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Jiayi Li' from flask import Blueprint api = Blueprint('api', __name__, url_prefix='/api') APIS = ('blogs', 'users', 'comments') #************************************ #----------------APIs---------------- #************************************ ...
32.224026
109
0.556675
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Jiayi Li' import time, os, re from bson.objectid import ObjectId from werkzeug.utils import secure_filename from flask import request, redirect, url_for, jsonify, abort, Blueprint, make_response, g, flash, current_app from app import db from app.models im...
0
9,027
0
0
0
0
0
183
391
b37a81a05ea7a387843e0c8e55bac504975a6e81
1,091
py
Python
Python/Misc.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
1
2021-04-18T21:24:42.000Z
2021-04-18T21:24:42.000Z
Python/Misc.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
null
null
null
Python/Misc.py
Spectavi/video-diff
4ad28aea48877937f6b5b25f374f9c14eaf79212
[ "BSD-3-Clause" ]
null
null
null
import cv # TODO: This class doesn't seem to be used and is based on old OpenCV bindings. # Either finish the class or remove it. def convert_np_to_cvmat(img_np): """ This gives a: AttributeError: 'numpy.ndarray' object has no attribute 'from_array' ImageAlignment.template_image = ImageAlignment.temp...
36.366667
116
0.698442
import cv # TODO: This class doesn't seem to be used and is based on old OpenCV bindings. # Either finish the class or remove it. def convert_np_to_cvmat(img_np): """ This gives a: AttributeError: 'numpy.ndarray' object has no attribute 'from_array' ImageAlignment.template_image = ImageAlignment.temp...
0
0
0
0
0
441
0
0
23
148a619326f816979634a70896847110174d2691
6,456
py
Python
python/extract_small_fragments.py
maubarsom/biotico-tools
3e34e1fdde083e49da10f5afdae6a951246b8a94
[ "Apache-2.0" ]
1
2021-01-16T20:47:29.000Z
2021-01-16T20:47:29.000Z
python/extract_small_fragments.py
maubarsom/biotico-tools
3e34e1fdde083e49da10f5afdae6a951246b8a94
[ "Apache-2.0" ]
null
null
null
python/extract_small_fragments.py
maubarsom/biotico-tools
3e34e1fdde083e49da10f5afdae6a951246b8a94
[ "Apache-2.0" ]
1
2015-06-26T18:22:11.000Z
2015-06-26T18:22:11.000Z
#!/usr/bin/env python """ Script that uses output from cutadapt to quickly detect fully overlapping pairs. It is based on the fact that if sequencing adapters are trimmed from both paired-ends, the resulting fragment needs to be shorter than the pair-end length Depends of cutadapt seqio and xopen modules from version ...
33.978947
158
0.74272
#!/usr/bin/env python """ Script that uses output from cutadapt to quickly detect fully overlapping pairs. It is based on the fact that if sequencing adapters are trimmed from both paired-ends, the resulting fragment needs to be shorter than the pair-end length Depends of cutadapt seqio and xopen modules from version ...
0
0
0
837
0
2,680
0
-23
358
1420efe3a125985e64e2524aecee773b66a7a539
5,956
py
Python
models/audio_net.py
CFM-MSG/MTSC_VSS
9536f8dc8d0282c3d0e6e2beee6e2cac490d6cb1
[ "MIT" ]
1
2021-11-20T12:31:24.000Z
2021-11-20T12:31:24.000Z
models/audio_net.py
CFM-MSG/MTSC_VSS
9536f8dc8d0282c3d0e6e2beee6e2cac490d6cb1
[ "MIT" ]
null
null
null
models/audio_net.py
CFM-MSG/MTSC_VSS
9536f8dc8d0282c3d0e6e2beee6e2cac490d6cb1
[ "MIT" ]
null
null
null
import torch.nn as nn
48.819672
118
0.662525
import torch import torch.nn as nn import torch.nn.functional as F class Unet(nn.Module): def __init__(self, ngf=64): super(Unet, self).__init__() two_stream = TwoStreamBlock(ngf * 8, ngf * 8) unet_block = UnetBlock(ngf * 8, ngf * 8, upconv_in_dim=ngf * 8 * 2, submodule=two_stream) ...
0
0
0
5,818
0
0
0
1
113
0d426cc28bb3a102172b4a5193fac6badf8ee34e
7,741
py
Python
test/nn/conv/test_message_passing.py
zheng-da/pytorch_geometric
3d23afdf5f5c6f386b17a339790181313c60aae6
[ "MIT" ]
2
2020-12-06T13:10:52.000Z
2021-07-06T06:50:10.000Z
test/nn/conv/test_message_passing.py
zheng-da/pytorch_geometric
3d23afdf5f5c6f386b17a339790181313c60aae6
[ "MIT" ]
null
null
null
test/nn/conv/test_message_passing.py
zheng-da/pytorch_geometric
3d23afdf5f5c6f386b17a339790181313c60aae6
[ "MIT" ]
1
2021-07-06T06:50:21.000Z
2021-07-06T06:50:21.000Z
import torch from torch_sparse import SparseTensor edge_index = torch.tensor([ [0, 0, 0, 1, 1], [0, 1, 2, 0, 2], ]) adj_t = SparseTensor(row=edge_index[1], col=edge_index[0]) x = ( torch.arange(1, 3, dtype=torch.float), torch.arange(1, 4, dtype=torch.float), )
31.72541
71
0.6556
import copy import pytest from typing import Tuple, Optional import torch from torch_sparse import SparseTensor from torch_sparse.matmul import spmm from torch_geometric.nn import MessagePassing from torch_geometric.utils import softmax edge_index = torch.tensor([ [0, 0, 0, 1, 1], [0, 1, 2, 0, 2], ]) adj_t = ...
0
0
0
2,616
0
4,300
0
54
477
37d9b671438cbab3ced21ae57cea76a44b2892f3
4,282
py
Python
src/plot_jhu_data.py
astrophys/covid19
a1978a87a4d090c1de29d38db1c04164c8b0ba8e
[ "MIT" ]
1
2020-03-19T17:39:17.000Z
2020-03-19T17:39:17.000Z
src/plot_jhu_data.py
astrophys/covid19
a1978a87a4d090c1de29d38db1c04164c8b0ba8e
[ "MIT" ]
null
null
null
src/plot_jhu_data.py
astrophys/covid19
a1978a87a4d090c1de29d38db1c04164c8b0ba8e
[ "MIT" ]
null
null
null
# Author : Ali Snedden # Date : 3/21/20 # License: MIT # Purpose: # This code plots the Johns Hoptins Covid-19 Data # # # # Notes : # # References : # 1. https://github.com/CSSEGISandData/COVID-19 # # # Future: # # # import sys import numpy as np import time import pandas as pd from matplotlib imp...
30.15493
111
0.541336
# Author : Ali Snedden # Date : 3/21/20 # License: MIT # Purpose: # This code plots the Johns Hoptins Covid-19 Data # # # # Notes : # # References : # 1. https://github.com/CSSEGISandData/COVID-19 # # # Future: # # # import sys import numpy as np import time import pandas as pd from matplotlib imp...
0
0
0
0
0
0
0
14
44
26bf7610cfe93f9a459dcd52bd651b53365563d4
1,789
py
Python
tkinter_module/tkinter_image.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
1
2019-02-24T09:57:16.000Z
2019-02-24T09:57:16.000Z
tkinter_module/tkinter_image.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
null
null
null
tkinter_module/tkinter_image.py
kenwaldek/python
e6aaf5616a456a4fb91889c0617bd6511f1a223e
[ "MIT" ]
4
2017-05-21T15:34:53.000Z
2018-09-25T06:56:15.000Z
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # kenwaldek MIT-license # # Title: tkinter_image Version: 1.0 # Date: 26-12-16 Language: python3 # Description: tkinter inladen van image en text v...
27.953125
73
0.561766
#! /usr/bin/env python3 # -*- coding:utf-8 -*- ############################################################### # © kenwaldek MIT-license # # Title: tkinter_image Version: 1.0 # Date: 26-12-16 Language: python3 # Description: tkinter inladen van image en text ...
2
0
0
1,239
0
0
0
9
68
1e000f54ec66535b78129eef7b6df9704797f75b
1,098
py
Python
steps/run-wait/step.py
relay-integrations/relay-puppet
1e0c2b67e778a26fcd91ed6bf2680f120e9a67d8
[ "Apache-2.0" ]
1
2020-11-30T07:20:17.000Z
2020-11-30T07:20:17.000Z
steps/run-wait/step.py
relay-integrations/relay-puppet
1e0c2b67e778a26fcd91ed6bf2680f120e9a67d8
[ "Apache-2.0" ]
null
null
null
steps/run-wait/step.py
relay-integrations/relay-puppet
1e0c2b67e778a26fcd91ed6bf2680f120e9a67d8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import logging import time from urllib.parse import urljoin import requests from relay_sdk import Interface, Dynamic as D relay = Interface() relay_api_url = relay.get(D.connection.relayAPIURL) relay_api_token = relay.get(D.connection.token) run_id = relay.get(D.id) headers = {'Authorization...
26.780488
105
0.662113
#!/usr/bin/env python import logging import time from urllib.parse import urljoin import requests from relay_sdk import Interface, Dynamic as D relay = Interface() relay_api_url = relay.get(D.connection.relayAPIURL) relay_api_token = relay.get(D.connection.token) run_id = relay.get(D.id) headers = {'Authorization...
0
0
0
0
0
0
0
0
0
6daf6cc726a7f05dfdd45c0c735937d37d9d3b2e
1,671
py
Python
src/config.py
gwohlgen/w2v_ol
bb67a3a1b54ca756cff1f28ef5ca5842e8a9c91d
[ "Apache-2.0" ]
20
2017-04-05T10:37:26.000Z
2022-03-02T17:24:16.000Z
src/config.py
gwohlgen/w2v_ol
bb67a3a1b54ca756cff1f28ef5ca5842e8a9c91d
[ "Apache-2.0" ]
1
2019-04-02T07:33:53.000Z
2019-04-02T07:33:53.000Z
src/config.py
gwohlgen/w2v_ol
bb67a3a1b54ca756cff1f28ef5ca5842e8a9c91d
[ "Apache-2.0" ]
10
2018-02-06T12:10:37.000Z
2021-02-13T05:54:57.000Z
#!/usr/bin/python # you need to config this! # set the model file, and if the model supports big-grams: set seed with bigrams.. ## the conf dict stores all relevant config parameters conf={} conf['model'] = "climate2_2015_7.txt.2gram.small.model" # default dummy model #conf['model'] = "climate2_2015_7.txt.2gram.mod...
30.944444
120
0.666667
#!/usr/bin/python # you need to config this! # set the model file, and if the model supports big-grams: set seed with bigrams.. ## the conf dict stores all relevant config parameters conf={} conf['model'] = "climate2_2015_7.txt.2gram.small.model" # default dummy model #conf['model'] = "climate2_2015_7.txt.2gram.mod...
0
0
0
0
0
0
0
0
0
cb474b9a1b131517c08f3fdabe8b41a8937618ae
1,726
py
Python
app/api/resources.py
XIN-TU/easySpike
727a37e4c88f640427a1c30f80bd0fead8427566
[ "MIT" ]
null
null
null
app/api/resources.py
XIN-TU/easySpike
727a37e4c88f640427a1c30f80bd0fead8427566
[ "MIT" ]
null
null
null
app/api/resources.py
XIN-TU/easySpike
727a37e4c88f640427a1c30f80bd0fead8427566
[ "MIT" ]
null
null
null
""" REST API Resource Routing http://flask-restplus.readthedocs.io """ # this is the example hardcode test
24.657143
61
0.673233
""" REST API Resource Routing http://flask-restplus.readthedocs.io """ from datetime import datetime from flask import request from flask_restplus import Resource from .security import require_auth from . import api_rest from .func import * from .engine import * # wildcard import the TTDS lib class SecureResou...
0
1,138
0
106
0
0
0
38
330
ed0ad42fc1a7ca3834303f1c38e3ba12b01a27a1
3,470
py
Python
Simple Calc-Tkinter.py
sachinkatageri/Tkinter-Simple-calculator
a5ba889da12f34d2575ce5375cd9829ce2c538eb
[ "Apache-2.0" ]
null
null
null
Simple Calc-Tkinter.py
sachinkatageri/Tkinter-Simple-calculator
a5ba889da12f34d2575ce5375cd9829ce2c538eb
[ "Apache-2.0" ]
null
null
null
Simple Calc-Tkinter.py
sachinkatageri/Tkinter-Simple-calculator
a5ba889da12f34d2575ce5375cd9829ce2c538eb
[ "Apache-2.0" ]
null
null
null
#sachin_katageri #SKATCODE me=Tk() me.geometry("354x460") me.title("CALCULATOR") melabel = Label(me,text="CALCULATOR",bg='White',font=("Times",30,'bold')) melabel.pack(side=TOP) me.config(background='Dark gray') textin=StringVar() operator="" metext=Entry(me,font=("Courier New",12,'bold'),textvar...
35.050505
119
0.663112
#sachin_katageri #SKATCODE from tkinter import* me=Tk() me.geometry("354x460") me.title("CALCULATOR") melabel = Label(me,text="CALCULATOR",bg='White',font=("Times",30,'bold')) melabel.pack(side=TOP) me.config(background='Dark gray') textin=StringVar() operator="" def clickbut(number): #lambda:clickbu...
0
0
0
0
0
460
0
-1
176
41248fa6c1e374694f0ade81b43b48b465184936
640
py
Python
Solver/Sorting.py
bchaiks/3D_Bin_Packing_Heuristics
f8c4ac1ec73f1b94287eb18fdcdff7bea685ec27
[ "MIT" ]
1
2021-03-17T03:36:58.000Z
2021-03-17T03:36:58.000Z
Solver/Sorting.py
bchaiks/3D_Bin_Packing_Heuristics
f8c4ac1ec73f1b94287eb18fdcdff7bea685ec27
[ "MIT" ]
1
2021-03-13T11:36:54.000Z
2021-03-16T03:42:11.000Z
Solver/Sorting.py
bchaiks/3D_Bin_Packing_Heuristics
f8c4ac1ec73f1b94287eb18fdcdff7bea685ec27
[ "MIT" ]
2
2020-11-10T15:24:16.000Z
2021-03-13T05:38:59.000Z
def SortArrayByArgMinIndex(array,index): ''' MAKE SURE TO SORT BY MOST IMPORTANT INDEX LAST!!! ''' a = array L = len(a) for i in range(L): temp = a[i] flag = 0 j = 0 while j < i and flag == 0: if temp[index] < a[j][index]: a[j+1] = a[j] a[j] = temp j += 1 else: flag = 1 return(a)
19.393939
58
0.61875
def Randomize(partObjects): # eventually want to randomize the order # and re-run the whole thing to get a broader # picture of the solution space return(partObjects) def SortArrayByArgMinIndex(array,index): ''' MAKE SURE TO SORT BY MOST IMPORTANT INDEX LAST!!! ''' a = array L = len(a) for i in range(L): te...
0
0
0
0
0
278
0
0
45
9f8cd2ddde865984af8946621f65626e1d20b95b
132
py
Python
conftest.py
mclellac/connery
d7444a46e023c8f5261d5b462ae970096cfecf0f
[ "EFL-2.0" ]
null
null
null
conftest.py
mclellac/connery
d7444a46e023c8f5261d5b462ae970096cfecf0f
[ "EFL-2.0" ]
null
null
null
conftest.py
mclellac/connery
d7444a46e023c8f5261d5b462ae970096cfecf0f
[ "EFL-2.0" ]
null
null
null
# This file lists files which should be ignored by pytest collect_ignore = ["setup.py", "connery.py", "connery/modules/ipython.py"]
44
73
0.75
# This file lists files which should be ignored by pytest collect_ignore = ["setup.py", "connery.py", "connery/modules/ipython.py"]
0
0
0
0
0
0
0
0
0
858037440c5f062f7910b0e62eaa39b16bfb5efd
252
py
Python
test/test_nas.py
yngtodd/nas
d2642f8b6910f40daf458504be04ff13869d3a75
[ "MIT" ]
6
2019-07-05T09:31:12.000Z
2021-04-28T06:41:09.000Z
test/test_nas.py
yngtodd/nas
d2642f8b6910f40daf458504be04ff13869d3a75
[ "MIT" ]
1
2020-02-28T01:21:41.000Z
2020-02-28T01:21:41.000Z
test/test_nas.py
yngtodd/nas
d2642f8b6910f40daf458504be04ff13869d3a75
[ "MIT" ]
1
2020-08-26T04:31:11.000Z
2020-08-26T04:31:11.000Z
""" Tests for `nas` module. """
12.6
29
0.615079
""" Tests for `nas` module. """ import pytest from nas import nas class TestNas(object): @classmethod def setup_class(cls): pass def test_something(self): pass @classmethod def teardown_class(cls): pass
0
63
0
99
0
0
0
-10
67
f8cda25e292e2fc1ec31f3eab7e56ffb77666b19
927
py
Python
za/fileToC/test.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
za/fileToC/test.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
za/fileToC/test.py
hth945/pytest
83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc
[ "Apache-2.0" ]
null
null
null
#%% # IN_FILE = 'test.ncm' # OUT_FILE = IN_FILE.split('.')[0] fileToC('up5.html','htmlData') # %%
22.071429
80
0.536138
#%% import os # IN_FILE = 'test.ncm' # OUT_FILE = IN_FILE.split('.')[0] def fileToC(in_file, out_file): # 1 head and open IN_FILE=in_file OUT_FILE=out_file try: in_file = open(IN_FILE, 'rb') except Exception as e: print(e) return out_file = open(OUT_FILE+'.c', 'w') ...
0
0
0
0
0
793
0
-12
45
010fc7a46411fd1fb19a7627a5c1ef23cb23efba
38,007
py
Python
model.py
Yan98/S2FGAN
14405875c0182735afa053ae4d8c67cebd1a6ab2
[ "MIT" ]
6
2020-12-08T13:08:08.000Z
2021-12-06T05:04:48.000Z
model.py
Yan98/S2FGAN
14405875c0182735afa053ae4d8c67cebd1a6ab2
[ "MIT" ]
1
2021-04-12T11:43:28.000Z
2021-10-31T23:59:40.000Z
model.py
Yan98/S2FGAN
14405875c0182735afa053ae4d8c67cebd1a6ab2
[ "MIT" ]
1
2021-11-04T00:28:47.000Z
2021-11-04T00:28:47.000Z
""" This module is the concrete implementation of S2FGAN. This module structure is following: make_kernel is used to intialise the kernel for blurring image Blur, a layer used to apply blur kerbel to input PixelNorm, a layer used to apply pixel normalization EqualConv1d, convolution 1d with equalized le...
34.086996
269
0.527876
""" This module is the concrete implementation of S2FGAN. This module structure is following: make_kernel is used to intialise the kernel for blurring image Blur, a layer used to apply blur kerbel to input PixelNorm, a layer used to apply pixel normalization EqualConv1d, convolution 1d with equalized le...
0
161
0
34,645
0
627
0
83
875
5a1d2a0240e421bf1d94e403e1e15b300f595f14
21,266
py
Python
site-packages/jedi/evaluate/finder.py
oz90210/Pyto
59f185149b71e57e5debeb1c9a61a28739e81720
[ "MIT" ]
null
null
null
site-packages/jedi/evaluate/finder.py
oz90210/Pyto
59f185149b71e57e5debeb1c9a61a28739e81720
[ "MIT" ]
1
2020-04-25T20:36:07.000Z
2020-04-25T20:36:07.000Z
site-packages/jedi/evaluate/finder.py
Wristlebane/Pyto
901ac307b68486d8289105c159ca702318bea5b0
[ "MIT" ]
null
null
null
#\input texinfo """ Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. Flow checks +++++++++++ Flow checks are not really mature. There's only a check for ``isinstanc...
38.665455
114
0.622402
#\input texinfo """ Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc. Flow checks +++++++++++ Flow checks are not really mature. There's only a check for ``isinstanc...
0
2,950
0
6,824
2,549
2,951
0
160
380
c7a0017098f53e1aca17da21cef0ed3d90134016
4,135
py
Python
tools/generate-polls/generator/ansi_x931_aes128.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
473
2016-08-01T12:48:16.000Z
2022-03-09T18:13:14.000Z
tools/generate-polls/generator/ansi_x931_aes128.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
71
2016-08-01T03:33:44.000Z
2022-03-09T18:37:04.000Z
tools/generate-polls/generator/ansi_x931_aes128.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
121
2016-08-01T04:07:53.000Z
2022-03-07T11:08:09.000Z
#!/usr/bin/env python """ A Python implementation of ANSI X9.31 using AES 128, following: http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf Copyright (C) 2015 - Brian Caswell <bmc@lungetech.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
30.858209
104
0.62636
#!/usr/bin/env python """ A Python implementation of ANSI X9.31 using AES 128, following: http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext.pdf Copyright (C) 2015 - Brian Caswell <bmc@lungetech.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associat...
0
299
0
2,508
0
0
0
8
45
be16679000ce269e3f1016e7c63e3ecfdfb22cef
2,061
py
Python
Python/data_structure/segment_tree.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
2
2021-09-05T13:17:01.000Z
2021-09-05T13:17:06.000Z
Python/data_structure/segment_tree.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
Python/data_structure/segment_tree.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
# Segment Tree
22.9
84
0.534692
import typing # Segment Tree class SegmentTree: def __init__( self, lis: list, ele: typing.Any, op: typing.Callable[[typing.Any, typing.Any], typing.Any]) -> None: self.n = len(lis) self.log = (self.n - 1).bit_length() self.size = 1 << self.log self.op = op self.ele = ele self.tree = self._...
0
0
0
2,010
0
0
0
-8
44
64c47b1f89956e061ac9631658410771a007f9cf
495
py
Python
S1/Q1.py
grharon/HFD
a6abca134f7a3d6766962eb89ab9e33125dab662
[ "CC0-1.0" ]
null
null
null
S1/Q1.py
grharon/HFD
a6abca134f7a3d6766962eb89ab9e33125dab662
[ "CC0-1.0" ]
null
null
null
S1/Q1.py
grharon/HFD
a6abca134f7a3d6766962eb89ab9e33125dab662
[ "CC0-1.0" ]
null
null
null
number = 100 factorialnumber = factorial(number) print(f"Factorial({number}) = {factorialnumber}") sumfactorialnumber = sum_of_digits(factorialnumber) print( f"Sum of digits in the factorial number({number}) = {sumfactorialnumber}")
23.571429
79
0.640404
def factorial(n): if n == 1 or n == 0: return 1 else: return n * factorial(n-1) def sum_of_digits(n): sum_of_digits = 0 for digit in str(n): sum_of_digits += int(digit) return sum_of_digits number = 100 factorialnumber = factorial(number) print(f"Factorial...
0
0
0
0
0
198
0
0
48
9276cadc1fb3cc5a0610a89dfa0a0b7421b2175c
20,617
py
Python
pysnmp-with-texts/HPN-ICF-STACK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/HPN-ICF-STACK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/HPN-ICF-STACK-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module HPN-ICF-STACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-STACK-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:41:29 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
156.189394
1,999
0.786826
# # PySNMP MIB module HPN-ICF-STACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-STACK-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:41:29 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
0
0
0
0
0
0
0
0
0
ddc6fba39e2884441d6015cadffdc8b157512ecc
25,625
py
Python
hwrt/features.py
MartinThoma/hwrt
7b274fa3022292bb1215eaec99f1826f64f98a07
[ "MIT" ]
65
2015-04-08T12:11:22.000Z
2022-02-28T23:46:53.000Z
hwrt/features.py
MartinThoma/hwrt
7b274fa3022292bb1215eaec99f1826f64f98a07
[ "MIT" ]
35
2015-01-05T11:56:30.000Z
2022-03-12T00:55:38.000Z
hwrt/features.py
MartinThoma/hwrt
7b274fa3022292bb1215eaec99f1826f64f98a07
[ "MIT" ]
18
2015-01-19T15:57:25.000Z
2021-02-15T20:38:32.000Z
""" Feature extraction algorithms. Each algorithm works on the HandwrittenData class. They have to be applied like this: >>> import hwrt.features >>> from hwrt.handwritten_data import HandwrittenData >>> data_json = '[[{"time": 123, "x": 45, "y": 67}]]' >>> a = HandwrittenData(raw_data_id=2953, raw_data_json=data_jso...
31.557882
88
0.554302
""" Feature extraction algorithms. Each algorithm works on the HandwrittenData class. They have to be applied like this: >>> import hwrt.features >>> from hwrt.handwritten_data import HandwrittenData >>> data_json = '[[{"time": 123, "x": 45, "y": 67}]]' >>> a = HandwrittenData(raw_data_id=2953, raw_data_json=data_jso...
0
371
0
21,984
0
0
0
83
433
8a62813cebb672de3944eea8a62b8afb8631e71b
1,553
py
Python
pinguin/views.py
OpenHackC4H/2017-Gothenburg-Pinguin
aac60014973e130977f3ef9a78b41b67a13cc527
[ "MIT" ]
1
2018-05-05T18:25:47.000Z
2018-05-05T18:25:47.000Z
pinguin/views.py
OpenHackC4H/2017-Gothenburg-Pinguin
aac60014973e130977f3ef9a78b41b67a13cc527
[ "MIT" ]
null
null
null
pinguin/views.py
OpenHackC4H/2017-Gothenburg-Pinguin
aac60014973e130977f3ef9a78b41b67a13cc527
[ "MIT" ]
null
null
null
from .data_collection.collect_data import CollectData debug = False if(debug): apa = CollectData()
36.97619
98
0.777849
from rest_framework import permissions, viewsets, generics, filters from .serializers import JobsSerializer, HousingSerializer, ApplicantSerializer, HeatmapSerializer from .models import Jobs, Housing, Applicant, Heatmap from .data_collection.collect_data import CollectData from django.shortcuts import render debug...
0
0
0
1,027
0
47
0
169
206
130e54d3a59f85155c18c48d82dfb5f339ff8926
5,222
py
Python
app/recipe/views.py
mydjangoprojects/recipe-mpa
bb36b3f488fcce3292be2f23e4201c1286fe113c
[ "MIT" ]
null
null
null
app/recipe/views.py
mydjangoprojects/recipe-mpa
bb36b3f488fcce3292be2f23e4201c1286fe113c
[ "MIT" ]
null
null
null
app/recipe/views.py
mydjangoprojects/recipe-mpa
bb36b3f488fcce3292be2f23e4201c1286fe113c
[ "MIT" ]
null
null
null
############## # Tag Mixins # ############## ############# # Tag Views # ############# ##################### # Ingredient Mixins # ##################### #################### # Ingredient Views # #################### ################# # Recipe Mixins # ################# ################ # Recipe View...
27.484211
78
0.684795
from django.views.generic import DetailView from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from core.views import PaginatedListView from .models import Tag, Ingredient, Recipe ...
0
0
0
3,997
0
0
0
266
614
2143068b1ccbc1e5fe085bbcd5a31d3a3cfd047d
199
py
Python
paranuara/companies/apps.py
SPLAYER-HD/Paranuara
5a42f23d761e16e3b486ba04d9185551614f06a5
[ "MIT" ]
null
null
null
paranuara/companies/apps.py
SPLAYER-HD/Paranuara
5a42f23d761e16e3b486ba04d9185551614f06a5
[ "MIT" ]
4
2021-06-08T20:53:43.000Z
2022-03-12T00:13:51.000Z
paranuara/companies/apps.py
SPLAYER-HD/RestServiceDjango
5a42f23d761e16e3b486ba04d9185551614f06a5
[ "MIT" ]
null
null
null
"""Companies app""" # Django
16.583333
36
0.703518
"""Companies app""" # Django from django.apps import AppConfig class CompaniesAppConfig(AppConfig): """Companies app config""" name = "paranuara.companies" verbose_name = 'Companies'
0
0
0
111
0
0
0
12
45
80f9effd20d0ca021438532f79cd34779410673a
210
py
Python
examples/slots_simple.py
BarnabasSzabolcs/pyquasargui
0ac684094c5a87dbb1a3ed1ff83f33c603d97e5a
[ "MIT" ]
2
2021-09-06T20:23:43.000Z
2022-02-02T18:24:35.000Z
examples/slots_simple.py
BarnabasSzabolcs/pyquasargui
0ac684094c5a87dbb1a3ed1ff83f33c603d97e5a
[ "MIT" ]
1
2022-02-27T01:19:14.000Z
2022-02-27T01:19:14.000Z
examples/slots_simple.py
BarnabasSzabolcs/pyquasargui
0ac684094c5a87dbb1a3ed1ff83f33c603d97e5a
[ "MIT" ]
null
null
null
layout = QInput( classes='q-ma-lg', label='Your city', children=[ Slot('prepend', [ QIcon('place') ]) ]) run(layout, title='slots example')
16.153846
34
0.528571
from quasargui import * layout = QInput( classes='q-ma-lg', label='Your city', children=[ Slot('prepend', [ QIcon('place') ]) ]) run(layout, title='slots example')
0
0
0
0
0
0
0
2
22
7cd31469139c7761ef44fc5874f8112465fade84
4,716
py
Python
torchvision/prototype/datasets/_builtin/pcam.py
yassineAlouini/vision-1
ee26e9c260a255e2afb5e691e713349529170c8b
[ "BSD-3-Clause" ]
1
2022-02-14T09:16:02.000Z
2022-02-14T09:16:02.000Z
torchvision/prototype/datasets/_builtin/pcam.py
yassineAlouini/vision-1
ee26e9c260a255e2afb5e691e713349529170c8b
[ "BSD-3-Clause" ]
null
null
null
torchvision/prototype/datasets/_builtin/pcam.py
yassineAlouini/vision-1
ee26e9c260a255e2afb5e691e713349529170c8b
[ "BSD-3-Clause" ]
null
null
null
from collections import namedtuple NAME = "pcam" _Resource = namedtuple("_Resource", ("file_name", "gdrive_id", "sha256"))
35.19403
105
0.638465
import io import pathlib from collections import namedtuple from typing import Any, Dict, List, Optional, Tuple, Iterator, Union from torchdata.datapipes.iter import IterDataPipe, Mapper, Zipper from torchvision.prototype import features from torchvision.prototype.datasets.utils import ( Dataset, OnlineResourc...
0
3,429
0
575
0
0
0
313
269
237cf432cb2a9b8f4203ddc700aff3c83f06d064
1,302
py
Python
deploy/run.py
dato-code/Strata-Now
995ed8851275996ea82131bf6e3d05131c620f60
[ "BSD-3-Clause" ]
4
2015-05-05T16:05:35.000Z
2016-05-19T21:02:25.000Z
deploy/run.py
turi-code/Strata-Now
995ed8851275996ea82131bf6e3d05131c620f60
[ "BSD-3-Clause" ]
1
2015-10-07T18:59:39.000Z
2015-10-07T18:59:39.000Z
deploy/run.py
dato-code/Strata-Now
995ed8851275996ea82131bf6e3d05131c620f60
[ "BSD-3-Clause" ]
6
2015-05-05T02:11:07.000Z
2016-05-16T19:24:22.000Z
import graphlab as gl path = "s3://gl-demo-usw2/predictive_service/demolab/ps-1.6" ps = gl.deploy.predictive_service.load(path) # Define dependencies state = {'details_filename': '../data/talks.json', 'speakers_filename': '../data/speakers.json', 'details_sf': '../data/talks.gl', 'speakers...
33.384615
191
0.704301
import graphlab as gl from models import * path = "s3://gl-demo-usw2/predictive_service/demolab/ps-1.6" ps = gl.deploy.predictive_service.load(path) # Define dependencies state = {'details_filename': '../data/talks.json', 'speakers_filename': '../data/speakers.json', 'details_sf': '../data/talks.g...
0
0
0
0
0
0
0
0
22
602796473f89d9acc225140c9078f5ec9c51d423
7,892
py
Python
fuzzylogic.py
bydzen/fuzzy-logic-sc
ccbff1a34bb19048f540244aafd38197cc12318d
[ "MIT" ]
1
2021-08-22T13:52:52.000Z
2021-08-22T13:52:52.000Z
fuzzylogic.py
bydzen/fuzzy-logic-sc
ccbff1a34bb19048f540244aafd38197cc12318d
[ "MIT" ]
null
null
null
fuzzylogic.py
bydzen/fuzzy-logic-sc
ccbff1a34bb19048f540244aafd38197cc12318d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd import matplotlib.pyplot as plt #!gdown --id 1bb2irg5nFZhoFkpjWPQHJPBBr8FiK8l7 dataRestoran = pd.read_excel('restoran.xlsx') print(dataRestoran) # akan menghasilkan nilai kelayakan yang lebih bervariasi titikPelayanan = [25, 37, 58, 65, 78, 89, 101] titikMakanan = [3, 5, 8...
30.94902
86
0.593512
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import matplotlib.pyplot as plt import xlwt #!gdown --id 1bb2irg5nFZhoFkpjWPQHJPBBr8FiK8l7 dataRestoran = pd.read_excel('restoran.xlsx') print(dataRestoran) # akan menghasilkan nilai kelayakan yang lebih bervariasi titikPelayanan = [25, 37, 58, 65, 78, 8...
0
0
0
0
0
5,765
0
-13
274
deb1cc2b3769ab3932370a34f4aedc4d58995c77
866
py
Python
src/circuitsascode/__init__.py
devbisme/circuitsascode
497ac4650b0da8d65f4b22eceefe918b66f915b4
[ "MIT" ]
3
2021-08-28T15:02:53.000Z
2022-01-17T21:43:31.000Z
src/circuitsascode/__init__.py
devbisme/circuitsascode
497ac4650b0da8d65f4b22eceefe918b66f915b4
[ "MIT" ]
null
null
null
src/circuitsascode/__init__.py
devbisme/circuitsascode
497ac4650b0da8d65f4b22eceefe918b66f915b4
[ "MIT" ]
null
null
null
# The MIT License (MIT) - Copyright (c) 2021 xesscorp """ Categorized collections of circuits. """ import sys import pint # Create a shortcut name for "circuitsascode". sys.modules["casc"] = sys.modules["circuitsascode"] # For electrical units like ohms, volts, etc. units = pint.UnitRegistry() if sys.version_info...
27.935484
85
0.732102
# The MIT License (MIT) - Copyright (c) 2021 xesscorp """ Categorized collections of circuits. """ import sys import pint # Create a shortcut name for "circuitsascode". sys.modules["casc"] = sys.modules["circuitsascode"] # For electrical units like ohms, volts, etc. units = pint.UnitRegistry() if sys.version_info...
0
0
0
0
0
0
0
0
0
59e413e90db4fea7b7d53b3bfbe74dbdf3fef42a
8,095
py
Python
electrical_simulation/versuch_versuch.py
architecture-building-systems/bipv-tool
3ae73a541754e5215dfd39ef837d72f4b80ef967
[ "MIT" ]
4
2019-02-18T14:10:49.000Z
2021-04-23T09:03:13.000Z
electrical_simulation/versuch_versuch.py
architecture-building-systems/bipv-tool
3ae73a541754e5215dfd39ef837d72f4b80ef967
[ "MIT" ]
1
2018-08-16T13:27:15.000Z
2018-08-16T13:27:16.000Z
electrical_simulation/versuch_versuch.py
architecture-building-systems/bipv-tool
3ae73a541754e5215dfd39ef837d72f4b80ef967
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import json import datetime import miasole_module_two as ps import pvlib.pvsystem as pvsyst #import shaded_miasole as ps import interconnection as connect import matplotlib.pyplot as plt def align_yaxis(ax1, v1, ax2, v2): """adjust ax2 ylimit so that v2 in ax2 is aligned to...
43.994565
152
0.664484
import pandas as pd import numpy as np import json import datetime import miasole_module_two as ps import pvlib.pvsystem as pvsyst #import shaded_miasole as ps import interconnection as connect import matplotlib.pyplot as plt def get_irradiation_value(path, time, sensor_name): time = time.replace(second=0) ir...
0
0
0
0
0
2,901
0
0
160
d49cc9d9d750d1b39deda00590557e916ce04222
1,231
py
Python
venv/lib/python3.6/site-packages/zmq/sugar/version.py
paxthree/life-dashboard
8c65857d1102331b1e913d8800c61af1f61d9532
[ "CC0-1.0" ]
null
null
null
venv/lib/python3.6/site-packages/zmq/sugar/version.py
paxthree/life-dashboard
8c65857d1102331b1e913d8800c61af1f61d9532
[ "CC0-1.0" ]
19
2020-01-28T21:41:50.000Z
2022-03-11T23:17:39.000Z
thunau/lib/python3.6/site-packages/zmq/sugar/version.py
karlburkhart/thunau
900dca0259b30a229cd84f6315a7da9be94cb355
[ "MIT" ]
1
2018-09-19T05:55:27.000Z
2018-09-19T05:55:27.000Z
"""PyZMQ and 0MQ version functions.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from zmq.backend import zmq_version_info VERSION_MAJOR = 16 VERSION_MINOR = 0 VERSION_PATCH = 4 VERSION_EXTRA = "" __version__ = '%i.%i.%i' % (VERSION_MAJOR, VERSION_MINOR, VERSION_PAT...
25.122449
86
0.692933
"""PyZMQ and 0MQ version functions.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from zmq.backend import zmq_version_info VERSION_MAJOR = 16 VERSION_MINOR = 0 VERSION_PATCH = 4 VERSION_EXTRA = "" __version__ = '%i.%i.%i' % (VERSION_MAJOR, VERSION_MINOR, VERSION_PAT...
0
0
0
0
0
0
0
0
0
4300d28866dc3941f3120411372fade12a422e39
3,846
py
Python
penguin_random_house/parse_scripts/books.py
EvgenyTsydenov/book_recommender
bfbbed52907f979a6ba404f9d1f2ff8cfe142aff
[ "MIT" ]
null
null
null
penguin_random_house/parse_scripts/books.py
EvgenyTsydenov/book_recommender
bfbbed52907f979a6ba404f9d1f2ff8cfe142aff
[ "MIT" ]
null
null
null
penguin_random_house/parse_scripts/books.py
EvgenyTsydenov/book_recommender
bfbbed52907f979a6ba404f9d1f2ff8cfe142aff
[ "MIT" ]
null
null
null
import json import os from tqdm import tqdm def parse_book(book_data: dict) -> dict: """Parse book core data.""" info = {} for param in ['isbn', 'title', 'onsale', 'price', 'language', 'pages', 'publisher']: info[param] = book_data.get(param) info['cover'] = f'https://images...
32.05
75
0.568903
import json import os from tqdm import tqdm def parse_book(book_data: dict) -> dict: """Parse book core data.""" info = {} for param in ['isbn', 'title', 'onsale', 'price', 'language', 'pages', 'publisher']: info[param] = book_data.get(param) info['cover'] = f'https://images...
0
0
0
0
0
0
0
0
0
b7d7274c982532facf17dec2970f658f11cf429a
3,502
py
Python
scripts/parse_proto.py
JustinGanzer/j2objc
feb43475d70a027c96d5e94874003ef65e6ae34b
[ "Apache-2.0" ]
null
null
null
scripts/parse_proto.py
JustinGanzer/j2objc
feb43475d70a027c96d5e94874003ef65e6ae34b
[ "Apache-2.0" ]
null
null
null
scripts/parse_proto.py
JustinGanzer/j2objc
feb43475d70a027c96d5e94874003ef65e6ae34b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dis...
25.75
78
0.658195
#!/usr/bin/python3 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dis...
0
0
0
288
0
2,262
0
-25
228
74d5c07e6a219370de5020bdd900eea843a2ba4f
165,553
py
Python
icbd/compiler/compiler_types.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
7
2015-04-06T15:17:13.000Z
2020-10-21T04:57:00.000Z
icbd/compiler/compiler_types.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
null
null
null
icbd/compiler/compiler_types.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
4
2016-05-16T17:53:08.000Z
2020-11-28T17:18:50.000Z
import _ast import inspect DEBUG_CHECKS = True BINOP_MAP = { _ast.Add:"__add__", _ast.Sub:"__sub__", _ast.Mult:"__mul__", _ast.BitOr:"__or__", _ast.BitXor:"__xor__", _ast.BitAnd:'__and__', _ast.LShift:'__lshift__', _ast.RShift:'__rshift__', _ast....
41.669519
331
0.570228
import _ast import inspect import re import sys import traceback from . import closure_analyzer from .code_emitter import CodeEmitter DEBUG_CHECKS = True BINOP_MAP = { _ast.Add:"__add__", _ast.Sub:"__sub__", _ast.Mult:"__mul__", _ast.BitOr:"__or__", _ast.BitXor:"__xor__", ...
0
25,801
0
109,966
0
19,030
0
-3
1,689
1df90d6b5a21d880a74025dd9aa1c5f1ebfced00
7,715
py
Python
addons/io_scene_gltf2/io/exp/gltf2_io_get.py
dtysky/glTF-Blender-IO
5488adce3d496c6db7b2fff121d4fb46962a02b2
[ "Apache-2.0" ]
null
null
null
addons/io_scene_gltf2/io/exp/gltf2_io_get.py
dtysky/glTF-Blender-IO
5488adce3d496c6db7b2fff121d4fb46962a02b2
[ "Apache-2.0" ]
null
null
null
addons/io_scene_gltf2/io/exp/gltf2_io_get.py
dtysky/glTF-Blender-IO
5488adce3d496c6db7b2fff121d4fb46962a02b2
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 The Khronos Group 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 ...
20.091146
114
0.6
# Copyright (c) 2017 The Khronos Group 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 ...
0
0
0
0
0
0
0
17
23
527d5a647225fe1451d9322370f1d08e468c34af
696
py
Python
Src/Web/config.py
23233/sproxy
b40d6593e3a60ba089484c527de1bc4afc3a2d24
[ "MIT" ]
167
2019-07-05T13:25:39.000Z
2020-04-25T11:31:19.000Z
Src/Web/config.py
23233/sproxy
b40d6593e3a60ba089484c527de1bc4afc3a2d24
[ "MIT" ]
10
2018-12-11T06:07:37.000Z
2019-07-03T11:14:36.000Z
Src/Web/config.py
23233/sproxy
b40d6593e3a60ba089484c527de1bc4afc3a2d24
[ "MIT" ]
38
2019-07-04T07:50:08.000Z
2020-04-17T21:05:46.000Z
# Create dummy secrey key so we can use sessions SECRET_KEY = '1234567890' # Flask-Security config SECURITY_URL_PREFIX = "/admin" SECURITY_PASSWORD_HASH = "pbkdf2_sha256" SECURITY_PASSWORD_SALT = "ATGUOHAELKiubahiughaerGOJAEGj" SECURITY_USER_IDENTITY_ATTRIBUTES = ["name"] # Flask-Security URLs, overridden because th...
30.26087
71
0.804598
# Create dummy secrey key so we can use sessions SECRET_KEY = '1234567890' # Flask-Security config SECURITY_URL_PREFIX = "/admin" SECURITY_PASSWORD_HASH = "pbkdf2_sha256" SECURITY_PASSWORD_SALT = "ATGUOHAELKiubahiughaerGOJAEGj" SECURITY_USER_IDENTITY_ATTRIBUTES = ["name"] # Flask-Security URLs, overridden because th...
0
0
0
0
0
0
0
0
0
813d0a9cf8930b06ac9932bbfc5b272617c5c4ac
3,785
py
Python
homeassistant/components/mobile_app/websocket_api.py
jeanfpoulin/home-assistant
04dbe5bc841e1a429873efbd850c35b823ef26ce
[ "Apache-2.0" ]
3
2020-05-18T10:18:16.000Z
2020-12-08T11:27:55.000Z
homeassistant/components/mobile_app/websocket_api.py
jeanfpoulin/home-assistant
04dbe5bc841e1a429873efbd850c35b823ef26ce
[ "Apache-2.0" ]
3
2021-02-08T20:54:46.000Z
2021-09-08T02:30:04.000Z
homeassistant/components/mobile_app/websocket_api.py
jeanfpoulin/home-assistant
04dbe5bc841e1a429873efbd850c35b823ef26ce
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Websocket API for mobile_app.""" from homeassistant.components.websocket_api import (async_register_command) from homeassistant.helpers.typing import HomeAssistantType def register_websocket_handlers(hass: HomeAssistantType) -> bool: """Register the websocket handlers.""" async_register_command(hass, webso...
30.772358
88
0.732893
"""Websocket API for mobile_app.""" import voluptuous as vol from homeassistant.components.cloud import async_delete_cloudhook from homeassistant.components.websocket_api import ( ActiveConnection, async_register_command, async_response, error_message, result_message, websocket_command, ws_...
0
2,599
0
0
0
0
0
529
224
fba6df107748d61010973df91014413655aef5fb
4,000
py
Python
test_locks.py
zbentley/amqp-locks-python
7da8e941fff752bde1f1fd56caa51810fdac7577
[ "MIT" ]
null
null
null
test_locks.py
zbentley/amqp-locks-python
7da8e941fff752bde1f1fd56caa51810fdac7577
[ "MIT" ]
null
null
null
test_locks.py
zbentley/amqp-locks-python
7da8e941fff752bde1f1fd56caa51810fdac7577
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys sys.path.append("lib") # http://www.huyng.com/posts/python-performance-analysis/ parse_and_dispatch(sys.argv[1:])
29.411765
101
0.62375
#!/usr/bin/env python3 import pika import time import sys import argparse sys.path.append("lib") from rabbitlock.mutex import Mutex from rabbitlock.semaphore import Semaphore def positive_float(value): retval = float(value) if retval < 0: raise argparse.ArgumentTypeError("%s not a positive float" % ...
0
0
0
382
0
3,180
0
8
271
5b3f69f42eae7163ac1ea43116b8a85cdb9c27b7
1,068
py
Python
django_sourcebook/sourcebook/migrations/0009_auto_20200101_2140.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
django_sourcebook/sourcebook/migrations/0009_auto_20200101_2140.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
django_sourcebook/sourcebook/migrations/0009_auto_20200101_2140.py
maxblee/django_sourcebook
f90ca62cfe43c875a485f783ca1a06be40d9bbc5
[ "MIT" ]
null
null
null
# Generated by Django 3.0.1 on 2020-01-02 02:40
29.666667
78
0.495318
# Generated by Django 3.0.1 on 2020-01-02 02:40 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("sourcebook", "0008_foiarequest_time_completed"), ] operations = [ migrations.AddField( model_name="story", ...
0
0
0
938
0
0
0
13
68
0655f1c66e00a9e31b9d920ea6a88703dd4f5793
3,688
py
Python
src/exp_num_query.py
moseslichten/TAFSSL
b236dee4936fe933293ebdd65e48a332a3aacdea
[ "Apache-2.0" ]
10
2020-09-26T07:07:52.000Z
2021-10-11T12:11:33.000Z
src/exp_num_query.py
moseslichten/TAFSSL
b236dee4936fe933293ebdd65e48a332a3aacdea
[ "Apache-2.0" ]
1
2021-04-16T14:36:28.000Z
2021-04-16T14:36:28.000Z
src/exp_num_query.py
moseslichten/TAFSSL
b236dee4936fe933293ebdd65e48a332a3aacdea
[ "Apache-2.0" ]
2
2020-09-26T07:00:21.000Z
2021-08-14T14:12:50.000Z
# -------------------------------------------------------- # TAFSSL # Copyright (c) 2019 IBM Corp # Licensed under The Apache-2.0 License [see LICENSE for details] # -------------------------------------------------------- from utils.misc import get_features if __name__ == '__main__': get_features() n_que...
32.637168
116
0.608731
# -------------------------------------------------------- # TAFSSL # Copyright (c) 2019 IBM Corp # Licensed under The Apache-2.0 License [see LICENSE for details] # -------------------------------------------------------- import numpy as np from utils.proto_msp import ProtoMSP import time import pickle from utils.mis...
0
0
0
0
0
2,929
0
95
313
5e9233f492e89e51840f8454bc6abde3f18cbc0a
3,259
py
Python
qcommunity/optimization/obj.py
rsln-s/QCommunity
926c64efc7add34dae5fbab20359ef5b9b4aa420
[ "Apache-2.0" ]
2
2019-09-05T23:21:49.000Z
2020-03-10T13:54:32.000Z
qcommunity/optimization/obj.py
rsln-s/QCommunity
926c64efc7add34dae5fbab20359ef5b9b4aa420
[ "Apache-2.0" ]
null
null
null
qcommunity/optimization/obj.py
rsln-s/QCommunity
926c64efc7add34dae5fbab20359ef5b9b4aa420
[ "Apache-2.0" ]
1
2020-03-10T13:54:34.000Z
2020-03-10T13:54:34.000Z
#!/usr/bin/env python # Returns obj_val function to be used in an optimizer # A better and updated version of qaoa_obj.py import networkx as nx import numpy as np # import matplotlib.pyplot as plt from networkx.generators.classic import barbell_graph import copy import sys import warnings import qcommunity.modularit...
32.267327
166
0.59865
#!/usr/bin/env python # Returns obj_val function to be used in an optimizer # A better and updated version of qaoa_obj.py import networkx as nx import numpy as np # import matplotlib.pyplot as plt from networkx.generators.classic import barbell_graph import copy import sys import warnings import qcommunity.modularit...
0
0
0
0
0
1,063
0
0
58
5d32eec903f269edde168438b4d81ba0b9cc8d71
1,274
py
Python
tests/test_write.py
reshalfahsi/GGBColorSpace
f56994ffcd6a83762d67705116e690c7a64c9093
[ "MIT" ]
1
2020-12-06T07:38:08.000Z
2020-12-06T07:38:08.000Z
tests/test_write.py
reshalfahsi/GGBColorSpace
f56994ffcd6a83762d67705116e690c7a64c9093
[ "MIT" ]
1
2021-06-19T02:20:02.000Z
2021-06-19T02:20:02.000Z
tests/test_write.py
reshalfahsi/GGB
f56994ffcd6a83762d67705116e690c7a64c9093
[ "MIT" ]
1
2021-05-10T04:14:24.000Z
2021-05-10T04:14:24.000Z
import pytest if __name__ == '__main__': pytest.main([__file__])
25.48
58
0.689168
import cv2 from PIL import Image import numpy as np import random import pytest from ggb import GGB, CVLib from ggb.testing import ggb_test from ggb.testing import get_random_image, get_filled_image @ggb_test def test_opencv_write(): w = random.randint(16, 2048) h = random.randint(16, 2048) image = get_r...
0
969
0
0
0
0
0
31
201
092bdfd9880f8cd15ba0d55680a5b605d55352b5
9,518
py
Python
tests/unit/test_marc_writer.py
BookOps-CAT/NightShift
dc106b55cee3ec60c790f71f20e0754506385d59
[ "MIT" ]
null
null
null
tests/unit/test_marc_writer.py
BookOps-CAT/NightShift
dc106b55cee3ec60c790f71f20e0754506385d59
[ "MIT" ]
17
2020-12-07T04:43:48.000Z
2022-03-30T12:44:41.000Z
tests/unit/test_marc_writer.py
BookOps-CAT/NightShift
dc106b55cee3ec60c790f71f20e0754506385d59
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Tests `marc.marc_writer.py` module """
35.251852
109
0.560937
# -*- coding: utf-8 -*- """ Tests `marc.marc_writer.py` module """ from contextlib import nullcontext as does_not_raise import logging import os import pickle from pymarc import Field, MARCReader, Record import pytest from nightshift import __title__, __version__ from nightshift.datastore import Resource from nights...
0
3,692
0
5,441
0
0
0
93
223
db40eccb4e3a9805eb8362b1213257f77b448646
590
py
Python
schedule/migrations/0014_event_status.py
itmagistr/django-scheduler
14d403b581d6ec5c195f7cd4f1567f6f636d1efb
[ "BSD-3-Clause" ]
null
null
null
schedule/migrations/0014_event_status.py
itmagistr/django-scheduler
14d403b581d6ec5c195f7cd4f1567f6f636d1efb
[ "BSD-3-Clause" ]
null
null
null
schedule/migrations/0014_event_status.py
itmagistr/django-scheduler
14d403b581d6ec5c195f7cd4f1567f6f636d1efb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-02 18:17 from __future__ import unicode_literals
28.095238
190
0.640678
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-02 18:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schedule', '0013_auto_20180424_1145'), ] operations = [ migrations.AddFiel...
0
0
0
410
0
0
0
19
46
5f18738c3a2c1e5ce066a636d50938a7b409ce4a
939
py
Python
test/wien2k/w2kutils_test.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
4
2019-01-02T09:17:54.000Z
2019-12-26T07:15:59.000Z
test/wien2k/w2kutils_test.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
6
2019-03-06T03:16:12.000Z
2019-03-14T14:36:01.000Z
test/wien2k/w2kutils_test.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding = utf-8 import unittest as ut if __name__ == '__main__': ut.main()
27.617647
102
0.683706
#!/usr/bin/env python3 # coding = utf-8 import os import unittest as ut from mykit.wien2k.utils import get_casename, find_complex_file, get_default_r0, get_default_rmt, get_z class test_get_elements_info(ut.TestCase): def test_r0(self): self.assertEqual(get_default_r0('Ne1'), get_default_r0('Ne10')) ...
0
0
0
673
0
0
0
69
92
6e87c4e4158b3902ea8dc3803de751b0eaa24e67
11,586
py
Python
annotate/annotation/tasks.py
dojo-modeling/dojo
8abc71790cbb8639a56c89791535b3df59c725ac
[ "MIT" ]
3
2022-01-28T01:43:30.000Z
2022-02-24T21:42:13.000Z
annotate/annotation/tasks.py
dojo-modeling/dojo
8abc71790cbb8639a56c89791535b3df59c725ac
[ "MIT" ]
8
2022-01-12T16:39:57.000Z
2022-01-31T19:05:45.000Z
annotate/annotation/tasks.py
dojo-modeling/dojo
8abc71790cbb8639a56c89791535b3df59c725ac
[ "MIT" ]
null
null
null
import json from .rename import rename as rename_function from django.apps import apps from django.conf import settings # Load GADM3 from gadm app if settings.CACHE_GADM: gadm3 = apps.get_app_config("gadm").gadm3() gadm2 = apps.get_app_config("gadm").gadm2() else: gadm3 = None gadm2 = None def dupe(...
33.102857
175
0.566718
import copy import json import logging import os import time from .rename import rename as rename_function from django.apps import apps from django.conf import settings from django_rq import job from mixmasta import mixmasta as mix from utils.cache_helper import cache_get # Load GADM3 from gadm app if settings.CACHE...
0
2,276
0
0
0
3,351
0
-1
270
f0ff86078deb2aa6845135b2c376566c8a81691f
1,880
py
Python
dags/utils/scale_features.py
tiendatscorpy/ETL-pipeline
e3f800596e17e0ac2b32f52ea06a196e477c3414
[ "MIT" ]
null
null
null
dags/utils/scale_features.py
tiendatscorpy/ETL-pipeline
e3f800596e17e0ac2b32f52ea06a196e477c3414
[ "MIT" ]
null
null
null
dags/utils/scale_features.py
tiendatscorpy/ETL-pipeline
e3f800596e17e0ac2b32f52ea06a196e477c3414
[ "MIT" ]
null
null
null
import os, errno import numpy as np import os from sklearn.preprocessing import scale, minmax_scale import logging LOGGER = logging.getLogger(__name__) def scale_features(input_folder: str, output_folder: str, op_conf: str, **kwargs): """ input_folder: folder which contains input audio files output_folde...
35.471698
88
0.545745
import json import os, errno from typing import Dict import numpy as np import os from sklearn.preprocessing import scale, minmax_scale import logging LOGGER = logging.getLogger(__name__) def scale_features(input_folder: str, output_folder: str, op_conf: str, **kwargs): """ input_folder: folder which contain...
0
0
0
0
0
0
0
-8
44
e54f3fcf098da3812b7d4a0e9f85780e8a12a31b
934
py
Python
benches/bench_merge.py
crkrenn/distogram
9701233e46bd9e7528071c3c90600516d06c7f5a
[ "MIT" ]
16
2020-07-12T17:27:46.000Z
2022-03-22T23:42:24.000Z
benches/bench_merge.py
crkrenn/distogram
9701233e46bd9e7528071c3c90600516d06c7f5a
[ "MIT" ]
7
2020-06-20T01:43:34.000Z
2022-02-02T17:41:36.000Z
benches/bench_merge.py
crkrenn/distogram
9701233e46bd9e7528071c3c90600516d06c7f5a
[ "MIT" ]
3
2020-12-27T07:36:48.000Z
2021-11-04T18:56:46.000Z
if __name__ == '__main__': bench_merge()
21.227273
56
0.591006
import time from functools import reduce import distogram import utils def bench_merge(): num_samples = 10 num_points = 100_000 values_list = [ utils.create_values(mean, 0.3, num_points) for mean in range(num_samples) ] times_dict: utils.TimesDict = {num_points: dict()} for ...
0
0
0
0
0
791
0
-17
112
094ba497e8b98cc0b00f380b8d7c8ff4348b9eb1
1,210
py
Python
Chapter14/r2_paths_auth/my_library/models/sample_auth_http.py
a17juanbl/exercicios
8df4bdf232207fcbc8f1308d1937ee599c1b39d4
[ "MIT" ]
125
2020-11-28T18:00:34.000Z
2022-03-07T17:53:22.000Z
Chapter14/r2_paths_auth/my_library/models/sample_auth_http.py
a17juanbl/exercicios
8df4bdf232207fcbc8f1308d1937ee599c1b39d4
[ "MIT" ]
5
2021-02-02T10:03:29.000Z
2022-03-16T07:32:28.000Z
Chapter14/r2_paths_auth/my_library/models/sample_auth_http.py
a17juanbl/exercicios
8df4bdf232207fcbc8f1308d1937ee599c1b39d4
[ "MIT" ]
182
2020-11-29T12:07:07.000Z
2022-03-22T04:27:51.000Z
# -*- coding: utf-8 -*- # /!\/!\/!\/!\/!\/!\/!\/!\ # Note that this is just a sample code # You need to add this file in __init__.py # /!\/!\/!\/!\/!\/!\/!\/!\
28.139535
72
0.623967
# -*- coding: utf-8 -*- # /!\/!\/!\/!\/!\/!\/!\/!\ # Note that this is just a sample code # You need to add this file in __init__.py # /!\/!\/!\/!\/!\/!\/!\/!\ from odoo import exceptions, models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _a...
0
688
0
270
0
0
0
22
68
6d5634d1807e48c38dd5968a7d8b0e5bd2f87b3d
817
py
Python
pypy/iterator_generator_coroutine/first_of_all/2_generator.py
DowsonJones/test_test
9f941b20de42090e6ec9b449953ce1dae405ef73
[ "MIT" ]
1
2020-03-30T07:13:08.000Z
2020-03-30T07:13:08.000Z
pypy/iterator_generator_coroutine/first_of_all/2_generator.py
DowsonJones/test_test
9f941b20de42090e6ec9b449953ce1dae405ef73
[ "MIT" ]
null
null
null
pypy/iterator_generator_coroutine/first_of_all/2_generator.py
DowsonJones/test_test
9f941b20de42090e6ec9b449953ce1dae405ef73
[ "MIT" ]
null
null
null
F = fib(10) # # print(next(F)) for i in F: print(i) """ yield: 1. -, 2. yield, """ # yield if __name__ == '__main__': main()
15.12963
42
0.49694
def fib(n): print('进入') current = 0 num1, num2 = 0, 1 while current < n: num = num1 num1, num2 = num2, num2 + num1 current += 1 yield num return 'done' F = fib(10) # 运行到这里没有任何反映 # print(next(F)) for i in F: print(i) """ yield: 1. 保存运行状态-断点...
156
0
0
0
371
116
0
-10
121
5783c68228392e653ee096d49b29e66e2ac5a022
1,563
py
Python
lib/opticalflow.py
hanebarla/CrowdCounting-using-PedestrianFlow
0f7c196a8b396d92901172a334ecf0256f30ff8a
[ "MIT" ]
null
null
null
lib/opticalflow.py
hanebarla/CrowdCounting-using-PedestrianFlow
0f7c196a8b396d92901172a334ecf0256f30ff8a
[ "MIT" ]
null
null
null
lib/opticalflow.py
hanebarla/CrowdCounting-using-PedestrianFlow
0f7c196a8b396d92901172a334ecf0256f30ff8a
[ "MIT" ]
null
null
null
import os import json import cv2 import numpy as np if __name__ == "__main__": # json file contains the test images test_json_path = './test.json' # the folder to output density map and flow maps output_folder = './plot' with open(test_json_path, 'r') as outfile: img_paths = json.load(ou...
27.910714
86
0.632118
import os import json import cv2 import numpy as np import matplotlib.pyplot as plt import torch def OptFlow(c_prev_img, c_img): prev_img = cv2.cvtColor(c_prev_img, cv2.COLOR_BGR2GRAY) img = cv2.cvtColor(c_img, cv2.COLOR_BGR2GRAY) hsv = np.zeros_like(c_img) hsv[..., 1] = 255 flow = cv2.calcOptica...
0
0
0
0
0
445
0
1
67
d367c19a7c2a7b23b387887269c0b45058aff294
6,978
py
Python
fairseq/models/nat/old/latent/predictor_module.py
wangqi1996/cmlm
78472e7edfecd8e36eaf5ae77c674033e1498735
[ "MIT" ]
null
null
null
fairseq/models/nat/old/latent/predictor_module.py
wangqi1996/cmlm
78472e7edfecd8e36eaf5ae77c674033e1498735
[ "MIT" ]
null
null
null
fairseq/models/nat/old/latent/predictor_module.py
wangqi1996/cmlm
78472e7edfecd8e36eaf5ae77c674033e1498735
[ "MIT" ]
null
null
null
""" TODO: AT Decoder """
32.915094
120
0.633276
from torch import nn from fairseq.modules import TransformerEncoderLayer, TransformerDecoderLayer def mean_ds(x, dim=None): return ( x.float().mean().type_as(x) if dim is None else x.float().mean(dim).type_as(x) ) class Perceptron(nn.Module): """ 1. 是否激活 通过是否有激活层来控制,最后一层都没有激...
291
0
0
6,437
0
126
0
54
229
5f0496938b0764b39076e5b64d229dd8946afff8
598
py
Python
python-experiments/lambda_example.py
MichaelCurrin/python-2016
00af4e61175fc15aebfab208c76fe9db845d2f4c
[ "MIT" ]
null
null
null
python-experiments/lambda_example.py
MichaelCurrin/python-2016
00af4e61175fc15aebfab208c76fe9db845d2f4c
[ "MIT" ]
null
null
null
python-experiments/lambda_example.py
MichaelCurrin/python-2016
00af4e61175fc15aebfab208c76fe9db845d2f4c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ flatten a 2 dimensional list into a 1 dimension list by joining column items in a row into one item as single comma-separated string This is useful for preparing data for a CSV writer function which requires a 1-dimensional list of rows with no columns Alternatively, the join functional can...
27.181818
119
0.680602
# -*- coding: utf-8 -*- """ flatten a 2 dimensional list into a 1 dimension list by joining column items in a row into one item as single comma-separated string This is useful for preparing data for a CSV writer function which requires a 1-dimensional list of rows with no columns Alternatively, the join functional can...
0
0
0
0
0
0
0
0
0
afcd895d40b418f27e030dda81dde145aeb07ff0
49,651
py
Python
src/NebulaBayes/tests/test_NB.py
ADThomas-astro/NebulaBayes
bda65809f43bc336914ce39ae59123e8be1abcbc
[ "MIT" ]
2
2018-08-13T13:50:38.000Z
2019-09-12T01:45:21.000Z
src/NebulaBayes/tests/test_NB.py
ADThomas-astro/NebulaBayes
bda65809f43bc336914ce39ae59123e8be1abcbc
[ "MIT" ]
null
null
null
src/NebulaBayes/tests/test_NB.py
ADThomas-astro/NebulaBayes
bda65809f43bc336914ce39ae59123e8be1abcbc
[ "MIT" ]
1
2018-09-17T19:10:07.000Z
2018-09-17T19:10:07.000Z
from __future__ import print_function, division from collections import OrderedDict as OD import itertools import os import unittest import numpy as np import pandas as pd from NebulaBayes import NB_Model, __version__ """ Test suite to test NebulaBayes. Mostly functional and regression tests, with some unit tests a...
44.65018
88
0.583372
from __future__ import print_function, division from collections import OrderedDict as OD import itertools import os import unittest from astropy.io import fits # FITS file I/O from astropy.table import Table # Used in converting to pandas DataFrame import numpy as np import pandas as pd import NebulaBayes from Neb...
0
15,101
0
26,651
0
152
0
76
591
7f5c849a1922a15d5a237861a7d432656ec07858
224
py
Python
spider/spider/distance/rfd/__init__.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
1
2021-11-05T17:42:47.000Z
2021-11-05T17:42:47.000Z
spider/spider/distance/rfd/__init__.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
null
null
null
spider/spider/distance/rfd/__init__.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
2
2019-02-21T18:29:51.000Z
2019-09-02T21:21:26.000Z
""" spider.distance.metricl.rfd sub-package __init.py__ @author: david johnson Primitive that learns and applies random-forest-based distance metric. defines the module index """
17.230769
74
0.709821
""" spider.distance.metricl.rfd sub-package __init.py__ @author: david johnson Primitive that learns and applies random-forest-based distance metric. defines the module index """ from .rfd import RFD
0
0
0
0
0
0
0
-1
23
e6cd940742010007d0946f002755532450bf69fa
4,842
py
Python
prission.py
mandypepe/pythontets
5bf1d84e5c7c769b27c5cda221ab08cc6625daa4
[ "Apache-2.0" ]
null
null
null
prission.py
mandypepe/pythontets
5bf1d84e5c7c769b27c5cda221ab08cc6625daa4
[ "Apache-2.0" ]
null
null
null
prission.py
mandypepe/pythontets
5bf1d84e5c7c769b27c5cda221ab08cc6625daa4
[ "Apache-2.0" ]
null
null
null
import pygame # Aclaraciones # Requiere "pygame" para las graficas # # Se grafican las figuras para una mejor comprencion pero como son coordenadas tan pequenas no se muestran bien # (aumentando las proporciones pude verse mejo) # pero la orden del problema no lo permite. # # La solucion trate de buscarla ma...
37.828125
117
0.522305
import pygame, sys from pygame.locals import * # Aclaraciones # Requiere "pygame" para las graficas # # Se grafican las figuras para una mejor comprencion pero como son coordenadas tan pequenas no se muestran bien # (aumentando las proporciones pude verse mejo) # pero la orden del problema no lo permite. # ...
0
0
0
0
0
777
0
11
58
1dc936213106f9d125c70a922c89b50eee90b068
4,148
py
Python
scripts/mg-compare-heatmap.py
natalie-robinson/MG-RAST-Tools
ed28ffaeb17a156a1d249e4104b042a9ba9cb8d5
[ "BSD-2-Clause" ]
21
2015-01-18T01:43:12.000Z
2021-09-09T03:26:59.000Z
scripts/mg-compare-heatmap.py
natalie-robinson/MG-RAST-Tools
ed28ffaeb17a156a1d249e4104b042a9ba9cb8d5
[ "BSD-2-Clause" ]
26
2015-01-22T21:23:09.000Z
2021-11-13T17:55:37.000Z
scripts/mg-compare-heatmap.py
natalie-robinson/MG-RAST-Tools
ed28ffaeb17a156a1d249e4104b042a9ba9cb8d5
[ "BSD-2-Clause" ]
22
2015-01-18T01:44:36.000Z
2021-09-18T09:29:06.000Z
#!/usr/bin/env python import sys prehelp = """ NAME mg-compare-heatmap VERSION %s SYNOPSIS mg-compare-heatmap [ --help, --input <input file or stdin>, --output <output file or stdout>, --format <cv: 'text' or 'biom'>, --cluster <cv: ward, single, complete, mcquitty, median, centroid>, --distance <cv: bra...
41.48
334
0.662729
#!/usr/bin/env python import os import sys import json from argparse import ArgumentParser from mglib import obj_from_url, tab_to_matrix, AUTH_LIST, API_URL, biom_to_matrix, VERSION prehelp = """ NAME mg-compare-heatmap VERSION %s SYNOPSIS mg-compare-heatmap [ --help, --input <input file or stdin>, --ou...
0
0
0
0
0
2,855
0
61
112
3bf02f939d9fa44b09bbbe9fe168ef56750390f0
5,733
py
Python
Youtube Bot Video Generator/videoscript.py
wasimakh2/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader
8f6e1c7fcbd93f7da8f437cb4bf2d9c67c2932c2
[ "MIT" ]
1
2020-08-24T07:02:32.000Z
2020-08-24T07:02:32.000Z
Youtube Bot Video Generator/videoscript.py
wasimakh2/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader
8f6e1c7fcbd93f7da8f437cb4bf2d9c67c2932c2
[ "MIT" ]
null
null
null
Youtube Bot Video Generator/videoscript.py
wasimakh2/Automatic-Youtube-Reddit-Text-To-Speech-Video-Generator-and-Uploader
8f6e1c7fcbd93f7da8f437cb4bf2d9c67c2932c2
[ "MIT" ]
1
2021-01-25T17:09:35.000Z
2021-01-25T17:09:35.000Z
videoscripts = []
41.846715
117
0.631083
import settings import cv2 from VideoTypes import imageframe, standardredditformat import generatemovie import generatorclient import datetime import os import shutil import videouploader import random import pickle from time import sleep videoscripts = [] class VideoScriptEngine(): def __init...
0
0
0
4,373
0
932
0
-25
426
c7cec01c629502ed181bf15521238a3423e46732
258
py
Python
start.py
ddpaimon/treedbclient
ff03343556090c0398ee1130a91b386e9e2f4cec
[ "MIT" ]
null
null
null
start.py
ddpaimon/treedbclient
ff03343556090c0398ee1130a91b386e9e2f4cec
[ "MIT" ]
null
null
null
start.py
ddpaimon/treedbclient
ff03343556090c0398ee1130a91b386e9e2f4cec
[ "MIT" ]
null
null
null
from main_window import MainWindow if __name__ == "__main__": root = Tk() root.columnconfigure(0, weight=1) root.columnconfigure(2, weight=1) root.rowconfigure(0, weight=1) m = MainWindow(root) root.mainloop()
21.5
37
0.686047
from tkinter import * from main_window import MainWindow if __name__ == "__main__": root = Tk() root.columnconfigure(0, weight=1) root.columnconfigure(2, weight=1) root.rowconfigure(0, weight=1) m = MainWindow(root) root.mainloop()
0
0
0
0
0
0
0
0
22
a927846d4e9a598f9eff23e33973c320f1038c9d
28,220
py
Python
sim_db/sim_db_lib.py
task123/sim_db
892934693fc166640f6cbf7af905a2c0d48ea99b
[ "MIT" ]
null
null
null
sim_db/sim_db_lib.py
task123/sim_db
892934693fc166640f6cbf7af905a2c0d48ea99b
[ "MIT" ]
null
null
null
sim_db/sim_db_lib.py
task123/sim_db
892934693fc166640f6cbf7af905a2c0d48ea99b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Read and write parameters, results and metadata to the 'sim_db' database.""" # Copyright (C) 2017-2019 Hkon Austlid Taskn <hakon.tasken@gmail.com> # Licenced under the MIT License. import sim_db.src_command_line_tool.commands.helpers as helpers def add_empty_sim(store_metadata=False): ...
43.684211
80
0.545216
# -*- coding: utf-8 -*- """Read and write parameters, results and metadata to the 'sim_db' database.""" # Copyright (C) 2017-2019 Håkon Austlid Taskén <hakon.tasken@gmail.com> # Licenced under the MIT License. import sim_db.src_command_line_tool.commands.helpers as helpers import sqlite3 import argparse import subproc...
4
0
0
26,880
0
0
0
-62
222
154902bea517a92105fa6ca2dc639b1aa8ad881c
1,591
py
Python
fossor/checks/loadavg.py
NeolithEra/fossor
d8dbdc40f2f16da601c317dfa74b83e3932c9bb3
[ "BSD-2-Clause" ]
165
2017-12-14T18:44:25.000Z
2020-12-09T01:48:57.000Z
fossor/checks/loadavg.py
NeolithEra/fossor
d8dbdc40f2f16da601c317dfa74b83e3932c9bb3
[ "BSD-2-Clause" ]
12
2017-12-14T23:42:45.000Z
2020-05-29T15:11:02.000Z
fossor/checks/loadavg.py
NeolithEra/fossor
d8dbdc40f2f16da601c317dfa74b83e3932c9bb3
[ "BSD-2-Clause" ]
32
2017-12-14T17:51:57.000Z
2020-06-12T13:11:47.000Z
# Copyright 2017 LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. if __name__ == '__main__': l = LoadAvg() print(l.run({}))
43
122
0.614079
# Copyright 2017 LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. import os from fossor.checks.check import Check class LoadAvg(Check): '''this Check will compare the current load average summaries against the count of ...
0
0
0
1,290
0
0
0
4
68
f4b37dcb02cb91970f72659ca8869f6a3bbb5643
1,532
py
Python
day26_lists_NATO_alphabet/main.py
frnkvsk/python100days
70d607ca58a526f0d66544ed65405b2425718108
[ "Unlicense" ]
null
null
null
day26_lists_NATO_alphabet/main.py
frnkvsk/python100days
70d607ca58a526f0d66544ed65405b2425718108
[ "Unlicense" ]
null
null
null
day26_lists_NATO_alphabet/main.py
frnkvsk/python100days
70d607ca58a526f0d66544ed65405b2425718108
[ "Unlicense" ]
null
null
null
# names = ['Alex', 'Beth', 'Carol', 'Dave', 'Kim', 'Sam', 'Heather', 'Hank'] # students_scores = {student:random.randint(1, 100) for student in names} # passed_students = {student:score for (student, score) in students_scores.items() if score > 59} # print(students_scores) # print(passed_students) # sentence =...
30.039216
103
0.622063
import random # names = ['Alex', 'Beth', 'Carol', 'Dave', 'Kim', 'Sam', 'Heather', 'Hank'] # students_scores = {student:random.randint(1, 100) for student in names} # passed_students = {student:score for (student, score) in students_scores.items() if score > 59} # print(students_scores) # print(passed_students) ...
0
0
0
0
0
297
0
-8
48
f855524a5a17dbd4474da10c04f38088efe0a849
4,279
py
Python
gladiator/prepare/command.py
hellcat17/gladiator
4f1ea65112dab04f584b148d23a150f28a94c434
[ "Apache-2.0" ]
null
null
null
gladiator/prepare/command.py
hellcat17/gladiator
4f1ea65112dab04f584b148d23a150f28a94c434
[ "Apache-2.0" ]
null
null
null
gladiator/prepare/command.py
hellcat17/gladiator
4f1ea65112dab04f584b148d23a150f28a94c434
[ "Apache-2.0" ]
null
null
null
"""Prepare OpenGL commands for use in templates.""" from gladiator.resources import read_resource_file _TYPE_TRANSLATIONS = dict( t.split(",") for t in read_resource_file("data/type_translations").split("\n") if t ) # TODO: take options such as casing, style and namespace # TODO: generate special wr...
28.526667
87
0.714419
"""Prepare OpenGL commands for use in templates.""" from enum import auto, Enum from typing import Iterable, Mapping, Optional, Union import attr from gladiator.parse.command import Command, Type from gladiator.prepare.enum import PreparedEnum from gladiator.prepare.style import transform_symbol from gladiator.optio...
0
1,106
0
117
683
1,387
0
152
478
c7393ff14c969a96e0698f982393eac0fd77f625
351
py
Python
notebooks/bqm_functions.py
ozlemsalehi/qa-edu
4b74a1d06820df36b710919c31a82a71b4e85d84
[ "MIT" ]
1
2021-10-10T03:35:03.000Z
2021-10-10T03:35:03.000Z
notebooks/bqm_functions.py
ozlemsalehi/qa-edu
4b74a1d06820df36b710919c31a82a71b4e85d84
[ "MIT" ]
null
null
null
notebooks/bqm_functions.py
ozlemsalehi/qa-edu
4b74a1d06820df36b710919c31a82a71b4e85d84
[ "MIT" ]
null
null
null
""" This file contains all the functions used in the notebooks under the Binary Quadratic Model section. Prepared by Akash Narayanan B """ # Task 3 linear = {'x1': 3, 'x2': -1, 'x3': 10, 'x4': 7} quadratic = {('x1', 'x2'): 2, ('x1', 'x3'): -5, ('x2', 'x3'): 3, ('x3', 'x4'): 11} offset = 8 vartype = 'BINARY'
25.071429
82
0.621083
""" This file contains all the functions used in the notebooks under the Binary Quadratic Model section. Prepared by Akash Narayanan B """ from dimod import BinaryQuadraticModel # Task 3 linear = {'x1': 3, 'x2': -1, 'x3': 10, 'x4': 7} quadratic = {('x1', 'x2'): 2, ('x1', 'x3'): -5, ('x2', 'x3'): 3, ('x3', 'x4'): 11...
0
0
0
0
0
0
0
17
22
21724846cd453a1ea089631982f272aa7f74cddf
754
py
Python
project/delibere/migrations/0036_auto_20170922_1319.py
guglielmo/mosic2-db-delibere
a7c92adf42ad53023af47776c32baa2ee525f5e9
[ "BSD-3-Clause" ]
null
null
null
project/delibere/migrations/0036_auto_20170922_1319.py
guglielmo/mosic2-db-delibere
a7c92adf42ad53023af47776c32baa2ee525f5e9
[ "BSD-3-Clause" ]
null
null
null
project/delibere/migrations/0036_auto_20170922_1319.py
guglielmo/mosic2-db-delibere
a7c92adf42ad53023af47776c32baa2ee525f5e9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-09-22 13:19 from __future__ import unicode_literals
27.925926
124
0.619363
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-09-22 13:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('delibere', '0035_auto_20170621_1621'), ] operations = [ migrations.AlterFie...
0
0
0
575
0
0
0
19
46
b4791417864a20c51bb22fe093517c0cb17c5969
2,605
py
Python
classification_ScanObjectNN/ScanObjectNN.py
ma-xu/pointMLP-pytorch
205669826d269972e2616b13198dd52f41c9992e
[ "Apache-2.0" ]
95
2022-02-15T10:09:31.000Z
2022-03-30T04:29:12.000Z
classification_ScanObjectNN/ScanObjectNN.py
ma-xu/pointMLP-pytorch
205669826d269972e2616b13198dd52f41c9992e
[ "Apache-2.0" ]
17
2022-02-16T06:41:09.000Z
2022-03-31T13:00:09.000Z
classification_ScanObjectNN/ScanObjectNN.py
13952522076/pointMLP-pytorch
205669826d269972e2616b13198dd52f41c9992e
[ "Apache-2.0" ]
13
2022-02-16T10:06:11.000Z
2022-03-31T12:55:44.000Z
""" ScanObjectNN download: http://103.24.77.34/scanobjectnn/h5_files.zip """ import os os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" if __name__ == '__main__': train = ScanObjectNN(1024) test = ScanObjectNN(1024, 'test') for data, label in train: print(data.shape) print(label)
32.160494
108
0.66142
""" ScanObjectNN download: http://103.24.77.34/scanobjectnn/h5_files.zip """ import os import sys import glob import h5py import numpy as np from torch.utils.data import Dataset os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" def download(): BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os....
0
0
0
557
0
1,551
0
-19
202
a4a4356ef17d15a32870aceafc1ab8a92b4c9303
71
py
Python
sgi/recursos_humanos/__init__.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
null
null
null
sgi/recursos_humanos/__init__.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
8
2019-12-07T13:13:34.000Z
2021-09-02T03:07:25.000Z
sgi/recursos_humanos/__init__.py
jorgevilaca82/SGI
c3f13d9e3e8f04377d9e23636dc8e35ed5ace35a
[ "MIT" ]
null
null
null
default_app_config = "sgi.recursos_humanos.apps.RecursosHumanosConfig"
35.5
70
0.873239
default_app_config = "sgi.recursos_humanos.apps.RecursosHumanosConfig"
0
0
0
0
0
0
0
0
0
9903afe6a1227ea53c957090155382ddf95e9914
13,824
py
Python
gntp/__init__.py
pcjacobse/sabnzbd
494e72a9963a1810e69f4e0f69df7c9dfb9256b0
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
gntp/__init__.py
pcjacobse/sabnzbd
494e72a9963a1810e69f4e0f69df7c9dfb9256b0
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
gntp/__init__.py
pcjacobse/sabnzbd
494e72a9963a1810e69f4e0f69df7c9dfb9256b0
[ "0BSD", "PSF-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause" ]
null
null
null
import re __version__ = '0.8' #GNTP/<version> <messagetype> <encryptionAlgorithmID>[:<ivValue>][ <keyHashAlgorithmID>:<keyHash>.<salt>] GNTP_INFO_LINE = re.compile( 'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)' + ' (?P<encryptionAlgorithmID>[A-Z0-9]+(:(?P<ivValue>[A-F0-9]+))?)...
27.105882
105
0.697844
import re import hashlib import time import StringIO __version__ = '0.8' #GNTP/<version> <messagetype> <encryptionAlgorithmID>[:<ivValue>][ <keyHashAlgorithmID>:<keyHash>.<salt>] GNTP_INFO_LINE = re.compile( 'GNTP/(?P<version>\d+\.\d+) (?P<messagetype>REGISTER|NOTIFY|SUBSCRIBE|\-OK|\-ERROR)' + ' (?P<encryptionAlgor...
0
0
0
12,125
0
0
0
-23
319