hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
940455745fde1d3722c8e9e8897afafdd7e27380 | 1,705 | py | Python | migration/couch/release_6/2.removing_max_length_constraint_in_deletion_form_model.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | migration/couch/release_6/2.removing_max_length_constraint_in_deletion_form_model.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | migration/couch/release_6/2.removing_max_length_constraint_in_deletion_form_model.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import traceback
import urllib2
from mangrove.contrib.deletion import ENTITY_DELETION_FORM_CODE
from mangrove.datastore.database import get_db_manager
from mangrove.form_model.form_model import get_form_model_by_code
from datetime import datetime
from migration.couch.utils import configure_csv, mark_as_completed, shoul... | 34.1 | 83 | 0.719062 | import traceback
import urllib2
from mangrove.contrib.deletion import ENTITY_DELETION_FORM_CODE
from mangrove.datastore.database import get_db_manager
from mangrove.form_model.form_model import get_form_model_by_code
from datetime import datetime
from migration.couch.utils import configure_csv, mark_as_completed, shoul... | 1,095 | 0 | 92 |
e996c3924b4c8fd54b2995fd54bcb58d2946c6c5 | 5,464 | py | Python | pytorch_seed_rl/eval.py | mjanschek/pytorch_seed_rl | bd7415deb8bbb04b11b92439eea0fc2a19bb029d | [
"Apache-2.0"
] | 9 | 2020-06-10T07:17:39.000Z | 2022-01-25T12:09:03.000Z | pytorch_seed_rl/eval.py | mjanschek/pytorch_seed_rl | bd7415deb8bbb04b11b92439eea0fc2a19bb029d | [
"Apache-2.0"
] | null | null | null | pytorch_seed_rl/eval.py | mjanschek/pytorch_seed_rl | bd7415deb8bbb04b11b92439eea0fc2a19bb029d | [
"Apache-2.0"
] | 3 | 2021-02-25T07:19:29.000Z | 2021-07-21T02:15:44.000Z | # Copyright 2020 Michael Janschek
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 33.937888 | 96 | 0.599012 | # Copyright 2020 Michael Janschek
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 227 | 0 | 23 |
5ff2bd52646b91e7f66767014ce247899091949e | 4,293 | py | Python | maddpg.py | zhuohann/MADDPG | 468c9802808fc4783a858238dfe3085510ddddab | [
"MIT"
] | null | null | null | maddpg.py | zhuohann/MADDPG | 468c9802808fc4783a858238dfe3085510ddddab | [
"MIT"
] | 2 | 2021-03-19T02:21:43.000Z | 2022-01-13T01:26:44.000Z | maddpg.py | zhuohann/MADDPG | 468c9802808fc4783a858238dfe3085510ddddab | [
"MIT"
] | null | null | null | # main code that contains the neural network setup
# policy + critic updates
# see ddpg.py for other details in the network
from ddpg import DDPGAgent
import torch.nn.functional as F
import torch
from utilities import soft_update, transpose_to_tensor, transpose_list
import numpy as np
#device = torch.device("cuda" if ... | 39.027273 | 124 | 0.638947 | # main code that contains the neural network setup
# policy + critic updates
# see ddpg.py for other details in the network
from ddpg import DDPGAgent
import torch.nn.functional as F
import torch
from utilities import soft_update, transpose_to_tensor, transpose_list
import numpy as np
#device = torch.device("cuda" if ... | 2,335 | 1,517 | 23 |
ca24048f18fef0763e85fb640eb32f0edb9cebac | 5,290 | py | Python | torchrecipes/audio/source_separation/datamodule/librimix.py | nateanl/recipes-1 | 3b46a7479508608f73b6f24deffdc8fcffd25ee5 | [
"BSD-3-Clause"
] | null | null | null | torchrecipes/audio/source_separation/datamodule/librimix.py | nateanl/recipes-1 | 3b46a7479508608f73b6f24deffdc8fcffd25ee5 | [
"BSD-3-Clause"
] | null | null | null | torchrecipes/audio/source_separation/datamodule/librimix.py | nateanl/recipes-1 | 3b46a7479508608f73b6f24deffdc8fcffd25ee5 | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
from typing import (
Optional,
)
import pytorch_lightning as pl
from hydra.core.config_store import ConfigStore
from omegaconf import MISSING
from torch.utils.data import DataLoader
from torchaudio.datasets import LibriMix
from torchrecipes.core.conf import DataModuleConf
from tor... | 32.654321 | 103 | 0.578828 | from dataclasses import dataclass
from typing import (
Optional,
)
import pytorch_lightning as pl
from hydra.core.config_store import ConfigStore
from omegaconf import MISSING
from torch.utils.data import DataLoader
from torchaudio.datasets import LibriMix
from torchrecipes.core.conf import DataModuleConf
from tor... | 2,228 | 2,357 | 45 |
44216f2ddd6e5ee0059892f1b439659b71fb689e | 501 | py | Python | rocketman/types/common.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | rocketman/types/common.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | rocketman/types/common.py | Batucho/Rocketman | ff93b7e68be269e4b1b04b4d72611e308e73a76b | [
"MIT"
] | null | null | null | from typing import Optional, TypedDict, Union
| 17.275862 | 45 | 0.674651 | from typing import Optional, TypedDict, Union
class MassType(TypedDict):
kg: Union[int, None]
lb: Union[int, None]
class WeightType(TypedDict):
id: Optional[str]
kg: int
lb: int
name: Optional[str]
class VolumeType(TypedDict):
cubic_meters: Union[int, None]
cubic_feet: Union[int, N... | 0 | 335 | 115 |
47ae39801f682d5dfcd382c59b1674a479d7098b | 538 | py | Python | src/euler_python_package/euler_python/easiest/p020.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/easiest/p020.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | src/euler_python_package/euler_python/easiest/p020.py | wilsonify/euler | 5214b776175e6d76a7c6d8915d0e062d189d9b79 | [
"MIT"
] | null | null | null | import math
# We do a straightforward computation thanks to Python's built-in arbitrary precision integer type.
def problem020():
"""
n! means n × (n − 1) × ... × 3 × 2 × 1
For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 ... | 21.52 | 99 | 0.557621 | import math
# We do a straightforward computation thanks to Python's built-in arbitrary precision integer type.
def problem020():
"""
n! means n × (n − 1) × ... × 3 × 2 × 1
For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 ... | 0 | 0 | 0 |
bace4d0c2778a815c0bb09eb4a15f788ed5f6add | 4,271 | py | Python | server/danesfield_server/algorithms/run_metrics.py | Kitware/Danesfield-App | 70d9f5c7c5af2ca92d274c99175783ea43087592 | [
"Apache-2.0"
] | 25 | 2018-12-19T08:45:13.000Z | 2022-03-27T14:20:42.000Z | server/danesfield_server/algorithms/run_metrics.py | Kitware/Danesfield-App | 70d9f5c7c5af2ca92d274c99175783ea43087592 | [
"Apache-2.0"
] | 10 | 2018-11-30T22:21:45.000Z | 2022-01-21T19:43:47.000Z | server/danesfield_server/algorithms/run_metrics.py | Kitware/Danesfield-App | 70d9f5c7c5af2ca92d274c99175783ea43087592 | [
"Apache-2.0"
] | 7 | 2018-12-03T21:42:53.000Z | 2021-09-07T17:09:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc. and Contributors
# Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0)
# See accompanying Copyright.txt and LICENSE files for details
##########... | 30.949275 | 79 | 0.599625 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc. and Contributors
# Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0)
# See accompanying Copyright.txt and LICENSE files for details
##########... | 0 | 0 | 0 |
9108793bcfd9000ae19392aed30396e7651c7e74 | 2,193 | py | Python | setup.py | LongJohnCoder/amazon-scraper-python | 41e5bd08b92a617a09a65938e1b783712ee2c220 | [
"MIT"
] | 1 | 2020-04-19T19:55:11.000Z | 2020-04-19T19:55:11.000Z | setup.py | LongJohnCoder/amazon-scraper-python | 41e5bd08b92a617a09a65938e1b783712ee2c220 | [
"MIT"
] | null | null | null | setup.py | LongJohnCoder/amazon-scraper-python | 41e5bd08b92a617a09a65938e1b783712ee2c220 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
try: # Pour pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # For pip <= 9
from pip.req import parse_requirements
# Based on http://peterdowns.com/posts/first-time-with-pypi.html
__version__ = '0.0.5' # Should match with __... | 33.227273 | 70 | 0.687187 | # -*- coding: utf-8 -*-
from setuptools import setup
try: # Pour pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # For pip <= 9
from pip.req import parse_requirements
# Based on http://peterdowns.com/posts/first-time-with-pypi.html
__version__ = '0.0.5' # Should match with __... | 0 | 0 | 0 |
7eefa56f60ffa41ef7e8f0cd2ba54a70e563451b | 3,728 | py | Python | authors/apps/profiles/tests/test_profile.py | andela-gad/Ah-backend-aquaman | 29cf560063171c2bb8c8aed1ff36436acbc47bc9 | [
"BSD-3-Clause"
] | 3 | 2021-02-20T15:21:33.000Z | 2021-08-20T10:23:08.000Z | authors/apps/profiles/tests/test_profile.py | andela-gad/Ah-backend-aquaman | 29cf560063171c2bb8c8aed1ff36436acbc47bc9 | [
"BSD-3-Clause"
] | 130 | 2019-11-07T02:35:18.000Z | 2021-07-30T02:17:11.000Z | authors/apps/profiles/tests/test_profile.py | CryceTruly/Ah-backend-aquaman | 29cf560063171c2bb8c8aed1ff36436acbc47bc9 | [
"BSD-3-Clause"
] | 6 | 2019-06-29T12:09:37.000Z | 2020-03-06T07:02:55.000Z | """
Test profiles app
"""
from django.urls import reverse
from authors.apps.profiles.tests.test_base import BaseTestCase
from .test_data import (new_user, update_profile)
class TestProfile(BaseTestCase):
"""Handles tests for the user profile feature/app"""
def test_get_user_profile(self):
"""This t... | 43.348837 | 98 | 0.690719 | """
Test profiles app
"""
from django.urls import reverse
from authors.apps.profiles.tests.test_base import BaseTestCase
from .test_data import (new_user, update_profile)
class TestProfile(BaseTestCase):
"""Handles tests for the user profile feature/app"""
def test_get_user_profile(self):
"""This t... | 0 | 0 | 0 |
479f1f9aa1c23ac909701fa9728139d1a8d79db7 | 1,175 | py | Python | Easy/922.SortArrayByParityII(List).py | YuriSpiridonov/LeetCode | 2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781 | [
"MIT"
] | 39 | 2020-07-04T11:15:13.000Z | 2022-02-04T22:33:42.000Z | Easy/922.SortArrayByParityII(List).py | YuriSpiridonov/LeetCode | 2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781 | [
"MIT"
] | 1 | 2020-07-15T11:53:37.000Z | 2020-07-15T11:53:37.000Z | Easy/922.SortArrayByParityII(List).py | YuriSpiridonov/LeetCode | 2dfcc9c71466ffa2ebc1c89e461ddfca92e2e781 | [
"MIT"
] | 20 | 2020-07-14T19:12:53.000Z | 2022-03-02T06:28:17.000Z | """
Given an array A of non-negative integers, half of the integers in A are
odd, and half of the integers are even.
Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i]
is even, i is even.
You may return any answer array that satisfies this condition.
Example:
Input: ... | 29.375 | 99 | 0.55234 | """
Given an array A of non-negative integers, half of the integers in A are
odd, and half of the integers are even.
Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i]
is even, i is even.
You may return any answer array that satisfies this condition.
Example:
Input: ... | 310 | -6 | 49 |
553078708ac997a7973f97e1f1d54f9592e5dbc7 | 551 | py | Python | DB/PySQLTest2.py | mmihir16/Final-Year-Project | 18ca4f4f29b1fafb6dcd86d262836256acf107f1 | [
"MIT"
] | 1 | 2021-03-11T17:41:44.000Z | 2021-03-11T17:41:44.000Z | DB/PySQLTest2.py | Hemantr05/Graph-based-keyword-extraction | dd1ab03b6549ff166f8a05f763359fa29deaf61c | [
"MIT"
] | 6 | 2021-03-31T19:50:38.000Z | 2022-03-12T00:25:43.000Z | DB/PySQLTest2.py | Hemantr05/Graph-based-keyword-extraction | dd1ab03b6549ff166f8a05f763359fa29deaf61c | [
"MIT"
] | null | null | null | import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="root",
auth_plugin='mysql_native_password',
database='project'
)
print(mydb)
mycursor = mydb.cursor()
thisdict = {
"brand": 6,
"model": 8,
"year": 10
}
print(thisdict)
for i in thisdic... | 17.21875 | 62 | 0.6098 | import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="root",
auth_plugin='mysql_native_password',
database='project'
)
print(mydb)
mycursor = mydb.cursor()
thisdict = {
"brand": 6,
"model": 8,
"year": 10
}
print(thisdict)
for i in thisdic... | 0 | 0 | 0 |
27578380185c70062f34e66e5e00e695a466c432 | 417 | py | Python | browser/user_agent.py | Shiro-Nakamura/Hacking | 748d3d3591209e79600a12f317cddc81e1e05cf9 | [
"MIT"
] | null | null | null | browser/user_agent.py | Shiro-Nakamura/Hacking | 748d3d3591209e79600a12f317cddc81e1e05cf9 | [
"MIT"
] | null | null | null | browser/user_agent.py | Shiro-Nakamura/Hacking | 748d3d3591209e79600a12f317cddc81e1e05cf9 | [
"MIT"
] | null | null | null | import mechanize
if __name__=="__main__":
main() | 26.0625 | 71 | 0.654676 | import mechanize
def callWithUserAgent(url, userAgent):
browser = mechanize.Browser()
browser.addheaders = userAgent
page = browser.open(url)
source_code = page.read()
print source_code
def main():
url = "http://whatsmyuseragent.org"
userAgent = [('User-agent', 'Opera/9.26 (Windows ... | 307 | 0 | 53 |
96511991fec4352119bf2856b8ae739fd5e8ed3b | 1,245 | py | Python | pymagic/constants.py | harshavardhana/bungee-plugins | d1042b4fd3654890d67393ed65e0064bb30086f8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | pymagic/constants.py | harshavardhana/bungee-plugins | d1042b4fd3654890d67393ed65e0064bb30086f8 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-03-05T13:16:30.000Z | 2021-03-05T15:20:22.000Z | pymagic/constants.py | harshavardhana/bungee-plugins | d1042b4fd3654890d67393ed65e0064bb30086f8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
## STOLEN from libmagic man page
MAGIC_NONE = 0x000000 # No flags
MAGIC_DEBUG = 0x000001 # Turn on debugging
MAGIC_SYMLINK = 0x000002 # Follow symlinks
MAGIC_COMPRESS = 0x000004 # Check inside compressed files
MAGIC_DEVICES = 0x000008 # Look at the contents of devices
MAGIC_MIME = 0x000010... | 27.666667 | 69 | 0.786345 | # -*- coding: utf-8 -*-
## STOLEN from libmagic man page
MAGIC_NONE = 0x000000 # No flags
MAGIC_DEBUG = 0x000001 # Turn on debugging
MAGIC_SYMLINK = 0x000002 # Follow symlinks
MAGIC_COMPRESS = 0x000004 # Check inside compressed files
MAGIC_DEVICES = 0x000008 # Look at the contents of devices
MAGIC_MIME = 0x000010... | 0 | 0 | 0 |
40cba92245fcbe961d764b420ea8814148452f71 | 1,368 | py | Python | yt_concate/pipeline/steps/download_caption.py | kinslersi/yt-concate | b68a842138997c48bf605e9811cf47f0db2faaa6 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/download_caption.py | kinslersi/yt-concate | b68a842138997c48bf605e9811cf47f0db2faaa6 | [
"MIT"
] | null | null | null | yt_concate/pipeline/steps/download_caption.py | kinslersi/yt-concate | b68a842138997c48bf605e9811cf47f0db2faaa6 | [
"MIT"
] | null | null | null | import os
import time
import logging
import sys
from threading import Thread
from youtube_transcript_api import YouTubeTranscriptApi
from yt_concate.pipeline.steps.step import Step
| 31.813953 | 76 | 0.556287 | import os
import time
import logging
import sys
from threading import Thread
from youtube_transcript_api import YouTubeTranscriptApi
from yt_concate.pipeline.steps.step import Step
class DownLoadCaptions(Step):
def process(self, data, inputs, utils):
logger = logging.getLogger()
start = time.time... | 1,101 | 8 | 76 |
e679deb964ab3881c46a133f3a394bbc101d75e7 | 1,362 | py | Python | tests/test_synth.py | bilardi/aws-cdk-test-synth | 9117d97ccdcc4331e8cc90dd4ccd205895b62c70 | [
"MIT"
] | 3 | 2021-02-22T17:58:59.000Z | 2021-06-16T11:20:25.000Z | tests/test_synth.py | bilardi/aws-cdk-test-synth | 9117d97ccdcc4331e8cc90dd4ccd205895b62c70 | [
"MIT"
] | null | null | null | tests/test_synth.py | bilardi/aws-cdk-test-synth | 9117d97ccdcc4331e8cc90dd4ccd205895b62c70 | [
"MIT"
] | 1 | 2021-06-30T18:24:40.000Z | 2021-06-30T18:24:40.000Z | import unittest
from aws_cdk_test_synth.test_synth import TestSynth
if __name__ == '__main__':
unittest.main()
| 54.48 | 185 | 0.778267 | import unittest
from aws_cdk_test_synth.test_synth import TestSynth
class TestService(unittest.TestCase):
t = None
def __init__(self, *args, **kwargs):
self.t = TestSynth('tests/s3.yaml')
unittest.TestCase.__init__(self, *args, **kwargs)
def test_remove_asset_parameter_identifier(self):
... | 1,113 | 110 | 23 |
d1bf04974e757d204fd0427f78d60e4f4bafa15e | 7,687 | py | Python | twitterproj/jobmanager.py | chebee7i/twitter | ec1d772c3ef7d2288ac8051efb8637378f3ec195 | [
"Unlicense"
] | 2 | 2018-12-17T02:47:19.000Z | 2021-02-02T05:39:45.000Z | twitterproj/jobmanager.py | chebee7i/twitter | ec1d772c3ef7d2288ac8051efb8637378f3ec195 | [
"Unlicense"
] | null | null | null | twitterproj/jobmanager.py | chebee7i/twitter | ec1d772c3ef7d2288ac8051efb8637378f3ec195 | [
"Unlicense"
] | null | null | null | #! -*- encoding: utf-8 -*-
"""
Some simple helper scripts to aid in distributed job management.
"""
from multiprocessing import Process
from itertools import islice, product, izip_longest
import sqlite3
import datetime
import sys
import time
import numpy as np
#dbname = 'fullsupport_temp.db'
#conn = sqlite3.connect... | 30.995968 | 84 | 0.52244 | #! -*- encoding: utf-8 -*-
"""
Some simple helper scripts to aid in distributed job management.
"""
from multiprocessing import Process
from itertools import islice, product, izip_longest
import sqlite3
import datetime
import sys
import time
import numpy as np
#dbname = 'fullsupport_temp.db'
#conn = sqlite3.connect... | 3,927 | 0 | 347 |
0d538a29dcb5ff285f57b4cda5cae21ced71419f | 864 | py | Python | programming/python/py.test/conftest.py | 4qu3l3c4r4/Automation-Test-Knowledge-Base | 7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f | [
"MIT"
] | 191 | 2015-01-11T10:47:03.000Z | 2022-03-14T09:14:50.000Z | programming/python/py.test/conftest.py | TATJAVAPavelKlindziuk/at.info-knowledge-base | 7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f | [
"MIT"
] | 2 | 2021-06-04T02:10:01.000Z | 2022-03-31T20:21:06.000Z | programming/python/py.test/conftest.py | TATJAVAPavelKlindziuk/at.info-knowledge-base | 7f6f1ba374d9277647bde6a7feaa6a6e8b53ae8f | [
"MIT"
] | 175 | 2015-01-09T16:45:09.000Z | 2022-02-12T23:54:23.000Z | import pytest
import logging
from multiprocessing.process import current_process
from threading import current_thread
import time
logging.basicConfig(filename="log.txt", filemode="w")
log = logging.getLogger()
log.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
formatter = lo... | 26.181818 | 60 | 0.743056 | import pytest
import logging
from multiprocessing.process import current_process
from threading import current_thread
import time
logging.basicConfig(filename="log.txt", filemode="w")
log = logging.getLogger()
log.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
formatter = lo... | 371 | 0 | 69 |
038d2f3eed9d426f61bf79d9f496c7ff1201ae12 | 3,104 | py | Python | OOP_Quiz/test.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | OOP_Quiz/test.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | OOP_Quiz/test.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | import time
# class App:
import time
route = Route()
in_route = Bus()
while True:
main_input = input("(n)ew Route, (s)how, (c)hoose, (q)uit : ")
if main_input == "n":
route_name = input("Enter route name : ")
route.add_route(route_name)
for i in range(len(route.all_route)):
... | 26.305085 | 177 | 0.560889 | import time
class Route:
def __init__(self):
self.__all_route = []
@property
def all_route(self):
return self.__all_route
@all_route.setter
def all_route(self,name):
self.__all_route.append(name)
def add_route(self,name):
self.__all_route.append(name)
class B... | 918 | 492 | 68 |
c7eefef7fa6015d90b6f72ac34739f0eeb3e0bd0 | 12,811 | py | Python | PayloadManager.py | Konstantinos-Papanagnou/LFITester | f08e2eb0fa52d8abcbe787d17468da6ae297c925 | [
"MIT"
] | null | null | null | PayloadManager.py | Konstantinos-Papanagnou/LFITester | f08e2eb0fa52d8abcbe787d17468da6ae297c925 | [
"MIT"
] | null | null | null | PayloadManager.py | Konstantinos-Papanagnou/LFITester | f08e2eb0fa52d8abcbe787d17468da6ae297c925 | [
"MIT"
] | null | null | null | import re
import requests
import urllib
from UAList import fetchUA, fetchAgent
from urllib.parse import quote
from urllib.request import urlopen
from urllib.error import URLError, HTTPError
from termcolor import colored
from proxies_list import fetch_proxy
from requests.auth import HTTPBasicAuth
from pwn import listen
... | 36.291785 | 592 | 0.64749 | import re
import requests
import urllib
from UAList import fetchUA, fetchAgent
from urllib.parse import quote
from urllib.request import urlopen
from urllib.error import URLError, HTTPError
from termcolor import colored
from proxies_list import fetch_proxy
from requests.auth import HTTPBasicAuth
from pwn import listen
... | 11,671 | -7 | 352 |
9c625debeec4fbff9edbf94bffd5b78fdc507ec2 | 1,974 | py | Python | src/tidypy/tools/manifest.py | laundmo/tidypy | 3d08b4f95ed7c8827789222c9670a131cdf965b7 | [
"MIT"
] | 33 | 2018-03-13T21:30:51.000Z | 2022-01-17T02:14:59.000Z | src/tidypy/tools/manifest.py | laundmo/tidypy | 3d08b4f95ed7c8827789222c9670a131cdf965b7 | [
"MIT"
] | 89 | 2017-10-14T16:39:20.000Z | 2022-03-06T17:23:36.000Z | src/tidypy/tools/manifest.py | laundmo/tidypy | 3d08b4f95ed7c8827789222c9670a131cdf965b7 | [
"MIT"
] | 9 | 2018-05-17T16:11:12.000Z | 2021-09-15T01:48:16.000Z |
import os
import check_manifest
from .base import Tool, Issue
IGNORE_MSGS = (
'lists of files in version control and sdist match',
)
class CheckManifestTool(Tool):
"""
Uses the check-manifest script to detect discrepancies or problems with
your project's MANIFEST.in file.
"""
@classmet... | 23.223529 | 75 | 0.554205 |
import os
import check_manifest
from .base import Tool, Issue
IGNORE_MSGS = (
'lists of files in version control and sdist match',
)
class CheckManifestIssue(Issue):
tool = 'manifest'
pylint_type = 'W'
class CheckManifestUI(check_manifest.UI):
def __init__(self, dirname):
super().__init... | 1,297 | 75 | 259 |
86a7b452d960dbca273863d9e07b1fc27e306fdf | 2,874 | py | Python | data/process_data.py | max87-arch/distaser-reponses-project | e7d719f32623ac95be75099c8c09d2a82682679c | [
"MIT"
] | null | null | null | data/process_data.py | max87-arch/distaser-reponses-project | e7d719f32623ac95be75099c8c09d2a82682679c | [
"MIT"
] | null | null | null | data/process_data.py | max87-arch/distaser-reponses-project | e7d719f32623ac95be75099c8c09d2a82682679c | [
"MIT"
] | null | null | null | import sys
import pandas as pd
import sqlalchemy as sql
# Extract data
def load_data(messages_filepath, categories_filepath):
"""
the function creates two DateFrame from two input arguments, and it merges them in one DateFrame
:param messages_filepath: the path of messages CSV file
:param categories_... | 34.214286 | 110 | 0.672234 | import sys
import pandas as pd
import sqlalchemy as sql
# Extract data
def load_data(messages_filepath, categories_filepath):
"""
the function creates two DateFrame from two input arguments, and it merges them in one DateFrame
:param messages_filepath: the path of messages CSV file
:param categories_... | 959 | 0 | 23 |
bc6b7b1dd123582c8c867d8046e4bc805b8b5f82 | 5,985 | py | Python | tests/unit/restapi/job/test_service.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 14 | 2021-06-17T15:16:12.000Z | 2021-11-08T10:25:37.000Z | tests/unit/restapi/job/test_service.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 7 | 2021-09-20T20:20:26.000Z | 2022-03-30T13:17:43.000Z | tests/unit/restapi/job/test_service.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 4 | 2021-06-29T16:52:42.000Z | 2022-01-21T16:56:45.000Z | # This Software (Dioptra) is being made available as a public service by the
# National Institute of Standards and Technology (NIST), an Agency of the United
# States Department of Commerce. This software was developed in part by employees of
# NIST and in part by NIST contractors. Copyright in portions of this softwar... | 33.435754 | 86 | 0.700251 | # This Software (Dioptra) is being made available as a public service by the
# National Institute of Standards and Technology (NIST), an Agency of the United
# States Department of Commerce. This software was developed in part by employees of
# NIST and in part by NIST contractors. Copyright in portions of this softwar... | 3,847 | 42 | 155 |
a6064af612e9215c80adb42e0781e4f678ffc480 | 853 | py | Python | prime_numbers/benchmark.py | elbertcastaneda/benchmarks_scripts | 07f931b5e39b5d234087c0e755cd1da122946ff3 | [
"Apache-2.0"
] | 1 | 2018-10-26T02:57:59.000Z | 2018-10-26T02:57:59.000Z | prime_numbers/benchmark.py | elbertcastaneda/benchmarks_scripts | 07f931b5e39b5d234087c0e755cd1da122946ff3 | [
"Apache-2.0"
] | null | null | null | prime_numbers/benchmark.py | elbertcastaneda/benchmarks_scripts | 07f931b5e39b5d234087c0e755cd1da122946ff3 | [
"Apache-2.0"
] | null | null | null | import time
def get_primes7(n):
"""
standard optimized sieve algorithm to get a list of prime numbers
--- this is the function to compare your functions against! ---
"""
if n < 2: return []
if n == 2: return [2]
# do only odd numbers starting at 3
s = list(range(3, n+1, 2))
# n**0.... | 23.054054 | 69 | 0.506448 | import time
def get_primes7(n):
"""
standard optimized sieve algorithm to get a list of prime numbers
--- this is the function to compare your functions against! ---
"""
if n < 2: return []
if n == 2: return [2]
# do only odd numbers starting at 3
s = list(range(3, n+1, 2))
# n**0.... | 0 | 0 | 0 |
2331ef0dece4777b7de60ca6c255915dd4becb8c | 5,084 | py | Python | app/frontend/main.py | tec-csf/TC3041-PF-Primavera-2019-equipo-12_real | 9b96d3e04cc2c384f6771d72b283e60b41b8491f | [
"Apache-2.0"
] | 1 | 2019-12-10T06:47:11.000Z | 2019-12-10T06:47:11.000Z | app/frontend/main.py | tec-csf/TC3041-PF-Primavera-2019-equipo-12_real | 9b96d3e04cc2c384f6771d72b283e60b41b8491f | [
"Apache-2.0"
] | null | null | null | app/frontend/main.py | tec-csf/TC3041-PF-Primavera-2019-equipo-12_real | 9b96d3e04cc2c384f6771d72b283e60b41b8491f | [
"Apache-2.0"
] | null | null | null | from flask import Flask, request, redirect, url_for, render_template, session, jsonify
from flask_api import FlaskAPI, status, exceptions
from app.api import api
import cgi
import os
import jinja2
''' para separar un string por espacios o comas '''
import re
env = jinja2.Environment()
env.globals.update(zip=zip)
app... | 33.012987 | 154 | 0.590677 | from flask import Flask, request, redirect, url_for, render_template, session, jsonify
from flask_api import FlaskAPI, status, exceptions
from app.api import api
import cgi
import os
import jinja2
''' para separar un string por espacios o comas '''
import re
env = jinja2.Environment()
env.globals.update(zip=zip)
app... | 1,935 | 0 | 88 |
506ae77c821dcb1952063ff5cc75a80d34bc4089 | 474 | py | Python | moka/templates/pages/moka_success.py | harpiya/moka | 220c4501dc37cc8db8213f2275a071d7b5bc3f69 | [
"MIT"
] | null | null | null | moka/templates/pages/moka_success.py | harpiya/moka | 220c4501dc37cc8db8213f2275a071d7b5bc3f69 | [
"MIT"
] | null | null | null | moka/templates/pages/moka_success.py | harpiya/moka | 220c4501dc37cc8db8213f2275a071d7b5bc3f69 | [
"MIT"
] | null | null | null | # @Author: Saadettin Yasir AKEL <developer>
# @Date: 2019-01-20T18:00:40+03:00
# @Email: yasir@harpiya.com
# @Project: Harpiya Kurumsal Yönetim Sistemi
# @Filename: moka_success.py
# @Last modified by: developer
# @Last modified time: 2019-01-20T21:12:47+03:00
# @License: MIT License. See license.txt
# @Copyright:... | 24.947368 | 48 | 0.753165 | # @Author: Saadettin Yasir AKEL <developer>
# @Date: 2019-01-20T18:00:40+03:00
# @Email: yasir@harpiya.com
# @Project: Harpiya Kurumsal Yönetim Sistemi
# @Filename: moka_success.py
# @Last modified by: developer
# @Last modified time: 2019-01-20T21:12:47+03:00
# @License: MIT License. See license.txt
# @Copyright:... | 42 | 0 | 23 |
3c237c41a85eb8fead08c4138175368584de93d3 | 8,615 | py | Python | tests/test_query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-05-09T08:34:30.000Z | 2018-09-25T22:42:09.000Z | tests/test_query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | 2 | 2018-12-24T10:51:30.000Z | 2019-01-21T13:55:11.000Z | tests/test_query.py | mikecokina/pyopentsdb | b8d78e8f42aed4ebbd6ac3aff925071de41d6b52 | [
"MIT"
] | null | null | null | import unittest
from unittest import mock
import datetime
from pyopentsdb import tsdb
from pyopentsdb import errors
from pyopentsdb.query import tsdb_query_metrics_validation
from tests.testutils import get_mock_requests_post, mock_tsdb_connection_error_post, mock_unexpected_error_post
from tests.testutils import Gen... | 36.504237 | 111 | 0.497853 | import unittest
from unittest import mock
import datetime
from pyopentsdb import tsdb
from pyopentsdb import errors
from pyopentsdb.query import tsdb_query_metrics_validation
from tests.testutils import get_mock_requests_post, mock_tsdb_connection_error_post, mock_unexpected_error_post
from tests.testutils import Gen... | 5,856 | 2,337 | 23 |
01bb4112bebf1ed660bcd3a162b4074321a79d34 | 234 | py | Python | ckan/controllers/search_adv.py | longnguyencse/ckan-add-search | c5acf59b2a76d40eb69ed6aa5b802809b9ab4f4a | [
"Apache-2.0"
] | null | null | null | ckan/controllers/search_adv.py | longnguyencse/ckan-add-search | c5acf59b2a76d40eb69ed6aa5b802809b9ab4f4a | [
"Apache-2.0"
] | null | null | null | ckan/controllers/search_adv.py | longnguyencse/ckan-add-search | c5acf59b2a76d40eb69ed6aa5b802809b9ab4f4a | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import ckan.lib.base as base
CACHE_PARAMETERS = ['__cache', '__no_cache__']
| 19.5 | 65 | 0.726496 | # encoding: utf-8
import ckan.lib.base as base
CACHE_PARAMETERS = ['__cache', '__no_cache__']
class SearchAdvController(base.BaseController):
def index(self):
return base.render('search/index.html', cache_force=True)
| 61 | 26 | 50 |
f065371af046f66cf0c95841b8a0156850176d2c | 183 | py | Python | config.py | the-vampiire/AutoMediaTweeta | 8733443c02f1712c103b559b0b3e94cfdc58eca4 | [
"MIT"
] | null | null | null | config.py | the-vampiire/AutoMediaTweeta | 8733443c02f1712c103b559b0b3e94cfdc58eca4 | [
"MIT"
] | null | null | null | config.py | the-vampiire/AutoMediaTweeta | 8733443c02f1712c103b559b0b3e94cfdc58eca4 | [
"MIT"
] | null | null | null | CONSUMER_KEY = 'paste consumer key here'
CONSUMER_SECRET = 'paste consumer secret here'
ACCESS_TOKEN = 'paste access token here'
ACCESS_TOKEN_SECRET = 'paste access token secret here' | 45.75 | 54 | 0.803279 | CONSUMER_KEY = 'paste consumer key here'
CONSUMER_SECRET = 'paste consumer secret here'
ACCESS_TOKEN = 'paste access token here'
ACCESS_TOKEN_SECRET = 'paste access token secret here' | 0 | 0 | 0 |
3611ae1b8cdb65b9c982d0e2de62e00b8714b536 | 960 | py | Python | test/unit/dataplaneapi/conftest.py | Takuya-Miyazaki/aws-media-insights-engine | c06880bfe3d4375f602214a3c548b75f95030675 | [
"Apache-2.0"
] | null | null | null | test/unit/dataplaneapi/conftest.py | Takuya-Miyazaki/aws-media-insights-engine | c06880bfe3d4375f602214a3c548b75f95030675 | [
"Apache-2.0"
] | null | null | null | test/unit/dataplaneapi/conftest.py | Takuya-Miyazaki/aws-media-insights-engine | c06880bfe3d4375f602214a3c548b75f95030675 | [
"Apache-2.0"
] | null | null | null | import pytest
from chalice.test import Client
from botocore.stub import Stubber
@pytest.fixture(autouse=True)
@pytest.fixture
@pytest.fixture
@pytest.fixture
| 26.666667 | 72 | 0.759375 | import pytest
from chalice.test import Client
from botocore.stub import Stubber
@pytest.fixture(autouse=True)
def mock_env_variables(monkeypatch):
monkeypatch.syspath_prepend('../../source/dataplaneapi/')
monkeypatch.setenv("DATAPLANE_TABLE_NAME", "testDataplaneTableName")
monkeypatch.setenv("DATAPLANE_BU... | 705 | 0 | 88 |
a75386a24e0ed59fbf20628b05450d8cf9e37ce3 | 3,769 | py | Python | commands/help.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | 1 | 2017-01-11T10:23:03.000Z | 2017-01-11T10:23:03.000Z | commands/help.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | null | null | null | commands/help.py | pariahsoft/Dennis | b3e0f0804ee5fa3afe2ff5c3218179d25bb3e12c | [
"MIT"
] | null | null | null | ########################################
## Adventure Bot "Dennis" ##
## commands/help.py ##
## Copyright 2012-2013 PariahSoft LLC ##
########################################
## **********
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software... | 45.963415 | 116 | 0.635447 | ########################################
## Adventure Bot "Dennis" ##
## commands/help.py ##
## Copyright 2012-2013 PariahSoft LLC ##
########################################
## **********
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software... | 467 | 0 | 23 |
8a2464fa8ae3960889bf87aae3a92707ce6eb896 | 678 | py | Python | software/firmware/setup.py | mjaskula/EuroPi | 35b5ef6560080672adf52d38b3d021ed32537c04 | [
"CC0-1.0"
] | 7 | 2022-02-10T07:47:00.000Z | 2022-03-30T19:21:20.000Z | software/firmware/setup.py | stripboard-layouts/EuroPi | 35b5ef6560080672adf52d38b3d021ed32537c04 | [
"CC0-1.0"
] | null | null | null | software/firmware/setup.py | stripboard-layouts/EuroPi | 35b5ef6560080672adf52d38b3d021ed32537c04 | [
"CC0-1.0"
] | null | null | null | import sys
from setuptools import setup
setup(
name="micropython-europi",
version="0.4.0",
description="EuroPi module for MicroPython",
long_description="""The EuroPi is a fully user reprogrammable EuroRack module based on the Raspberry Pi Pico, which allows users to process inputs and controls to pro... | 30.818182 | 219 | 0.672566 | import sys
from setuptools import setup
setup(
name="micropython-europi",
version="0.4.0",
description="EuroPi module for MicroPython",
long_description="""The EuroPi is a fully user reprogrammable EuroRack module based on the Raspberry Pi Pico, which allows users to process inputs and controls to pro... | 0 | 0 | 0 |
2b664be26e560c298881afae98f4dc6a3e61f3e4 | 101 | py | Python | lazylabel/basics.py | lgvaz/pigboat | db743f4170c9af31643d5e3d7b2e6db2520396b2 | [
"Apache-2.0"
] | 1 | 2021-06-23T16:41:04.000Z | 2021-06-23T16:41:04.000Z | lazylabel/basics.py | lgvaz/pigboat | db743f4170c9af31643d5e3d7b2e6db2520396b2 | [
"Apache-2.0"
] | 15 | 2020-04-09T18:28:13.000Z | 2020-04-18T15:01:10.000Z | lazylabel/basics.py | lgvaz/lazylabel | db743f4170c9af31643d5e3d7b2e6db2520396b2 | [
"Apache-2.0"
] | null | null | null | from .core import *
from .rxtransform import *
from .models.all import *
from .labeller.all import *
| 20.2 | 27 | 0.742574 | from .core import *
from .rxtransform import *
from .models.all import *
from .labeller.all import *
| 0 | 0 | 0 |
2ad472cd7127e7dd5e100e6237dc3a35ae8bdb52 | 1,052 | py | Python | client/__main__.py | SnkSynthesis/networking-multiplayer | f2c71fc39fe975e8f459172631f0797de1c98eb2 | [
"MIT"
] | null | null | null | client/__main__.py | SnkSynthesis/networking-multiplayer | f2c71fc39fe975e8f459172631f0797de1c98eb2 | [
"MIT"
] | null | null | null | client/__main__.py | SnkSynthesis/networking-multiplayer | f2c71fc39fe975e8f459172631f0797de1c98eb2 | [
"MIT"
] | null | null | null | import pygame
from .settings import *
from .player import Player
from .udpserver_connection import UDPServerConnection
from server.settings import ADDR, PORT
pygame.init()
username = input("Enter username to join (4 characters max): ")
if username == "":
print("Empty username!")
exit()
elif len(username) > 4... | 21.916667 | 66 | 0.655894 | import pygame
from .settings import *
from .player import Player
from .udpserver_connection import UDPServerConnection
from server.settings import ADDR, PORT
pygame.init()
username = input("Enter username to join (4 characters max): ")
if username == "":
print("Empty username!")
exit()
elif len(username) > 4... | 0 | 0 | 0 |
6ae4ff13ae3b6b72696a677f5b19d6ddbce1e66a | 5,186 | py | Python | requests/AddDefaultPermissionsRequest.py | divinorum-webb/python-tableau-api | 9d3f130d63b15307ad2b23e2273b52790b8d9018 | [
"Apache-2.0"
] | 1 | 2019-06-08T22:19:40.000Z | 2019-06-08T22:19:40.000Z | requests/AddDefaultPermissionsRequest.py | divinorum-webb/python-tableau-api | 9d3f130d63b15307ad2b23e2273b52790b8d9018 | [
"Apache-2.0"
] | null | null | null | requests/AddDefaultPermissionsRequest.py | divinorum-webb/python-tableau-api | 9d3f130d63b15307ad2b23e2273b52790b8d9018 | [
"Apache-2.0"
] | null | null | null | from .BaseRequest import BaseRequest
class AddDefaultPermissionsRequest(BaseRequest):
"""
Add default permissions request for generating API requests to Tableau Server.
Note: update this class in the future to define the valid capability names based on the permissions object passed.
:param ts_connect... | 38.701493 | 118 | 0.609911 | from .BaseRequest import BaseRequest
class AddDefaultPermissionsRequest(BaseRequest):
"""
Add default permissions request for generating API requests to Tableau Server.
Note: update this class in the future to define the valid capability names based on the permissions object passed.
:param ts_connect... | 3,978 | 0 | 264 |
59fed0f65e70ea577f629ec06a3e8a0c3e66558f | 1,270 | py | Python | ais_usa/icoads/extract_buoy_information.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | 1 | 2019-05-21T15:52:28.000Z | 2019-05-21T15:52:28.000Z | ais_usa/icoads/extract_buoy_information.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | null | null | null | ais_usa/icoads/extract_buoy_information.py | falcaopetri/trajectory-data | 7f81343086ccd00d3d9f52899a7032d987fc0a66 | [
"MIT"
] | 1 | 2020-08-18T14:38:52.000Z | 2020-08-18T14:38:52.000Z | import os
import glob
import pandas as pd
file_pattern = ':dir/*:year.csv'
proc_dir = 'processed'
buoys_file = os.path.join(proc_dir, 'icoads_buoys_ships.csv')
years = ['2015']
data = None
if not os.path.isdir(proc_dir):
os.mkdir(proc_dir)
for year in years:
print('Processing year', year)
pattern = fil... | 27.021277 | 64 | 0.588189 | import os
import glob
import pandas as pd
file_pattern = ':dir/*:year.csv'
proc_dir = 'processed'
buoys_file = os.path.join(proc_dir, 'icoads_buoys_ships.csv')
years = ['2015']
data = None
if not os.path.isdir(proc_dir):
os.mkdir(proc_dir)
for year in years:
print('Processing year', year)
pattern = fil... | 0 | 0 | 0 |
25d5901b149c28dcc325fe1f670e434cd94c69d5 | 86,036 | py | Python | xarm/x3/xarm.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | xarm/x3/xarm.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | xarm/x3/xarm.py | tutorintelligence/xArm-Python-SDK | 25e1328d94629277cceb76d0830e41f2402afa2c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
import os
import math
import time
import warnings
from collections.abc import Iterable
from ..core.config.x_config import XC... | 50.69888 | 175 | 0.602294 | #!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2020, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
import os
import math
import time
import warnings
from collections.abc import Iterable
from ..core.config.x_config import XC... | 76,628 | 8,639 | 23 |
0cb35bee7f1707cfa8e5ff92e9e8623b81268f17 | 2,681 | py | Python | py/DREAM/Output/ScalarQuantity.py | chalmersplasmatheory/DREAM | 715637ada94f5e35db16f23c2fd49bb7401f4a27 | [
"MIT"
] | 12 | 2020-09-07T11:19:10.000Z | 2022-02-17T17:40:19.000Z | py/DREAM/Output/ScalarQuantity.py | chalmersplasmatheory/DREAM | 715637ada94f5e35db16f23c2fd49bb7401f4a27 | [
"MIT"
] | 110 | 2020-09-02T15:29:24.000Z | 2022-03-09T09:50:01.000Z | py/DREAM/Output/ScalarQuantity.py | chalmersplasmatheory/DREAM | 715637ada94f5e35db16f23c2fd49bb7401f4a27 | [
"MIT"
] | 3 | 2021-05-21T13:24:31.000Z | 2022-02-11T14:43:12.000Z | # Base class for scalar quantities (single value evolving in time)
#
import matplotlib.pyplot as plt
import numpy as np
from . OutputException import OutputException
from . UnknownQuantity import UnknownQuantity
| 27.080808 | 123 | 0.556136 | # Base class for scalar quantities (single value evolving in time)
#
import matplotlib.pyplot as plt
import numpy as np
from . OutputException import OutputException
from . UnknownQuantity import UnknownQuantity
class ScalarQuantity(UnknownQuantity):
def __init__(self, name, data, grid, output, attr=list(... | 0 | 2,441 | 23 |
10dd171801927325b706dc8440d59f81c0862711 | 503 | py | Python | workflow/__main__.py | vanaoff/workflow | 57be3cdfc9034c233fe0f1c242939a51f9ee353f | [
"MIT"
] | 5 | 2017-11-22T11:40:20.000Z | 2019-11-01T08:51:24.000Z | workflow/__main__.py | vanaoff/workflow | 57be3cdfc9034c233fe0f1c242939a51f9ee353f | [
"MIT"
] | null | null | null | workflow/__main__.py | vanaoff/workflow | 57be3cdfc9034c233fe0f1c242939a51f9ee353f | [
"MIT"
] | 1 | 2018-07-14T19:32:02.000Z | 2018-07-14T19:32:02.000Z | from logging.config import dictConfig
import yaml
from pkg_resources import resource_stream
from workflow import logger, __version__
from workflow.builder import process_project
from workflow.config import Config
dictConfig(yaml.load(resource_stream(__name__, 'log.yml')))
if __name__ == '__main__':
c = Config()... | 31.4375 | 98 | 0.7833 | from logging.config import dictConfig
import yaml
from pkg_resources import resource_stream
from workflow import logger, __version__
from workflow.builder import process_project
from workflow.config import Config
dictConfig(yaml.load(resource_stream(__name__, 'log.yml')))
if __name__ == '__main__':
c = Config()... | 0 | 0 | 0 |
94e5ce3415ae1995d0c18b6cee46d4bdc60e4899 | 2,217 | py | Python | final_perceptron.py | venkys2002/Natural-Language-Processing-Projects | 83ad645b5ead73f3212ff9af90f2b57238551eee | [
"MIT"
] | 3 | 2017-04-14T17:45:09.000Z | 2019-11-08T23:51:33.000Z | final_perceptron.py | venkys2002/Natural-Language-Processing-Projects | 83ad645b5ead73f3212ff9af90f2b57238551eee | [
"MIT"
] | null | null | null | final_perceptron.py | venkys2002/Natural-Language-Processing-Projects | 83ad645b5ead73f3212ff9af90f2b57238551eee | [
"MIT"
] | 1 | 2017-04-05T13:10:13.000Z | 2017-04-05T13:10:13.000Z | import os,sys,random,json,timeit
from collections import defaultdict
filename_dict = dict()
filelist = []
feature_weights = defaultdict(int)
avg_weights = defaultdict(int)
json_dict = defaultdict(int)
if __name__ == '__main__':
start = timeit.default_timer()
with open('train.json',mode='r',... | 33.590909 | 110 | 0.571042 | import os,sys,random,json,timeit
from collections import defaultdict
filename_dict = dict()
filelist = []
feature_weights = defaultdict(int)
avg_weights = defaultdict(int)
json_dict = defaultdict(int)
def learn_model():
global filelist,feature_weights,filename_dict,avg_weights,json_dict
bias = 0
... | 1,083 | 0 | 25 |
a608e6a827c2a606c3d7aa7c5cc4b35cf7d6f0aa | 645 | py | Python | experiments/coil20.py | Guanzhou-Ke/conan | 5eb0a051e3a2893a12fe690ac443471abbcd1ee3 | [
"MIT"
] | 5 | 2021-11-16T04:03:46.000Z | 2022-03-21T04:55:43.000Z | experiments/coil20.py | Guanzhou-Ke/conan | 5eb0a051e3a2893a12fe690ac443471abbcd1ee3 | [
"MIT"
] | 1 | 2022-03-27T01:58:50.000Z | 2022-03-27T01:58:50.000Z | experiments/coil20.py | Guanzhou-Ke/conan | 5eb0a051e3a2893a12fe690ac443471abbcd1ee3 | [
"MIT"
] | 1 | 2021-08-31T14:29:38.000Z | 2021-08-31T14:29:38.000Z | from .default import Experiment
coil20 = Experiment(
arch='alexnet',
hidden_dim=1024,
verbose=True,
log_dir='./logs/mytest',
device='cuda',
extra_record=True,
opt='adam',
epochs=50,
lr=1e-3,
batch_size=24,
cluster_hidden_dim=512,
ds_name='coil-20',
img_size=128,
... | 20.806452 | 49 | 0.64186 | from .default import Experiment
coil20 = Experiment(
arch='alexnet',
hidden_dim=1024,
verbose=True,
log_dir='./logs/mytest',
device='cuda',
extra_record=True,
opt='adam',
epochs=50,
lr=1e-3,
batch_size=24,
cluster_hidden_dim=512,
ds_name='coil-20',
img_size=128,
... | 0 | 0 | 0 |
1c428bebeb6bf553a525fd33bd5c9ffd2aac7acd | 944 | py | Python | michelanglo_app/security.py | matteoferla/PyMOL-to-NGL-transpiler | 3e1ce6cecde4b913188afa4472148bc5ab7f34a8 | [
"MIT"
] | 11 | 2020-03-23T03:41:36.000Z | 2022-03-11T18:53:26.000Z | michelanglo_app/security.py | thesgc/MichelaNGLo | ad8a2e5207638e82bb4163662af351b4864f39c1 | [
"MIT"
] | 1 | 2020-05-13T20:07:51.000Z | 2020-06-25T04:44:57.000Z | michelanglo_app/security.py | thesgc/MichelaNGLo | ad8a2e5207638e82bb4163662af351b4864f39c1 | [
"MIT"
] | 1 | 2019-11-11T19:12:26.000Z | 2019-11-11T19:12:26.000Z | from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from .models import User
| 31.466667 | 67 | 0.723517 | from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from .models import User
class MyAuthenticationPolicy(AuthTktAuthenticationPolicy):
def authenticated_userid(self, request):
user = request.user
if user is not None:
... | 665 | 37 | 95 |
4485d1b25eee47e3893f8f4f7de8bce4b09548d2 | 610 | py | Python | wechat_group_members.py | SanMuHe/wechat-group-members | 9ec9e1de0806286b5949b3eaa9ad2cca1a94931b | [
"MIT"
] | 2 | 2018-12-10T11:17:49.000Z | 2020-02-21T08:43:29.000Z | wechat_group_members.py | SanMuHe/wechat-group-members | 9ec9e1de0806286b5949b3eaa9ad2cca1a94931b | [
"MIT"
] | null | null | null | wechat_group_members.py | SanMuHe/wechat-group-members | 9ec9e1de0806286b5949b3eaa9ad2cca1a94931b | [
"MIT"
] | null | null | null | import argparse
import json
from wechat import WeChat
if __name__ == '__main__':
main()
| 21.785714 | 81 | 0.647541 | import argparse
import json
from wechat import WeChat
def main():
parser = argparse.ArgumentParser()
parser.add_argument('group_name', help='name of the WeChat roup')
args = parser.parse_args()
if args.group_name == '':
print('group_name cannot be empty.')
return
wechat = WeChat... | 493 | 0 | 23 |
0fb053d4b1d008ee15ad9fdafb9f9f564a33167e | 851 | py | Python | core/settings/develop.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | core/settings/develop.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | core/settings/develop.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | # Overrides
from .base import * # noqa: F401
SECRET_KEY = 'za#q^j+$6frru&3*)b0yl=#9wmue%rf38akqux(fjvl-&zy@_l'
DEBUG = True
ALLOWED_HOSTS = ['*']
RUNSERVERPLUS_SERVER_ADDRESS_PORT = '0.0.0.0:8000'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ.get('DATABASE... | 23 | 65 | 0.638073 | # Overrides
from .base import * # noqa: F401
SECRET_KEY = 'za#q^j+$6frru&3*)b0yl=#9wmue%rf38akqux(fjvl-&zy@_l'
DEBUG = True
ALLOWED_HOSTS = ['*']
RUNSERVERPLUS_SERVER_ADDRESS_PORT = '0.0.0.0:8000'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ.get('DATABASE... | 0 | 0 | 0 |
d463f2386641ef044e6ff0bbb4979032dff95297 | 2,356 | py | Python | FlatBuf_ZMQ/pub.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | 4 | 2022-01-16T17:36:49.000Z | 2022-02-07T16:57:33.000Z | FlatBuf_ZMQ/pub.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | null | null | null | FlatBuf_ZMQ/pub.py | asgokhale/DistributedSystemsCourse | 9ae24ed65e7a7ef849c7e39ec5a1a8cc5973c12f | [
"Apache-2.0"
] | 1 | 2022-01-25T23:51:51.000Z | 2022-01-25T23:51:51.000Z | # Author: Aniruddha Gokhale
# Created: Fall 2019
# Modified: Spring 2021
#
# Purpose: demonstrate publishing of topic data type using flatbuffers
#
# Here our topic comprises a sequence number, a timestamp, and a data buffer
# of several uint32 numbers (whose value is not relevant to us)
# The different packages... | 34.144928 | 86 | 0.671902 | # Author: Aniruddha Gokhale
# Created: Fall 2019
# Modified: Spring 2021
#
# Purpose: demonstrate publishing of topic data type using flatbuffers
#
# Here our topic comprises a sequence number, a timestamp, and a data buffer
# of several uint32 numbers (whose value is not relevant to us)
# The different packages... | 1,777 | 0 | 22 |
f40bc7d3160eadfc52b286cba5b3998715fadee9 | 3,196 | py | Python | scripts/get_data.py | krsnad/qlib | 0c316cd3670e5df9e3afdd0907fb9f6aa2a64d3e | [
"MIT"
] | null | null | null | scripts/get_data.py | krsnad/qlib | 0c316cd3670e5df9e3afdd0907fb9f6aa2a64d3e | [
"MIT"
] | null | null | null | scripts/get_data.py | krsnad/qlib | 0c316cd3670e5df9e3afdd0907fb9f6aa2a64d3e | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import fire
import zipfile
import requests
from tqdm import tqdm
from pathlib import Path
from loguru import logger
if __name__ == "__main__":
fire.Fire(GetData)
| 32.282828 | 218 | 0.612015 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import fire
import zipfile
import requests
from tqdm import tqdm
from pathlib import Path
from loguru import logger
class GetData:
REMOTE_URL = "http://fintech.msra.cn/stock_data/downloads"
def __init__(self, delete_zip_file=False):
... | 1,358 | 1,570 | 23 |
1ebe31d14c4ca999190f82ba507ca5d33abf3499 | 987 | py | Python | cryptokit/ecc.py | istommao/cryptok | 9630e3744d9ca8c25c58122a5027ece7d93ff40a | [
"MIT"
] | 25 | 2016-10-22T03:23:56.000Z | 2021-05-24T12:36:05.000Z | cryptokit/ecc.py | istommao/cryptok | 9630e3744d9ca8c25c58122a5027ece7d93ff40a | [
"MIT"
] | null | null | null | cryptokit/ecc.py | istommao/cryptok | 9630e3744d9ca8c25c58122a5027ece7d93ff40a | [
"MIT"
] | 6 | 2017-03-23T05:25:06.000Z | 2019-10-24T12:03:32.000Z | # coding: utf-8
"""Elliptic Curve Signature Algorithms."""
from __future__ import unicode_literals
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import ec
| 25.973684 | 58 | 0.656535 | # coding: utf-8
"""Elliptic Curve Signature Algorithms."""
from __future__ import unicode_literals
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import ec
class ECCrypto(object):
ALGORITHM_DICT = {
... | 415 | 283 | 23 |
1c12099e458a2126334f24ca79c20c39e10e6612 | 19,086 | py | Python | megatron/mpu/tests/test_layers.py | laekov/Megatron-LM | 37cec9af5ce93cd0da05a52513928bf55b70f3ac | [
"MIT"
] | null | null | null | megatron/mpu/tests/test_layers.py | laekov/Megatron-LM | 37cec9af5ce93cd0da05a52513928bf55b70f3ac | [
"MIT"
] | null | null | null | megatron/mpu/tests/test_layers.py | laekov/Megatron-LM | 37cec9af5ce93cd0da05a52513928bf55b70f3ac | [
"MIT"
] | 1 | 2021-01-16T10:10:17.000Z | 2021-01-16T10:10:17.000Z | # coding=utf-8
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 35.943503 | 80 | 0.679975 | # coding=utf-8
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 16,307 | 36 | 336 |
b7b13aa6a0c2a5312fa06503eabd9b5acced1ed3 | 171 | py | Python | pyndv/__init__.py | vit0r/nvdcve | 8cab188f96e7b39a8c0460b39f20d9bb2e2a52af | [
"MIT"
] | 2 | 2020-01-22T13:59:46.000Z | 2020-02-28T05:37:57.000Z | pyndv/__init__.py | vit0r/nvdcve | 8cab188f96e7b39a8c0460b39f20d9bb2e2a52af | [
"MIT"
] | 1 | 2021-03-10T14:28:01.000Z | 2021-04-03T05:09:23.000Z | pyndv/__init__.py | vit0r/nvdcve | 8cab188f96e7b39a8c0460b39f20d9bb2e2a52af | [
"MIT"
] | 1 | 2019-09-29T16:58:11.000Z | 2019-09-29T16:58:11.000Z | """
Lib load modules for pyndv
"""
import logging
from pyndv import core
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO)
__all__ = core
| 12.214286 | 76 | 0.719298 | """
Lib load modules for pyndv
"""
import logging
from pyndv import core
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO)
__all__ = core
| 0 | 0 | 0 |
422cfd6d5eadc1ee7c2372d8768354fe964027f1 | 4,951 | py | Python | src/Figure3/gene_expr.py | jonathanperrie/iscDNase-seq | 11852c08ac5b6d66ae918910ed3ac212d37ddad6 | [
"MIT"
] | null | null | null | src/Figure3/gene_expr.py | jonathanperrie/iscDNase-seq | 11852c08ac5b6d66ae918910ed3ac212d37ddad6 | [
"MIT"
] | null | null | null | src/Figure3/gene_expr.py | jonathanperrie/iscDNase-seq | 11852c08ac5b6d66ae918910ed3ac212d37ddad6 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('agg')
from glob import glob
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib.patches as mpatches
from statsmodels.distributions.empirical_distribution import ECDF
from scipy.stats import ranksums
from scipy.stats import ttest_ind
from scipy.stat... | 33.006667 | 150 | 0.689558 | import matplotlib
matplotlib.use('agg')
from glob import glob
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib.patches as mpatches
from statsmodels.distributions.empirical_distribution import ECDF
from scipy.stats import ranksums
from scipy.stats import ttest_ind
from scipy.stat... | 762 | 0 | 22 |
a3afc460a7da40167895cacc96fe3bfa39a1dda2 | 369 | py | Python | setup.py | marweck/pso-mlp | 6476d0b1e0ae869fd1884213ab03d29e68962858 | [
"MIT"
] | 2 | 2021-07-16T19:05:44.000Z | 2022-02-08T23:25:42.000Z | setup.py | marweck/pso-mlp | 6476d0b1e0ae869fd1884213ab03d29e68962858 | [
"MIT"
] | null | null | null | setup.py | marweck/pso-mlp | 6476d0b1e0ae869fd1884213ab03d29e68962858 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='pso-nn',
version='',
packages=['pso'],
package_dir={'': 'src'},
url='',
license='',
author='Marcio Carvalho',
author_email='marweck@gmail.com',
description='',
check_format=True,
# Enable type checking
test_mypy=False,
# Enab... | 19.421053 | 37 | 0.612466 | from setuptools import setup
setup(
name='pso-nn',
version='',
packages=['pso'],
package_dir={'': 'src'},
url='',
license='',
author='Marcio Carvalho',
author_email='marweck@gmail.com',
description='',
check_format=True,
# Enable type checking
test_mypy=False,
# Enab... | 0 | 0 | 0 |
77386eca51cc212c713f76d00a042d1254fa7d5f | 1,666 | py | Python | Solutions/Problem_060.py | PraneethJain/Project-Euler | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 2 | 2022-03-11T21:31:52.000Z | 2022-03-11T21:37:14.000Z | Solutions/Problem_060.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | null | null | null | Solutions/Problem_060.py | PraneethJain/Project-Euler-100 | 54fe34da444803ea55c49e4a4cda3ad6d4bca3b8 | [
"MIT"
] | 1 | 2022-03-07T12:55:36.000Z | 2022-03-07T12:55:36.000Z | from prime import primelist, primecheck
from itertools import product
from time import time
# ATTEMPT 2 (FASTER)
t1 = time()
prime_list = set(primelist(10**4))
for p1, p2 in product(prime_list, repeat=2):
if p2 > p1:
if thingy(p1, p2):
for p3 in prime_list:
if p3 > p2:
... | 38.744186 | 88 | 0.42617 | from prime import primelist, primecheck
from itertools import product
from time import time
def thingy(p1: int, p2: int) -> bool:
return primecheck(int((str(p1) + str(p2)))) and primecheck(int(str(p2) + str(p1)))
# ATTEMPT 2 (FASTER)
t1 = time()
prime_list = set(primelist(10**4))
for p1, p2 in product(prime_lis... | 103 | 0 | 23 |
21508edf8bbe8cd9556037349b3a6e2b31f885ea | 4,915 | py | Python | binData.py | stephen-w-bailey/fast-n-deep-faces | 53173c6367dfa3a20d3193ad7a0e77ac1e898f02 | [
"BSD-3-Clause"
] | 40 | 2020-06-26T10:56:39.000Z | 2022-01-26T10:43:34.000Z | binData.py | stephen-w-bailey/fast-n-deep-faces | 53173c6367dfa3a20d3193ad7a0e77ac1e898f02 | [
"BSD-3-Clause"
] | 7 | 2020-07-01T07:10:11.000Z | 2022-03-07T00:07:41.000Z | binData.py | stephen-w-bailey/fast-n-deep-faces | 53173c6367dfa3a20d3193ad7a0e77ac1e898f02 | [
"BSD-3-Clause"
] | 13 | 2020-06-30T11:57:41.000Z | 2022-02-20T17:24:00.000Z | import argparse
import matplotlib.pyplot as plt
import numpy as np
import os
import pickle
from sklearn.decomposition import PCA
import sys
import tqdm
import yaml
import PoseGenerator
if __name__=='__main__':
main()
| 33.435374 | 132 | 0.60061 | import argparse
import matplotlib.pyplot as plt
import numpy as np
import os
import pickle
from sklearn.decomposition import PCA
import sys
import tqdm
import yaml
import PoseGenerator
def samplePoints(v,f,n):
# Compute the area of each triangle in the base mesh
vf = v[f.reshape(-1)].reshape((-1,3,3))
a,... | 4,624 | 0 | 69 |
f64f65ecb39629fd4ad639101475666b051f047a | 6,435 | py | Python | jimmy/jimmy.py | lorenzocerrone/just-yaml-pp | d5dd78301e86b1cd6e451721ef87ad96fa8511ce | [
"MIT"
] | null | null | null | jimmy/jimmy.py | lorenzocerrone/just-yaml-pp | d5dd78301e86b1cd6e451721ef87ad96fa8511ce | [
"MIT"
] | null | null | null | jimmy/jimmy.py | lorenzocerrone/just-yaml-pp | d5dd78301e86b1cd6e451721ef87ad96fa8511ce | [
"MIT"
] | null | null | null | import pathlib
import time
import yaml
import itertools
import copy
from jimmy.constructors.math_constructors import build_range, build_lin_space, build_log_space, sum_nodes
from jimmy.constructors.path_constructors import home_path, unique_path, make_absolute, join_paths, make_path, find_glob
from jimmy.constructors.... | 32.014925 | 120 | 0.620047 | import pathlib
import time
import yaml
import itertools
import copy
from jimmy.constructors.math_constructors import build_range, build_lin_space, build_log_space, sum_nodes
from jimmy.constructors.path_constructors import home_path, unique_path, make_absolute, join_paths, make_path, find_glob
from jimmy.constructors.... | 4,801 | 301 | 230 |
1f5d520504c06509169db086d8bb5a6e191f46b0 | 881 | py | Python | 1-50/11_container-with-most-water.py | ChenhaoJiang/LeetCode-Solution | b2119ad938c18f75948d0f5cf4ae3773820dcc93 | [
"MIT"
] | 16 | 2019-03-30T07:25:27.000Z | 2020-07-28T15:34:53.000Z | 1-50/11_container-with-most-water.py | ChenhaoJiang/LeetCode-Solution | b2119ad938c18f75948d0f5cf4ae3773820dcc93 | [
"MIT"
] | null | null | null | 1-50/11_container-with-most-water.py | ChenhaoJiang/LeetCode-Solution | b2119ad938c18f75948d0f5cf4ae3773820dcc93 | [
"MIT"
] | 2 | 2020-06-26T13:02:14.000Z | 2020-07-28T04:59:15.000Z | """
给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的
两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
说明:你不能倾斜容器,且 n 的值至少为 2。
Ex:
input: [1,8,6,2,5,4,8,3,7]
output: 49
"""
"""
My thinking:采取动态规划的方法,我们在由线段长度构成的数组中使用两个指针,一个放在开始,一个置于末尾。最初我们考虑由最外围两条线段构成的区域。现在如果我
们试图将指向较长线段的指针向内侧移动,矩形区域的面积将受限于较... | 27.53125 | 96 | 0.62202 | """
给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的
两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
说明:你不能倾斜容器,且 n 的值至少为 2。
Ex:
input: [1,8,6,2,5,4,8,3,7]
output: 49
"""
class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
... | 0 | 470 | 22 |
43facb3033022b1e16f15cfc16e3549d2174f944 | 945 | py | Python | script/spec_pack.py | oslab-swrc/Krace | 739bd2327cd5af0a6521baa0ff996784b05348ed | [
"MIT"
] | null | null | null | script/spec_pack.py | oslab-swrc/Krace | 739bd2327cd5af0a6521baa0ff996784b05348ed | [
"MIT"
] | null | null | null | script/spec_pack.py | oslab-swrc/Krace | 739bd2327cd5af0a6521baa0ff996784b05348ed | [
"MIT"
] | null | null | null | import struct
from spec_const import SPEC_PTR_SIZE
# int
# ptr
# str
| 24.230769 | 73 | 0.57672 | import struct
from spec_const import SPEC_PTR_SIZE
# int
def _get_int_pack_format(bits: int, signed: bool) -> str:
if (bits, signed) == (8, False):
return 'B'
if (bits, signed) == (8, True):
return 'b'
if (bits, signed) == (16, False):
return 'H'
if (bits, signed) == (16, True... | 779 | 0 | 89 |
8cc8daca968dda219ab25de0f9f5247568b12be4 | 13,341 | py | Python | src/modules/message_reactions.py | pongo/rapturebot | d38bd793636fa30e609b148b71b2d7c8047570e3 | [
"MIT"
] | 9 | 2018-08-19T12:55:58.000Z | 2021-07-17T15:38:40.000Z | src/modules/message_reactions.py | pongo/rapturebot | d38bd793636fa30e609b148b71b2d7c8047570e3 | [
"MIT"
] | 124 | 2018-07-31T13:43:58.000Z | 2022-03-11T23:27:43.000Z | src/modules/message_reactions.py | pongo/rapturebot | d38bd793636fa30e609b148b71b2d7c8047570e3 | [
"MIT"
] | 3 | 2019-10-21T13:18:14.000Z | 2021-02-09T11:05:10.000Z | import random
import re
import requests
import telegram
from telegram.ext import run_async
import src.config as config
from src.commands.khaleesi.khaleesi import Khaleesi
from src.commands.khaleesi.random_khaleesi import RandomKhaleesi
from src.commands.orzik import orzik_correction
from src.commands.welcome import s... | 37.369748 | 103 | 0.70482 | import random
import re
import requests
import telegram
from telegram.ext import run_async
import src.config as config
from src.commands.khaleesi.khaleesi import Khaleesi
from src.commands.khaleesi.random_khaleesi import RandomKhaleesi
from src.commands.orzik import orzik_correction
from src.commands.welcome import s... | 6,003 | 0 | 270 |
c797f8819e873ae85833786f640e7e9ae3d6f940 | 699 | py | Python | models/bert.py | acmi-lab/PU_learning | a9174bda92c7411906056c789011cfa41749ee5f | [
"Apache-2.0"
] | 18 | 2021-11-04T02:26:47.000Z | 2022-03-15T04:41:18.000Z | models/bert.py | acmi-lab/RATT_generalization_bound | f6f8ef83dbb5ea5e0a38f25f3e2866d8bb728151 | [
"Apache-2.0"
] | null | null | null | models/bert.py | acmi-lab/RATT_generalization_bound | f6f8ef83dbb5ea5e0a38f25f3e2866d8bb728151 | [
"Apache-2.0"
] | 1 | 2022-01-14T03:22:37.000Z | 2022-01-14T03:22:37.000Z | from transformers import DistilBertForSequenceClassification, DistilBertModel
| 27.96 | 77 | 0.688126 | from transformers import DistilBertForSequenceClassification, DistilBertModel
class DistilBertClassifier(DistilBertForSequenceClassification):
def __init__(self, config):
super().__init__(config)
def __call__(self, x):
input_ids = x[:, :, 0]
attention_mask = x[:, :, 1]
outputs ... | 479 | 43 | 99 |
13ef1c0eac9639997a0083c6eb03ad56c2f41276 | 7,861 | py | Python | Patterns/Expressions.py | mostobriv/IDAXrefXplorer | c570423ee8209a0284e7ea620a4f3b8ca7cdff9e | [
"MIT"
] | null | null | null | Patterns/Expressions.py | mostobriv/IDAXrefXplorer | c570423ee8209a0284e7ea620a4f3b8ca7cdff9e | [
"MIT"
] | null | null | null | Patterns/Expressions.py | mostobriv/IDAXrefXplorer | c570423ee8209a0284e7ea620a4f3b8ca7cdff9e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import Patterns as p
import Nodes
module = sys.modules[__name__]
for i in Nodes.TWO_OP:
setattr(module, i[0] + "Expr", BinaryGen(i[0] + "Expr", i[1]))
for i in Nodes.ONE_OP:
setattr(module, i[0] + "Expr", UnaryGen(i[0] + "Expr", i[1]))
| 27.295139 | 83 | 0.554001 | # -*- coding: utf-8 -*-
import sys
import Patterns as p
import Nodes
class BindExpr(p.Pattern):
def __init__(self, type, expr_pattern):
super(BindExpr, self).__init__()
self.type = type
self.pattern = expr_pattern
def check(self, expr, ctx):
if self.pattern.check(expr, ctx):... | 6,057 | 133 | 1,371 |
1f95f9c8b03cab723783bd014cb382230074cbe6 | 615 | py | Python | src/basic/01_syntax/str.py | hbulpf/pydemo | 2989cc50781230718e46dcac5dc0ca70630ebffe | [
"Apache-2.0"
] | 6 | 2020-03-24T15:58:42.000Z | 2020-04-18T13:32:41.000Z | src/basic/01_syntax/str.py | hbulpf/pydemo | 2989cc50781230718e46dcac5dc0ca70630ebffe | [
"Apache-2.0"
] | 1 | 2022-01-13T03:51:17.000Z | 2022-01-13T03:51:17.000Z | src/basic/01_syntax/str.py | hbulpf/pydemo | 2989cc50781230718e46dcac5dc0ca70630ebffe | [
"Apache-2.0"
] | 1 | 2020-02-01T09:36:05.000Z | 2020-02-01T09:36:05.000Z | # b表示bytes
print('ABC'.encode('ascii'))
print('ABC'.encode('utf-8'))
print('中文'.encode('utf-8'))
a = b'\xe4\xb8\xad\xff'.decode('utf-8',errors='ignore')
print(a)
print(len(a),len(b'\xe4\xb8\xad'),len('中'.encode('utf-8')))
print('中文测试正常')
# r表示内部字符默认不转义
print(r'seek\t\n\\')
print('''line1
line2
line3''')
print(r'''line... | 18.636364 | 79 | 0.601626 | # b表示bytes
print('ABC'.encode('ascii'))
print('ABC'.encode('utf-8'))
print('中文'.encode('utf-8'))
a = b'\xe4\xb8\xad\xff'.decode('utf-8',errors='ignore')
print(a)
print(len(a),len(b'\xe4\xb8\xad'),len('中'.encode('utf-8')))
print('中文测试正常')
# r表示内部字符默认不转义
print(r'seek\t\n\\')
print('''line1
line2
line3''')
print(r'''line... | 0 | 0 | 0 |
5a4b5a138f83d90c0431a4e84a9684e8fb99883a | 7,359 | py | Python | newcode/server/honey_server.py | rchatterjee/nocrack | 16523cb3f316a2a4ed147fe23f942b485d27d605 | [
"MIT"
] | 21 | 2015-05-12T17:38:07.000Z | 2021-01-10T19:54:55.000Z | newcode/server/honey_server.py | rchatterjee/nocrack | 16523cb3f316a2a4ed147fe23f942b485d27d605 | [
"MIT"
] | 7 | 2015-08-27T10:57:40.000Z | 2020-04-18T08:36:42.000Z | newcode/server/honey_server.py | rchatterjee/nocrack | 16523cb3f316a2a4ed147fe23f942b485d27d605 | [
"MIT"
] | 14 | 2015-08-27T10:53:37.000Z | 2022-03-24T15:48:47.000Z | import binascii
import datetime
import json
import os
import re
import sys
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Protocol.KDF import PBKDF1
from Crypto.Util import Counter
from flask import Flask, request
from flask_sqlalchemy import SQLAlchemy
BASE_DIR = o... | 28.858824 | 99 | 0.66259 | import binascii
import datetime
import json
import os
import re
import sys
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Protocol.KDF import PBKDF1
from Crypto.Util import Counter
from flask import Flask, request
from flask_sqlalchemy import SQLAlchemy
BASE_DIR = o... | 3,912 | 988 | 498 |
4938cfafc0d92e4b282376a46d6ae14644000f0f | 5,164 | py | Python | explorer/mqtt_demos/1_mqtt_receiver_demo.py | JBerny/astroplant_explorer | 09828599a7e0cc555685e12d31466029a29e6ae0 | [
"BSD-2-Clause"
] | null | null | null | explorer/mqtt_demos/1_mqtt_receiver_demo.py | JBerny/astroplant_explorer | 09828599a7e0cc555685e12d31466029a29e6ae0 | [
"BSD-2-Clause"
] | null | null | null | explorer/mqtt_demos/1_mqtt_receiver_demo.py | JBerny/astroplant_explorer | 09828599a7e0cc555685e12d31466029a29e6ae0 | [
"BSD-2-Clause"
] | null | null | null | """
Demo/test program for the MQTT utilities.
See https://github.com/sensemakersamsterdam/astroplant_explorer
"""
# (c) Sensemakersams.org and others. See https://github.com/sensemakersamsterdam/astroplant_explorer
# Author: Gijs Mos
#
##
# H O W T O U S E
#
# Edit configuration.json and pick a nice 'ae_id' for y... | 41.312 | 100 | 0.726181 | """
Demo/test program for the MQTT utilities.
See https://github.com/sensemakersamsterdam/astroplant_explorer
"""
# (c) Sensemakersams.org and others. See https://github.com/sensemakersamsterdam/astroplant_explorer
# Author: Gijs Mos
#
##
# H O W T O U S E
#
# Edit configuration.json and pick a nice 'ae_id' for y... | 269 | 0 | 69 |
fa5ea581c7ee5dd828861c51a05e5652a4210d05 | 2,225 | py | Python | skypy/codebase/server/server.py | Kras4ooo/skypy | 5afdcadcd238204ce7a2f483c617986a13a9b988 | [
"MIT"
] | null | null | null | skypy/codebase/server/server.py | Kras4ooo/skypy | 5afdcadcd238204ce7a2f483c617986a13a9b988 | [
"MIT"
] | null | null | null | skypy/codebase/server/server.py | Kras4ooo/skypy | 5afdcadcd238204ce7a2f483c617986a13a9b988 | [
"MIT"
] | null | null | null | import socketserver
import errno
import struct
from codebase.common.member import Member
from codebase.server.taskmanager import TaskManager
| 29.276316 | 78 | 0.557303 | import socketserver
import errno
import struct
from codebase.common.member import Member
from codebase.server.taskmanager import TaskManager
class SkyPyServer(socketserver.BaseRequestHandler):
members = []
rooms = {}
def __init__(self, *args, **kwargs):
self.member = None
super().__init__... | 1,809 | 251 | 23 |
42e17899f7c62b231182993e14c599634a6292a4 | 12,325 | py | Python | parse.py | jiuguai/dataparse | 68eac5108e4adf655cccff46b62b1e74a24a6d79 | [
"MIT"
] | null | null | null | parse.py | jiuguai/dataparse | 68eac5108e4adf655cccff46b62b1e74a24a6d79 | [
"MIT"
] | null | null | null | parse.py | jiuguai/dataparse | 68eac5108e4adf655cccff46b62b1e74a24a6d79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from bokeh.plotting import figure as _figure,show,Figure
from bokeh.models import ColumnDataSource
from bokeh.layouts import gridplot
from bokeh.palettes import brewer
from bokeh.transform import jit... | 28.662791 | 114 | 0.573955 | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from bokeh.plotting import figure as _figure,show,Figure
from bokeh.models import ColumnDataSource
from bokeh.layouts import gridplot
from bokeh.palettes import brewer
from bokeh.transform import jit... | 7,605 | 0 | 343 |
b2bc2af418f5fbddb1954b419f9db53ff0b1d589 | 9,833 | py | Python | smpp/twisted/server.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | 3 | 2021-02-08T02:51:50.000Z | 2022-02-20T07:56:59.000Z | smpp/twisted/server.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | null | null | null | smpp/twisted/server.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | 1 | 2021-11-07T21:54:47.000Z | 2021-11-07T21:54:47.000Z | from smpp.twisted.protocol import SMPPServerProtocol
from smpp.pdu import pdu_types
from zope.interface import Interface
from twisted.internet.protocol import ServerFactory
# Jasmin update: direct import of UsernamePassword instead of cred
from twisted.cred.credentials import UsernamePassword
from twisted.cre... | 42.201717 | 205 | 0.654327 | from smpp.twisted.protocol import SMPPServerProtocol
from smpp.pdu import pdu_types
from zope.interface import Interface
from twisted.internet.protocol import ServerFactory
# Jasmin update: direct import of UsernamePassword instead of cred
from twisted.cred.credentials import UsernamePassword
from twisted.cre... | 2,621 | 6,514 | 122 |
a5dff7855d7cf98d0aa28890c56833ed7e6a75f0 | 4,789 | py | Python | scripts/wiggle.py | Osaka-University-Harada-Laboratory/sda5f_tutorials | cf2ca805955545687676b7fec2c52d76aed36147 | [
"MIT"
] | null | null | null | scripts/wiggle.py | Osaka-University-Harada-Laboratory/sda5f_tutorials | cf2ca805955545687676b7fec2c52d76aed36147 | [
"MIT"
] | null | null | null | scripts/wiggle.py | Osaka-University-Harada-Laboratory/sda5f_tutorials | cf2ca805955545687676b7fec2c52d76aed36147 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import rospy
from geometry_msgs.msg import Pose, Quaternion, Vector3
from moveit_commander import RobotCommander, MoveGroupCommander
from tf.transformations import quaternion_from_euler, euler_from_quaternion
def euler_to_quaternion(euler):
"""Converts euler angles to quaternion... | 35.213235 | 75 | 0.719148 | #!/usr/bin/env python
import math
import rospy
from geometry_msgs.msg import Pose, Quaternion, Vector3
from moveit_commander import RobotCommander, MoveGroupCommander
from tf.transformations import quaternion_from_euler, euler_from_quaternion
def euler_to_quaternion(euler):
"""Converts euler angles to quaternion... | 0 | 0 | 0 |
aa37547a625f793d77e3411e6a47ae84f150c19b | 4,974 | py | Python | src/features/helpers.py | oesst/HRTF_neural_model | 494d29c514eaad3aee575f77d08a59a9d011a415 | [
"MIT"
] | null | null | null | src/features/helpers.py | oesst/HRTF_neural_model | 494d29c514eaad3aee575f77d08a59a9d011a415 | [
"MIT"
] | null | null | null | src/features/helpers.py | oesst/HRTF_neural_model | 494d29c514eaad3aee575f77d08a59a9d011a415 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import cm
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.signal import welch
from itertools import islice
import matplotlib as mpl
from scipy.spatial import distance
from sklearn.linear_model import LinearRegression
from scipy.ndimage import gaussia... | 40.439024 | 129 | 0.663249 | import numpy as np
from matplotlib import cm
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.signal import welch
from itertools import islice
import matplotlib as mpl
from scipy.spatial import distance
from sklearn.linear_model import LinearRegression
from scipy.ndimage import gaussia... | 4,453 | 0 | 138 |
b3f156a50e91315d4c5a494448beafbda81c7e85 | 79 | py | Python | locale/pot/api/examples/_autosummary/pyvista-examples-examples-load_airplane-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/examples/_autosummary/pyvista-examples-examples-load_airplane-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/examples/_autosummary/pyvista-examples-examples-load_airplane-1.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | from pyvista import examples
dataset = examples.load_airplane()
dataset.plot()
| 19.75 | 34 | 0.810127 | from pyvista import examples
dataset = examples.load_airplane()
dataset.plot()
| 0 | 0 | 0 |
07535e63fcad90c3d056822dbaf0f4478a436996 | 5,296 | py | Python | napari_arboretum/visualisation/vispy_plotter.py | lowe-lab-ucl/arboretum | bb23b25ce66e51df6b0a8fbbe1a17cc0e54eaed3 | [
"MIT"
] | 3 | 2021-12-29T16:48:00.000Z | 2022-03-31T09:19:55.000Z | napari_arboretum/visualisation/vispy_plotter.py | lowe-lab-ucl/arboretum | bb23b25ce66e51df6b0a8fbbe1a17cc0e54eaed3 | [
"MIT"
] | 25 | 2021-11-30T11:29:06.000Z | 2022-03-31T13:07:13.000Z | napari_arboretum/visualisation/vispy_plotter.py | lowe-lab-ucl/arboretum | bb23b25ce66e51df6b0a8fbbe1a17cc0e54eaed3 | [
"MIT"
] | 4 | 2021-12-21T00:51:26.000Z | 2022-03-09T15:55:45.000Z | from dataclasses import dataclass
from typing import Optional
import numpy as np
from qtpy.QtWidgets import QWidget
from vispy import scene
from ..tree import Annotation, Edge
from .base_plotter import TreePlotterQWidgetBase
__all__ = ["VisPyPlotter"]
@dataclass
class VisPyPlotter(TreePlotterQWidgetBase):
""... | 30.436782 | 88 | 0.568731 | from dataclasses import dataclass
from typing import Optional
import numpy as np
from qtpy.QtWidgets import QWidget
from vispy import scene
from ..tree import Annotation, Edge
from .base_plotter import TreePlotterQWidgetBase
__all__ = ["VisPyPlotter"]
@dataclass
class Bounds:
xmin: float
xmax: float
ym... | 1,084 | 56 | 184 |
f597c5361d3dd711fa6c1531b0d43104d46761fe | 1,207 | py | Python | foreign.py | pceuropa/bitcoin-exchange | 4f27f674cf74acf20df8fdd909fa402212cc994d | [
"MIT"
] | 6 | 2017-10-30T15:36:49.000Z | 2022-02-06T01:05:28.000Z | foreign.py | alimogh/bitcoin-exchange | 4f27f674cf74acf20df8fdd909fa402212cc994d | [
"MIT"
] | null | null | null | foreign.py | alimogh/bitcoin-exchange | 4f27f674cf74acf20df8fdd909fa402212cc994d | [
"MIT"
] | 3 | 2017-10-31T17:04:20.000Z | 2022-02-06T01:06:03.000Z | # !/usr/bin/env python3
#-*- coding:utf-8 -*-
"""
Foreign exange PLN, Euro ,USDT , BTC
"""
from urllib.request import urlopen
from json import load
from argparse import ArgumentParser
from bittrex.bittrex import Ask
if __name__ == '__main__':
currencies = all_rates()
ask = Ask('usdt-btc')
btc = ask.m... | 25.145833 | 75 | 0.608119 | # !/usr/bin/env python3
#-*- coding:utf-8 -*-
"""
Foreign exange PLN, Euro ,USDT , BTC
"""
from urllib.request import urlopen
from json import load
from argparse import ArgumentParser
from bittrex.bittrex import Ask
def rates():
url = "http://api.fixer.io/latest?base=USD"
rates = load(urlopen(url))
ret... | 210 | 0 | 46 |
a275121665febc865263a9fe4b7cf46b959871d2 | 912 | py | Python | main_website/urls.py | Jonak-Adipta-Kalita/JAK-Website | 39c3723e95d99e990a2e23dbb05746def2ac903a | [
"MIT"
] | 1 | 2021-08-31T14:21:16.000Z | 2021-08-31T14:21:16.000Z | main_website/urls.py | Jonak-Adipta-Kalita/JAK-Website | 39c3723e95d99e990a2e23dbb05746def2ac903a | [
"MIT"
] | 74 | 2021-11-03T03:19:12.000Z | 2022-03-31T03:23:49.000Z | main_website/urls.py | Jonak-Adipta-Kalita/JAK-Website | 39c3723e95d99e990a2e23dbb05746def2ac903a | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from main_app.views import handler404 as page_not_found
from django.conf.urls import url
from django.conf import settings
from django.views.static import serve
from django.views.generic import TemplateView
admin.site.site_header = "Developer: Jonak... | 33.777778 | 82 | 0.714912 | from django.contrib import admin
from django.urls import path, include
from main_app.views import handler404 as page_not_found
from django.conf.urls import url
from django.conf import settings
from django.views.static import serve
from django.views.generic import TemplateView
admin.site.site_header = "Developer: Jonak... | 0 | 0 | 0 |
2774b143f7258f9330eb80895702593bbc2a706b | 2,571 | py | Python | tests/test_region_classifier.py | NREL/reVX | 4d62eb2c003c3b53b959f7a58bdc342d18098884 | [
"BSD-3-Clause"
] | 7 | 2020-04-06T00:29:55.000Z | 2022-01-23T20:00:14.000Z | tests/test_region_classifier.py | NREL/reVX | 4d62eb2c003c3b53b959f7a58bdc342d18098884 | [
"BSD-3-Clause"
] | 67 | 2020-02-28T20:15:35.000Z | 2022-03-31T21:34:52.000Z | tests/test_region_classifier.py | NREL/reVX | 4d62eb2c003c3b53b959f7a58bdc342d18098884 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""reVX PLEXOS unit test module
"""
from click.testing import CliRunner
import os
import pytest
import pandas as pd
from pandas.testing import assert_series_equal
import tempfile
import traceback
from rex.utilities.loggers import LOGGERS
from reVX import TESTDATADIR
from reVX.utilities.region_... | 28.88764 | 74 | 0.616103 | # -*- coding: utf-8 -*-
"""reVX PLEXOS unit test module
"""
from click.testing import CliRunner
import os
import pytest
import pandas as pd
from pandas.testing import assert_series_equal
import tempfile
import traceback
from rex.utilities.loggers import LOGGERS
from reVX import TESTDATADIR
from reVX.utilities.region_... | 0 | 0 | 0 |
cb201375eff732507f71ccc42bbbe0884d60bfcc | 92 | py | Python | file_append.py | chauhanmahavir/Python-Basics | c250a9eee203e1188a968ba2c60262442719fa49 | [
"MIT"
] | 1 | 2020-08-05T05:38:44.000Z | 2020-08-05T05:38:44.000Z | file_append.py | chauhanmahavir/Python-Basics | c250a9eee203e1188a968ba2c60262442719fa49 | [
"MIT"
] | null | null | null | file_append.py | chauhanmahavir/Python-Basics | c250a9eee203e1188a968ba2c60262442719fa49 | [
"MIT"
] | null | null | null | new='\nNew Message'
savefile=open('first.txt','a')
savefile.write(new)
savefile.close()
| 18.4 | 31 | 0.695652 | new='\nNew Message'
savefile=open('first.txt','a')
savefile.write(new)
savefile.close()
| 0 | 0 | 0 |
7e3be4b32a303cce5ac7b2bcba206c71b9c59459 | 129 | py | Python | import_product_inventory/models/__init__.py | TerraColligo/tc_odoo_addons | 464c062a54ef07c0ec158b0f5a3cb5aae9fbada1 | [
"CC0-1.0"
] | null | null | null | import_product_inventory/models/__init__.py | TerraColligo/tc_odoo_addons | 464c062a54ef07c0ec158b0f5a3cb5aae9fbada1 | [
"CC0-1.0"
] | null | null | null | import_product_inventory/models/__init__.py | TerraColligo/tc_odoo_addons | 464c062a54ef07c0ec158b0f5a3cb5aae9fbada1 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from . import pos_category
from . import product_import_batch
from . import product_cierres_import_batch | 25.8 | 42 | 0.775194 | # -*- coding: utf-8 -*-
from . import pos_category
from . import product_import_batch
from . import product_cierres_import_batch | 0 | 0 | 0 |
ff01997242706cf7d282bafd34ab4dbda3bfa92e | 7,501 | py | Python | test_cifar10.py | KawtareDK/Intern_CEFE | 501fc4fa4b1980c0b99d0257e5af12dc708d5cba | [
"Apache-2.0"
] | null | null | null | test_cifar10.py | KawtareDK/Intern_CEFE | 501fc4fa4b1980c0b99d0257e5af12dc708d5cba | [
"Apache-2.0"
] | null | null | null | test_cifar10.py | KawtareDK/Intern_CEFE | 501fc4fa4b1980c0b99d0257e5af12dc708d5cba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 6 09:24:13 2022
@author: kawta
"""
import tensorflow.keras
import keras
import numpy as np
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Conv2D, MaxPooling2D
import matplo... | 31.384937 | 182 | 0.64658 | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 6 09:24:13 2022
@author: kawta
"""
import tensorflow.keras
import keras
import numpy as np
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Conv2D, MaxPooling2D
import matplo... | 0 | 0 | 0 |
e3426285f677f6a7df78f1891bf15f4043190511 | 9,712 | py | Python | models.py | beabevi/ESAN | 35dfc021f2a5c0d85c2a2cee4bcd6b4345b96d8f | [
"MIT"
] | 37 | 2022-01-30T22:44:47.000Z | 2022-03-25T06:44:04.000Z | models.py | beabevi/ESAN | 35dfc021f2a5c0d85c2a2cee4bcd6b4345b96d8f | [
"MIT"
] | 1 | 2022-02-09T15:01:13.000Z | 2022-02-09T16:12:38.000Z | models.py | beabevi/ESAN | 35dfc021f2a5c0d85c2a2cee4bcd6b4345b96d8f | [
"MIT"
] | 1 | 2022-02-02T13:25:27.000Z | 2022-02-02T13:25:27.000Z | import torch
import torch.nn.functional as F
import torch_scatter
from torch_geometric.nn import global_add_pool, global_mean_pool, global_max_pool, GlobalAttention
from conv import GNN_node
| 42.04329 | 125 | 0.632105 | import torch
import torch.nn.functional as F
import torch_scatter
from torch_geometric.nn import global_add_pool, global_mean_pool, global_max_pool, GlobalAttention
from conv import GNN_node
def subgraph_pool(h_node, batched_data, pool):
# Represent each subgraph as the pool of its node representations
num_s... | 8,969 | 64 | 480 |
2b1deea7dbaa00f0a56aa55e7e02f35d83f77c85 | 734 | py | Python | prepomm/ff_models.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | prepomm/ff_models.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | prepomm/ff_models.py | dwhswenson/prepomm | 1109c4ae03f13f2c111e1d243243f45d0e28ceb2 | [
"MIT"
] | null | null | null | """
Tools to facilitate working with force fields in OpenMM
"""
| 27.185185 | 55 | 0.587193 | """
Tools to facilitate working with force fields in OpenMM
"""
class FFModels(object):
def __init__(self, protein, water, **kwargs):
self.protein = protein
self.water = water
self.kwargs = kwargs
extras = [ff for ff in set(kwargs.values())
if ff not in [protein, w... | 420 | 227 | 23 |
974ca1d5d9831515cd7bf0a40cfdf7dcc481e364 | 576 | py | Python | LeetCodeSolutions/LeetCode_0141.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | 24 | 2020-03-28T06:10:25.000Z | 2021-11-23T05:01:29.000Z | LeetCodeSolutions/LeetCode_0141.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | null | null | null | LeetCodeSolutions/LeetCode_0141.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | 8 | 2020-05-18T02:43:16.000Z | 2021-05-24T18:11:38.000Z | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
| 25.043478 | 47 | 0.475694 | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def hasCycle(self, head: ListNode) -> bool:
"""
fast slow pointer
"""
if not head or not head.next:
return False
... | 0 | 419 | 23 |
e5046dee8ec3d26e538af7428d06c387d34ae065 | 1,684 | py | Python | src/scaffoldmaker/annotation/stomach_terms.py | zekh167/scaffoldmaker | de77f0ad424d90d04e3ea182071cc0a4cc9086c8 | [
"Apache-2.0"
] | null | null | null | src/scaffoldmaker/annotation/stomach_terms.py | zekh167/scaffoldmaker | de77f0ad424d90d04e3ea182071cc0a4cc9086c8 | [
"Apache-2.0"
] | null | null | null | src/scaffoldmaker/annotation/stomach_terms.py | zekh167/scaffoldmaker | de77f0ad424d90d04e3ea182071cc0a4cc9086c8 | [
"Apache-2.0"
] | null | null | null | """
Common resource for stomach annotation terms.
"""
# convention: preferred name, preferred id, followed by any other ids and alternative names
stomach_terms = [
( "body of stomach", "UBERON:0001161", " FMA:14560", "ILX:0724929"),
( "cardia of stomach", "UBERON:0001162", " FMA:14561", "ILX:0729096"),
( "... | 46.777778 | 91 | 0.645487 | """
Common resource for stomach annotation terms.
"""
# convention: preferred name, preferred id, followed by any other ids and alternative names
stomach_terms = [
( "body of stomach", "UBERON:0001161", " FMA:14560", "ILX:0724929"),
( "cardia of stomach", "UBERON:0001162", " FMA:14561", "ILX:0729096"),
( "... | 0 | 0 | 0 |
bde5a80211d363d1a31e5371a2ead4d08d03a96e | 620 | py | Python | tests/test_utils.py | HiroIshida/mohou | 05fbf1f186f32d139423e3679feab73a27b7d6a4 | [
"MIT"
] | 1 | 2022-03-30T07:51:16.000Z | 2022-03-30T07:51:16.000Z | tests/test_utils.py | HiroIshida/mohou | 05fbf1f186f32d139423e3679feab73a27b7d6a4 | [
"MIT"
] | null | null | null | tests/test_utils.py | HiroIshida/mohou | 05fbf1f186f32d139423e3679feab73a27b7d6a4 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from mohou.utils import splitting_slices
| 22.962963 | 76 | 0.53871 | import numpy as np
import torch
from mohou.utils import splitting_slices
def test_splitting_slicers():
n = 10
tensor = torch.ones(n, 100, 100)
array = np.ones((n, 100, 100))
for obj in (tensor, array):
for i in range(n):
obj[i] *= i
n_elem_list = [3, 3, 4]
for obj in (te... | 522 | 0 | 23 |
b885c990e801b88eaad23234ff6d53c929e8f290 | 7,138 | py | Python | main.py | zwerg4/Twitter_Giveaway_Bot | baee61c4c054c729c07b5b74aa2407d50a8f97a3 | [
"MIT"
] | 1 | 2019-12-07T16:05:15.000Z | 2019-12-07T16:05:15.000Z | main.py | zwerg4/Twitter_Giveaway_Bot | baee61c4c054c729c07b5b74aa2407d50a8f97a3 | [
"MIT"
] | 1 | 2019-08-01T13:15:07.000Z | 2019-09-05T20:45:16.000Z | main.py | zwerg4/Twitter_Giveaway_Bot | baee61c4c054c729c07b5b74aa2407d50a8f97a3 | [
"MIT"
] | 3 | 2019-09-30T18:51:46.000Z | 2020-04-30T13:05:00.000Z | '''
Coded by Z1 :)
More features are underway! Email questions/concerns/feature requests
at slitherthuglife@gmail.com or via twitter: @z1rk4
'''
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy import API
from tweepy import Cursor
import tweepy
import... | 37.568421 | 294 | 0.584618 | '''
Coded by Z1 :)
More features are underway! Email questions/concerns/feature requests
at slitherthuglife@gmail.com or via twitter: @z1rk4
'''
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy import API
from tweepy import Cursor
import tweepy
import... | 1,187 | 0 | 69 |
6adc598e4fda4088b7bbf06fe66dc0495f37692b | 37,317 | py | Python | include/scons/src/engine/SCons/Tool/msvsTests.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | include/scons/src/engine/SCons/Tool/msvsTests.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | include/scons/src/engine/SCons/Tool/msvsTests.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | #
# __COPYRIGHT__
#
# 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 to use, copy, modify, merge, publish,
# distribute, sublicen... | 43.341463 | 535 | 0.684675 | #
# __COPYRIGHT__
#
# 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 to use, copy, modify, merge, publish,
# distribute, sublicen... | 4,501 | 7 | 742 |
40a6a0c64527ee1f0e5842d183276435dc38bd32 | 651 | py | Python | src/extensions.py | marcoprado17/flask-bone | 772d25bdf6c6e41701da1ef2e2a67bae7ae21757 | [
"MIT"
] | null | null | null | src/extensions.py | marcoprado17/flask-bone | 772d25bdf6c6e41701da1ef2e2a67bae7ae21757 | [
"MIT"
] | null | null | null | src/extensions.py | marcoprado17/flask-bone | 772d25bdf6c6e41701da1ef2e2a67bae7ae21757 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# ======================================================================================================================
# The MIT License (MIT)
# ======================================================================================================================
# Copyr... | 43.4 | 120 | 0.321045 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# ======================================================================================================================
# The MIT License (MIT)
# ======================================================================================================================
# Copyr... | 0 | 0 | 0 |
dbad11fa04ad0ced65e7d65db205e66c87515843 | 317 | py | Python | app/test_game.py | mmxsrup/icfpc2020 | 28b20926f4acacbcab438977a5f210f1e8f4f5a1 | [
"MIT"
] | null | null | null | app/test_game.py | mmxsrup/icfpc2020 | 28b20926f4acacbcab438977a5f210f1e8f4f5a1 | [
"MIT"
] | null | null | null | app/test_game.py | mmxsrup/icfpc2020 | 28b20926f4acacbcab438977a5f210f1e8f4f5a1 | [
"MIT"
] | 1 | 2020-07-22T11:15:28.000Z | 2020-07-22T11:15:28.000Z | from interpreter import Interpreter
interpreter = Interpreter()
print(interpreter.evaluate_expression("ap send ( 2 , 1 , ( ) )").print())
print(
interpreter.evaluate_expression(
"ap send ( 3 , 1 , ( 1 , 2 , 3 , 4 ) )").print())
print(interpreter.evaluate_expression("ap send ( 4 , 1 , ( ) )").print()) | 28.818182 | 73 | 0.637224 | from interpreter import Interpreter
interpreter = Interpreter()
print(interpreter.evaluate_expression("ap send ( 2 , 1 , ( ) )").print())
print(
interpreter.evaluate_expression(
"ap send ( 3 , 1 , ( 1 , 2 , 3 , 4 ) )").print())
print(interpreter.evaluate_expression("ap send ( 4 , 1 , ( ) )").print()) | 0 | 0 | 0 |
92c1ec5fed630936ffb0f14b8765a83f1c9383ec | 335 | py | Python | destacame/buses/apps.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | destacame/buses/apps.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | destacame/buses/apps.py | osocaramelosofer/destacame | 7b816be1d785bcd6525265d708c584545490816e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
| 23.928571 | 58 | 0.659701 | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class BusesConfig(AppConfig):
# default_auto_field = 'django.db.models.BigAutoField'
name = "destacame.buses"
verbose_name = _("Buses")
def ready(self):
try:
pass
except ImportError:
... | 70 | 153 | 23 |
23646ec611b90ffe76c69d2edffc38d506b7ffb9 | 469 | py | Python | config.py | Maroon-White-Matching/BackendServer | 1d056ae123de0cd2757a42f3f8d3f1e235e21a9d | [
"Unlicense"
] | null | null | null | config.py | Maroon-White-Matching/BackendServer | 1d056ae123de0cd2757a42f3f8d3f1e235e21a9d | [
"Unlicense"
] | null | null | null | config.py | Maroon-White-Matching/BackendServer | 1d056ae123de0cd2757a42f3f8d3f1e235e21a9d | [
"Unlicense"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
| 42.636364 | 91 | 0.750533 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-never-know-anything'
SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'].replace("://", "ql://", 1)
# SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:49Caolo2020@localh... | 0 | 382 | 23 |
cd3623684c241932b4c484c1c4082949b5e8b1a0 | 2,224 | py | Python | lib/gpxutils.py | simonmikkelsen/gpxutils | f075ce1f4363cf68a95fedcb0d4b38109ad3ae35 | [
"MIT"
] | 4 | 2018-02-07T03:33:21.000Z | 2019-02-03T21:31:48.000Z | lib/gpxutils.py | simonmikkelsen/gpxutils | f075ce1f4363cf68a95fedcb0d4b38109ad3ae35 | [
"MIT"
] | null | null | null | lib/gpxutils.py | simonmikkelsen/gpxutils | f075ce1f4363cf68a95fedcb0d4b38109ad3ae35 | [
"MIT"
] | null | null | null | #!/usr/bin/python
try:
from gpxpy import gpx
except ImportError:
print("gpxpy not found - please run: pip install gpxpy")
sys.exit()
| 34.215385 | 105 | 0.542716 | #!/usr/bin/python
try:
from gpxpy import gpx
except ImportError:
print("gpxpy not found - please run: pip install gpxpy")
sys.exit()
class GpxUtil:
def coords_2_sequences(self, coords):
""" Takes an array of arrays of coordinates (lon,lat) and returns a gpx object with sequences."""
gp... | 1,231 | 624 | 223 |
781946bb955740db79544f565420e11e25fb9c1b | 1,758 | py | Python | Batch_ImageRemoveUnclear.py | yuhonghai123/Flok_muitimodal_operators | d938f158d609f76cd81b5a7516faa7babbe81457 | [
"MIT"
] | 1 | 2021-05-29T08:24:28.000Z | 2021-05-29T08:24:28.000Z | Batch_ImageRemoveUnclear.py | yuhonghai123/Flok_muitimodal_operators | d938f158d609f76cd81b5a7516faa7babbe81457 | [
"MIT"
] | null | null | null | Batch_ImageRemoveUnclear.py | yuhonghai123/Flok_muitimodal_operators | d938f158d609f76cd81b5a7516faa7babbe81457 | [
"MIT"
] | null | null | null | import sys, os
from FlokAlgorithmLocal import FlokDataFrame, FlokAlgorithmLocal
import json
import cv2
#在flok流程中会执行这个main函数
if __name__ == "__main__":
all_info = json.loads(sys.argv[1])
# all_info = {
# "input": ["data/test.jpg"],
# "inputFormat": ["jpg"],
# "inputLocation":[... | 37.404255 | 101 | 0.631399 | import sys, os
from FlokAlgorithmLocal import FlokDataFrame, FlokAlgorithmLocal
import json
import cv2
class Batch_ImageRemoveUnclear(FlokAlgorithmLocal):
def run(self, inputDataSets, params):
image_dict = inputDataSets.get(0)
result_dict = dict()
blur = params.get('threshhold')
... | 470 | 30 | 52 |
096663c3b5ee668d35a43ff1ec28b5d71ded0d5c | 1,694 | py | Python | modules/user_level.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 8 | 2021-07-22T02:57:02.000Z | 2021-12-30T03:55:38.000Z | modules/user_level.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 1 | 2021-12-05T17:58:07.000Z | 2021-12-06T12:59:36.000Z | modules/user_level.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 3 | 2021-07-22T02:57:05.000Z | 2022-01-30T12:18:59.000Z | from configs.pathConfig import DATABASE_PATH
from peewee import (
SqliteDatabase,
Model,
IntegerField
)
'''
UserLevel表,用于管理用户权限等级
'''
DB = SqliteDatabase(DATABASE_PATH)
| 22.891892 | 82 | 0.557261 | from configs.pathConfig import DATABASE_PATH
from peewee import (
SqliteDatabase,
Model,
IntegerField
)
'''
UserLevel表,用于管理用户权限等级
'''
DB = SqliteDatabase(DATABASE_PATH)
class UserLevel(Model):
# 表的结构
user_id = IntegerField(verbose_name='用户QQ号', null=False)
group_id = IntegerField(verbose_na... | 0 | 1,683 | 23 |
5a2faae5760b829e46a41dd92688aaefa88c93e2 | 26,564 | py | Python | airpi/app/app.py | canta2899/vindriktning-iot | 41c584097ae2d8de0f4cefccf8cb09a99f77a531 | [
"MIT"
] | null | null | null | airpi/app/app.py | canta2899/vindriktning-iot | 41c584097ae2d8de0f4cefccf8cb09a99f77a531 | [
"MIT"
] | null | null | null | airpi/app/app.py | canta2899/vindriktning-iot | 41c584097ae2d8de0f4cefccf8cb09a99f77a531 | [
"MIT"
] | null | null | null | from flask import (
render_template,
Response,
redirect,
jsonify,
request,
url_for,
Flask,
g
)
from flask_jwt_extended import (
unset_access_cookies,
create_access_token,
set_access_cookies,
unset_jwt_cookies,
get_jwt_identity,
jwt_required,
jwt_manager,
... | 26.431841 | 125 | 0.588804 | from flask import (
render_template,
Response,
redirect,
jsonify,
request,
url_for,
Flask,
g
)
from flask_jwt_extended import (
unset_access_cookies,
create_access_token,
set_access_cookies,
unset_jwt_cookies,
get_jwt_identity,
jwt_required,
jwt_manager,
... | 3,390 | 323 | 253 |
c1c86d427f3a202617a7ae7ea610a7654f72690e | 1,542 | py | Python | freggersbot/data/vector.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | freggersbot/data/vector.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | freggersbot/data/vector.py | Jan000/Python-Freggers-Bot | abbfc5a96b22afcd94af6bf057ba72b77693a6e2 | [
"MIT"
] | null | null | null | #Copyright (c) 2020 Jan Kiefer
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES... | 28.555556 | 94 | 0.669909 | #Copyright (c) 2020 Jan Kiefer
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES... | 715 | -6 | 322 |
54fd5dec5e9161d4a81264bb7ac7b4717b2ab442 | 111 | py | Python | Aula 07/Ex3.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 07/Ex3.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 07/Ex3.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | soma = 0
for n in range (85,908):
if n%2==0:
print(n)
soma+=n
print ("Soma:",soma)
| 15.857143 | 28 | 0.45045 | soma = 0
for n in range (85,908):
if n%2==0:
print(n)
soma+=n
print ("Soma:",soma)
| 0 | 0 | 0 |
491b2901f6408d9ff653065ec67427097e394b97 | 106 | py | Python | Day 9/Legend-1409.py | ChetasShree/MarchCode | 80ee6206c0e4481b4421a83c7b7b7fc977450009 | [
"MIT"
] | 9 | 2021-03-02T12:16:24.000Z | 2021-03-26T11:06:08.000Z | Day 9/Legend-1409.py | ChetasShree/MarchCode | 80ee6206c0e4481b4421a83c7b7b7fc977450009 | [
"MIT"
] | 65 | 2021-03-02T04:57:47.000Z | 2021-04-02T19:31:30.000Z | Day 9/Legend-1409.py | ChetasShree/MarchCode | 80ee6206c0e4481b4421a83c7b7b7fc977450009 | [
"MIT"
] | 94 | 2021-03-02T04:42:28.000Z | 2021-06-28T10:38:20.000Z | i = input("Enter the number : ")
print("Sum of first and last digit of number =", int(i[0]) + int(i[-1]))
| 35.333333 | 72 | 0.613208 | i = input("Enter the number : ")
print("Sum of first and last digit of number =", int(i[0]) + int(i[-1]))
| 0 | 0 | 0 |
0a97fb9fb812081332882f64d3c433eee22a6d0e | 125,240 | py | Python | etc/conda/python-scons/scons-3.0.0.alpha.20170821/engine/SCons/Node/FS.py | MShaffar19/toolchain-tools | e4ab3c8d7b1b0633ab08d99b079d4fa678218f8a | [
"Apache-2.0"
] | null | null | null | etc/conda/python-scons/scons-3.0.0.alpha.20170821/engine/SCons/Node/FS.py | MShaffar19/toolchain-tools | e4ab3c8d7b1b0633ab08d99b079d4fa678218f8a | [
"Apache-2.0"
] | 2 | 2018-12-18T16:18:31.000Z | 2019-02-20T10:29:21.000Z | etc/conda/python-scons/scons-3.0.0.alpha.20170821/engine/SCons/Node/FS.py | StatisKit/toolchain-tools | e4ab3c8d7b1b0633ab08d99b079d4fa678218f8a | [
"Apache-2.0"
] | 3 | 2019-04-11T14:03:34.000Z | 2021-03-15T18:19:08.000Z | """scons.Node.FS
File system nodes.
These Nodes represent the canonical external objects that people think
of when they think of building software: files and directories.
This holds a "default_fs" variable that should be initialized with an FS
that can be used by scripts or modules looking for the canonical default.... | 35.259009 | 136 | 0.581492 | """scons.Node.FS
File system nodes.
These Nodes represent the canonical external objects that people think
of when they think of building software: files and directories.
This holds a "default_fs" variable that should be initialized with an FS
that can be used by scripts or modules looking for the canonical default.... | 33,953 | 20,457 | 3,476 |
516d48e81deaedfde2d33d86821e9c7b99a1a693 | 12,301 | py | Python | data_fetching/fetch_nasa_vegetation_index_data.py | ITWSDataScience/VectorBorneDiseaseAnalysisOnSouthAsianCountriesGroup10Fall2021 | 5cb24782d1f2a56c57f5687690477f10fa34aa07 | [
"MIT"
] | null | null | null | data_fetching/fetch_nasa_vegetation_index_data.py | ITWSDataScience/VectorBorneDiseaseAnalysisOnSouthAsianCountriesGroup10Fall2021 | 5cb24782d1f2a56c57f5687690477f10fa34aa07 | [
"MIT"
] | null | null | null | data_fetching/fetch_nasa_vegetation_index_data.py | ITWSDataScience/VectorBorneDiseaseAnalysisOnSouthAsianCountriesGroup10Fall2021 | 5cb24782d1f2a56c57f5687690477f10fa34aa07 | [
"MIT"
] | null | null | null | import argparse
import json
import os
import pandas as pd
import requests
import sys
import numpy as np
import time
from pyhdf.SD import SD, SDC
from typing import Iterable, Union
from io import StringIO
from shapely.geometry import shape, Point
MIN_LAT_KEY = "min_lat"
MAX_LAT_KEY = "max_lat"
MIN_LON_... | 30.523573 | 174 | 0.652549 | import argparse
import json
import os
import pandas as pd
import requests
import sys
import numpy as np
import time
from pyhdf.SD import SD, SDC
from typing import Iterable, Union
from io import StringIO
from shapely.geometry import shape, Point
MIN_LAT_KEY = "min_lat"
MAX_LAT_KEY = "max_lat"
MIN_LON_... | 599 | 0 | 25 |
085fb858ae24a5304505d566ebb036cf6c85dfb8 | 5,389 | py | Python | wgcpy/model/gen_pmml_model.py | ajia1206/wgcpy | fd7918b88c1cd55e8a7c0d5d254af8fd7eb8a25f | [
"MIT"
] | 3 | 2021-07-01T06:33:29.000Z | 2021-07-09T03:10:29.000Z | wgcpy/model/gen_pmml_model.py | ajia1206/wgcpy | fd7918b88c1cd55e8a7c0d5d254af8fd7eb8a25f | [
"MIT"
] | null | null | null | wgcpy/model/gen_pmml_model.py | ajia1206/wgcpy | fd7918b88c1cd55e8a7c0d5d254af8fd7eb8a25f | [
"MIT"
] | 1 | 2021-10-09T06:08:49.000Z | 2021-10-09T06:08:49.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@Project: wgcpy
@File Name: gen_pmml_model.py
@Author: weiguang
@Date: 2021/6/28
"""
import joblib
from wgcpy.utils.ext_fn import *
from .dz_eval import *
from lightgbm import LGBMClassifier
from xgboost import XGBClassifier
from sklearn.linear_mod... | 40.825758 | 116 | 0.646502 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@Project: wgcpy
@File Name: gen_pmml_model.py
@Author: weiguang
@Date: 2021/6/28
"""
import joblib
from wgcpy.utils.ext_fn import *
from .dz_eval import *
from lightgbm import LGBMClassifier
from xgboost import XGBClassifier
from sklearn.linear_mod... | 314 | 4,259 | 23 |
f386b74710b6090a4eeb1c6a3a571f1cf3c68575 | 1,071 | py | Python | tests/fixture/test_monkeypatch.py | qianchilang/learning-pytest | 453e42a64b532c166856e43d312519b0afe0e91d | [
"MIT"
] | 42 | 2019-02-15T07:44:51.000Z | 2022-01-31T02:04:17.000Z | tests/fixture/test_monkeypatch.py | qianchilang/learning-pytest | 453e42a64b532c166856e43d312519b0afe0e91d | [
"MIT"
] | 2 | 2019-07-08T01:14:47.000Z | 2021-07-22T08:36:41.000Z | tests/fixture/test_monkeypatch.py | qianchilang/learning-pytest | 453e42a64b532c166856e43d312519b0afe0e91d | [
"MIT"
] | 21 | 2019-06-13T07:46:07.000Z | 2022-02-15T02:58:33.000Z | import json
import os
config = {
'mirrors': ['https://xxxx.mirrors.ustc.edu.cn/']
}
# def test_config():
# dump_config(config)
# path = os.path.expanduser('~/.conf.json')
# expected = json.load(open(path, 'r', encoding='utf-8'))
# assert expected == config
| 28.184211 | 65 | 0.638655 | import json
import os
config = {
'mirrors': ['https://xxxx.mirrors.ustc.edu.cn/']
}
def dump_config(config):
path = os.path.expanduser('~/.conf.json')
with open(path, 'w', encoding='utf-8') as wr:
json.dump(config, wr, indent=4)
# def test_config():
# dump_config(config)
# path = os.pat... | 720 | 0 | 69 |
16c8b021daa0e621ff5d78901dfc440967ce7adc | 1,383 | py | Python | tfx/experimental/distributed_inference/graphdef_experiments/subgraph_partitioning/execution_spec.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 3 | 2020-07-20T18:37:16.000Z | 2021-11-17T11:24:27.000Z | tfx/experimental/distributed_inference/graphdef_experiments/subgraph_partitioning/execution_spec.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 2 | 2020-08-11T00:19:14.000Z | 2020-08-26T20:10:31.000Z | tfx/experimental/distributed_inference/graphdef_experiments/subgraph_partitioning/execution_spec.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 1 | 2021-01-28T13:41:51.000Z | 2021-01-28T13:41:51.000Z | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.461538 | 76 | 0.748373 | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 0 | 0 | 0 |
1be1e6a64d8a34fab1960b09a58e2b023240325d | 7,598 | py | Python | asr1k_neutron_l3/plugins/l3/agents/device_cleaner.py | BarbarossaTM/asr1k-neutron-l3 | 4102542bc87aa0ff28d988fe0dedc34c755655d0 | [
"Apache-2.0"
] | null | null | null | asr1k_neutron_l3/plugins/l3/agents/device_cleaner.py | BarbarossaTM/asr1k-neutron-l3 | 4102542bc87aa0ff28d988fe0dedc34c755655d0 | [
"Apache-2.0"
] | null | null | null | asr1k_neutron_l3/plugins/l3/agents/device_cleaner.py | BarbarossaTM/asr1k-neutron-l3 | 4102542bc87aa0ff28d988fe0dedc34c755655d0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 SAP SE
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 48.394904 | 116 | 0.601606 | # Copyright 2020 SAP SE
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 5,434 | 361 | 72 |
499cafe66854822b979920671bafdb1c96f66bb5 | 4,550 | py | Python | scripts/plan_spectrum.py | graindb/graindb | f82a52eb1772b37b172b8ae28f2f128b089639c8 | [
"MIT"
] | 9 | 2021-09-08T13:13:03.000Z | 2022-03-11T21:18:05.000Z | scripts/plan_spectrum.py | graindb/graindb | f82a52eb1772b37b172b8ae28f2f128b089639c8 | [
"MIT"
] | 1 | 2021-12-10T18:06:11.000Z | 2021-12-13T17:20:41.000Z | scripts/plan_spectrum.py | graindb/graindb | f82a52eb1772b37b172b8ae28f2f128b089639c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
font = { # 'weight' : 'bold',
'size': 14}
matplotlib.rc('font', **font)
# python3 scripts/plan_spectrum.py -o ~/Developer/graindb-benchmark/plan_spectrum/job/plan_spectrum_q4.pdf -j 0.0
# -l Duck Grain ... | 35.546875 | 113 | 0.596044 | #!/usr/bin/env python3
import argparse
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
font = { # 'weight' : 'bold',
'size': 14}
matplotlib.rc('font', **font)
# python3 scripts/plan_spectrum.py -o ~/Developer/graindb-benchmark/plan_spectrum/job/plan_spectrum_q4.pdf -j 0.0
# -l Duck Grain ... | 3,884 | 0 | 138 |
4b27145401c87cebf9e33ca909bf71ba3b892749 | 9,911 | py | Python | src/Logic/DiagramCreator.py | christianwaldmann/DiagramTool | cff3ed256294d93bcc531f70d75b9442556e40d8 | [
"MIT"
] | null | null | null | src/Logic/DiagramCreator.py | christianwaldmann/DiagramTool | cff3ed256294d93bcc531f70d75b9442556e40d8 | [
"MIT"
] | null | null | null | src/Logic/DiagramCreator.py | christianwaldmann/DiagramTool | cff3ed256294d93bcc531f70d75b9442556e40d8 | [
"MIT"
] | null | null | null | from src.Core.Log import Log
from src.Core.Core import ASSERT
from src.Logic.Line import LineManager, LineWithState
from src.UI.Base.Window import Window, WindowProps
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
import matplotlib.... | 30.495385 | 88 | 0.579356 | from src.Core.Log import Log
from src.Core.Core import ASSERT
from src.Logic.Line import LineManager, LineWithState
from src.UI.Base.Window import Window, WindowProps
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
import matplotlib.... | 8,228 | 1,077 | 46 |