blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
87990ee7c013adfed4d8152d526bab78f47feee2 | 9550ce4a80169d21b556b22679a9462f98438e32 | /app/urls.py | 32f3b1ab973c04cbcb9ce11ea3ea6d0850315945 | [
"Apache-2.0"
] | permissive | erics1996/questionnaire_django | 87cc44bd745eb810861349effc126ed3dfbd6508 | 1006c61eba1e9efec0801299938eb13c16a0b292 | refs/heads/master | 2022-12-15T04:47:39.042594 | 2020-09-02T17:34:33 | 2020-09-02T17:34:33 | 284,580,189 | 0 | 0 | Apache-2.0 | 2020-09-02T17:34:34 | 2020-08-03T02:02:20 | Python | UTF-8 | Python | false | false | 300 | py | from django.contrib import admin
from django.urls import path, re_path
from .views import backend
urlpatterns = [
path('', backend.IndexView.as_view()),
re_path('survey/(?P<pk>\d+)/', backend.SurveyDetailView.as_view()),
re_path('(?P<pk>\d+)/download/', backend.DownloadView.as_view())
] | [
"[email protected]"
] | |
a78acddf6eebc59cad1ebc0e8fdaf53ee0ce2702 | 44a7101ae18c84ffa0e3c674763ba7b500937773 | /root/Desktop/Scripts/pyinstaller-1.5.1/bh_sshRcmd/bh_sshRcmd.spec | 66707266787869a8fdd977ad9985b57711fe3880 | [] | no_license | Draft2007/Scripts | cbaa66ce0038f3370c42d93da9308cbd69fb701a | 0dcc720a1edc882cfce7498ca9504cd9b12b8a44 | refs/heads/master | 2016-09-05T20:05:46.601503 | 2015-06-23T00:05:02 | 2015-06-23T00:05:02 | 37,945,893 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 561 | spec | # -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(HOMEPATH,'support/useUnicode.py'), '/usr/local/tools/bh_sshRcmd.py'],
pathex=['/usr/local/tools/pyinstaller-1.5.1'])
pyz = PYZ(a.pure)
exe = EXE( pyz,
a.scripts,
a.binaries,
a.zip... | [
"[email protected]"
] | |
dc0f1debf616d07e130ae2adb13b8209fd2e2f74 | 99afa83eda09cf552466ddf90314cb01d07b166a | /testapp/models.py | c1fa45c2c96048893e614bf9142070231858f126 | [] | no_license | jithinvijayan007/Lithoera | 358c9a6191d6510ac07229e7a92eadd89d70e14f | 33e3639e882f79b12541f92070dad74483fdfa72 | refs/heads/master | 2023-01-05T18:29:37.388869 | 2020-11-02T11:58:27 | 2020-11-02T11:58:27 | 309,316,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
# Create your models here.
class MyAccountManager(BaseUserManager):
def create_user(self, email, username, password=None):
if not email:
raise ValueError('Users must have an email address')
if not username:
... | [
"[email protected]"
] | |
21064aaea82657175bb68471f1411164393e0210 | 657c80336bce1cc6158cd349ce208c5e680a4d0d | /contrib/projection/tests/projection/base_projection.py | de53d6895412de112d31a959926d9cdb47b6ef9c | [
"BSD-3-Clause"
] | permissive | Xinmudotmoe/pyglet | b37628618647bf3b1e3d7db28202a5e14c60450c | 144257c365ca85528c6a4c5bed8141e683d7a9b6 | refs/heads/master | 2021-05-29T22:05:40.676643 | 2015-10-24T05:55:49 | 2015-10-24T05:55:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | #!/usr/bin/python
# $Id:$
from pyglet.gl import *
def fillrect(x, y, width, height):
glBegin(GL_QUADS)
glVertex2f(x, y)
glVertex2f(x + width, y)
glVertex2f(x + width, y + height)
glVertex2f(x, y + height)
glEnd()
def rect(x, y, width, height):
glBegin(GL_LINE_LOOP)
glVertex2f(x, y)
... | [
"[email protected]"
] | |
d811f5d03ae12bdeb567632e2d82b3ecccc87751 | a1e3e7cf1d27b85d9472c6353e7646d37528b241 | /q11.py | 3ea7528239387d3ae6df885be655e4e6ebe1b32f | [] | no_license | osama1998H/standerdLearnd-string | 421148f81c2c604f6c75dac568ff1faeb20922ce | 0af39cd2fd43be45bb54aca2826bc8bf56e399ed | refs/heads/main | 2023-09-01T04:21:52.499680 | 2021-05-15T19:54:50 | 2021-05-15T19:54:50 | 365,533,408 | 0 | 0 | null | 2023-08-29T08:31:40 | 2021-05-08T14:21:53 | Python | UTF-8 | Python | false | false | 325 | py | string = input("enter the string: ")
def del_odd(string: str)->str:
new_string = ""
string = [i for i in string]
for i in string:
if string.index(i) % 2 != 0:
string.remove(i)
for i in string:
new_string += i
return new_string
new_string = del_odd(string)
print(new_str... | [
"[email protected]"
] | |
da3f5d0d4b3c71ac3db45cece6411a3233f8b68a | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/webpubsub/azure-mgmt-webpubsub/generated_samples/web_pub_sub_replicas_create_or_update.py | 81ff6144e4226d349866642540011deb03744386 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 1,920 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
1dbfcc3d47f3a48af022c5b19fdcc27352f4d401 | d2b54d3df1dc8f7e88c0d209b35949089facc73f | /treenode/memory.py | b5c7ddd2c1dd51260daf32b36666209d52ca2176 | [
"MIT"
] | permissive | domlysi/django-treenode | df8b08e756884bc8daffdfad7b5b3b102e92e309 | 86e7c76e2b2d60c071cfce6ad1493b2b51f2d304 | refs/heads/master | 2022-12-12T18:10:44.668904 | 2020-08-17T11:01:09 | 2020-08-17T11:01:09 | 287,275,877 | 0 | 0 | MIT | 2020-08-13T12:37:54 | 2020-08-13T12:37:54 | null | UTF-8 | Python | false | false | 522 | py | # -*- coding: utf-8 -*-
from collections import defaultdict
import weakref
__refs__ = defaultdict(weakref.WeakSet)
def clear_refs(cls):
__refs__[cls].clear()
def get_refs(cls):
return __refs__[cls]
def set_ref(cls, obj):
if obj.pk:
__refs__[cls].add(obj)
def update_refs(cls, data):
f... | [
"[email protected]"
] | |
925028b08297779546c047873b5ba67c870ad692 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_55/59.py | 09da2bcfaa4c411daa5449e6b502ef93033a8f6c | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,319 | py | #!/usr/bin/env python
import sys
filename=sys.argv[1]
inputfile=file(filename, 'r')
numcases=int(inputfile.readline().strip())
for case in range(1,numcases+1):
R, k, N = map(long, inputfile.readline().strip().split())
g = map(long, inputfile.readline().strip().split())
y = 0
first_ride = [None] * N
... | [
"[email protected]"
] | |
eeb5073afecbaf0f35097a0d4970f139fc0282fd | 014e9a6f3d48ffa7b9ee759904d2e33284a6f4d6 | /api/caoloapi/model/auth.py | c73941f6992e52e8c9728cbae96791221e95e3a7 | [
"MIT"
] | permissive | kissmikijr/caolo-backend | 33c0262239182b96d1215677c45065b4ef90455b | efec05bb793bd40951cb4e5ae4e930d972f63d36 | refs/heads/master | 2023-09-04T01:09:50.068148 | 2021-10-18T22:00:59 | 2021-10-18T22:06:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,079 | py | from datetime import datetime as dt, timedelta
from passlib.context import CryptContext
from jose import jwt
SECRET_KEY = "fe9fb923daa2a5c34a57b6da5d807a1e9cb48d4afee5c10095bab37bcf860059"
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30
PEPPER_RANGE = (128, 139, 3)
pwd_context = CryptContext(schemes=["bcrypt"]... | [
"[email protected]"
] | |
3e1738529ae55e62ae6843901eca2eb0d436e07a | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractIntheinkpotfictionWordpressCom.py | 5a22827f09f4623da612321d5379b4873ab2b614 | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 576 | py |
def extractIntheinkpotfictionWordpressCom(item):
'''
Parser for 'intheinkpotfiction.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', 'trans... | [
"[email protected]"
] | |
15487621d75896236eb3ebe106a4f8748a6a389b | e43b78db4ff598944e58e593610f537f3833d79c | /py-faster-rcnn/lib/roi_data_layer/roidb.py | 93f713e1f127d432736a654ce6fa292eef3b6c67 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | ZJUZQ/Net_caffe | 577e9b3e80a391d772a21c27639465d539fceb1f | bed3c7384a259339c5a0fb2ea34fa0cdd32ddd29 | refs/heads/master | 2021-09-08T12:19:37.039970 | 2018-03-09T14:44:24 | 2018-03-09T14:44:24 | 114,853,721 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,356 | py | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
"""Transform a roidb into a trainable roidb by adding a bunch of metada... | [
"[email protected]"
] | |
ad73927538d2a6b51e3e9da4eaa96818ced5e08a | f714db4463dd37fc33382364dc4b1963a9053e49 | /tests/sentry/event_manager/interfaces/test_frame.py | 22dd3b8b5756050429bafb0bd12c3db6daa422ae | [
"BUSL-1.1",
"Apache-2.0"
] | permissive | macher91/sentry | 92171c2ad23564bf52627fcd711855685b138cbd | dd94d574403c95eaea6d4ccf93526577f3d9261b | refs/heads/master | 2021-07-07T08:23:53.339912 | 2020-07-21T08:03:55 | 2020-07-21T08:03:55 | 140,079,930 | 0 | 0 | BSD-3-Clause | 2020-05-13T11:28:35 | 2018-07-07T11:50:48 | Python | UTF-8 | Python | false | false | 1,366 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
from sentry import eventstore
from sentry.event_manager import EventManager
@pytest.fixture
def make_frames_snapshot(insta_snapshot):
def inner(data):
mgr = EventManager(data={"stacktrace": {"frames": [data]}})
mgr.nor... | [
"[email protected]"
] | |
e259df553081c2a0843857a31971fbeb29ab02d1 | 8c9df3465ec7cab68b10e67823c1f9b475dab68e | /square__transverse_longitudinal_field_af_ising__static/square_ising.py | 12dad1d1699c6934cd3da33fb9d3ea8f37bdd5f5 | [
"BSD-3-Clause"
] | permissive | deyh2020/quspin_example | f86cf3cea2b8c04efc017e9618cb935494e94f82 | 931ca2ea5e6bbe02ebdd6d6a22d90db24d6c760c | refs/heads/master | 2023-02-07T21:27:12.913763 | 2020-12-30T08:00:57 | 2020-12-30T08:00:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,427 | py | ## http://weinbe58.github.io/QuSpin/generated/quspin.basis.spin_basis_general.html#quspin.basis.spin_basis_general
## https://doi.org/10.1103/PhysRevX.8.021069
## https://doi.org/10.1103/PhysRevX.8.021070
## consider nearest neighbor Ising
from __future__ import print_function, division
from quspin.operators import ham... | [
"[email protected]"
] | |
7534fdc5e9d0e271082d603c5c0a1ba2262d679e | 873d858b79a51a6a14e74e1a6fe4cc97809a69bc | /rosserial_ws/devel/lib/rosserial_client/make_library.py | eed0f221f32c99f4c790655eeb0d5132d20cacf2 | [] | no_license | nichoteloo/ROS-Noetic-devel | cf3058014fc491f38a23426c136cb8fbdee7a397 | 81e7090c5dc0e548aed4aa57b9579e355e9bcd25 | refs/heads/master | 2023-05-07T19:21:03.804523 | 2021-06-02T21:13:48 | 2021-06-02T21:13:48 | 373,293,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 597 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# generated from catkin/cmake/template/script.py.in
# creates a relay to a python script source file, acting as that file.
# The purpose is that of a symlink
python_script = '/home/nichotelo/ros/rosserial_ws/src/rosserial/rosserial_client/src/rosserial_client/make_library.py'
... | [
"[email protected]"
] | |
dde7d82754424f14d0b28a6142c13333535560f6 | e3adbec6cd8d0b50880b3b606352a1c751d4ac79 | /functions/singly_linked_list.py | 7cadf3954044adea1f9fcd0cccd0b5268d96d8b1 | [] | no_license | ZiyaoGeng/LeetCode | 3cc5b553df5eac2e5bbb3ccd0f0ed4229574fa2f | c4c60b289c0bd9d9f228d04abe948d6287e70ea8 | refs/heads/master | 2022-04-07T08:19:58.647408 | 2020-03-12T08:56:13 | 2020-03-12T08:56:13 | 218,981,503 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
| [
"[email protected]"
] | |
811e650b58eaf4337be5d070b3152062620dfaa4 | 1d1a21b37e1591c5b825299de338d18917715fec | /Mathematics/Data science/Mathmatics/02/inverse_matrix.py | 5531c0cc7924c0fa9e1eb9313e95e425439086b8 | [] | no_license | brunoleej/study_git | 46279c3521f090ebf63ee0e1852aa0b6bed11b01 | 0c5c9e490140144caf1149e2e1d9fe5f68cf6294 | refs/heads/main | 2023-08-19T01:07:42.236110 | 2021-08-29T16:20:59 | 2021-08-29T16:20:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | import numpy as np
A = np.array([[1,1,0],[0,1,1],[1,1,1]])
print(A)
'''
[[1 1 0]
[0 1 1]
[1 1 1]]
'''
# 역행렬(inverse_matrix 계산)
Ainv = np.linalg.inv(A)
print(Ainv)
'''
[[ 0. -1. 1.]
[ 1. 1. -1.]
[-1. 0. 1.]]
'''
| [
"[email protected]"
] | |
f327af434bdb44b8db26624273fa576fedb584a9 | 371fe9a1fdeb62ad1142b34d732bde06f3ce21a0 | /scripts/compute_path_pair_distances.py | 32499ed5d2cd2871d18a77acc24343b70b16f798 | [] | no_license | maickrau/rdna_resolution | 971f3b7e803565c9432be69b8e2a2852f55b8b79 | aab42310c31e655cbbc318331082fa3436d69075 | refs/heads/master | 2023-03-03T05:14:33.966930 | 2021-02-17T20:45:20 | 2021-02-17T20:45:20 | 339,851,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,426 | py | #!/usr/bin/python
import sys
graphfile = sys.argv[1]
max_diff = int(sys.argv[2])
modulo = int(sys.argv[3])
moduloindex = int(sys.argv[4])
# name \t path from stdin
def revcomp(s):
comp = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
return "".join(comp[c] for c in s[::-1])
def pathseq(p):
global nodeseqs
seq_no_h... | [
"[email protected]"
] | |
598aa5789fc89d20614a949df27117f073692147 | b2c780661aec8076a0b6d00bf8ea0d443a117df6 | /Popularity/DCAFPilot/test/utils_t.py | b5af29934995578af40c4def334385a5c2d302eb | [] | no_license | maitdaoud/DMWMAnalytics | 894fa2afb8d83a5275f0abd61b74f4f839150cb0 | fec7ef3e5240973db96ba53179940950002adbd8 | refs/heads/master | 2020-04-11T03:33:43.164136 | 2017-04-01T14:07:42 | 2017-04-01T14:07:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 975 | py | #!/usr/bin/env python
#pylint: disable-msg=C0301,C0103
"""
Unit test for StorageManager class
"""
import os
import re
import time
import unittest
from pymongo import MongoClient
from DCAF.utils.utils import popdb_date, ndays
class testStorageManager(unittest.TestCase):
"""
A test class for the StorageManag... | [
"[email protected]"
] | |
3c699961c03db0286e4b397de0a722d189504754 | 30e2a85fc560165a16813b0486a862317c7a486a | /datastruct_algorithm/jan.py | bb5cbcfb654440320b08cce91cc4251879eb8dfd | [] | no_license | muryliang/python_prac | 2f65b6fdb86c3b3a44f0c6452a154cd497eb2d01 | 0301e8f523a2e31e417fd99a968ad8414e9a1e08 | refs/heads/master | 2021-01-21T11:03:48.397178 | 2017-09-18T04:13:27 | 2017-09-18T04:13:27 | 68,801,688 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,328 | py | import time
import sys
def perform(a, b, goal, failset, trueset):
"""a is limaL, b is limbL, failset is a list failseting action"""
# time.sleep(1)
# print(a, b)
global lima
global limb
res = False
if a == goal or b == goal or a + b == goal:
return True
if res is False and a > 0... | [
"[email protected]"
] | |
3724941a22eb118782c4c142d7dc6097e8d37e35 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/instances/nistData/atomic/integer/Schema+Instance/NISTXML-SV-IV-atomic-integer-fractionDigits-1-3.py | 32add0c922d5342c7b50eaabb85bc7ee39adc0d0 | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 297 | py | from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_fraction_digits_1_xsd.nistschema_sv_iv_atomic_integer_fraction_digits_1 import NistschemaSvIvAtomicIntegerFractionDigits1
obj = NistschemaSvIvAtomicIntegerFractionDigits1(
value=825606520242485152
)
| [
"[email protected]"
] | |
cca9f2e5ed6c7cd9fe744913449f05e61d1ed854 | 8a47ab47a101d4b44dd056c92a1763d5fac94f75 | /力扣/简单练习/300-最长上升子序列.py | edecfbee733ea3c1f051716235583aa67c1a5524 | [] | no_license | Clint-cc/Leecode | d5528aa7550a13a5bcf2f3913be2d5db2b5299f3 | 8befe73ab3eca636944800e0be27c179c45e1dbf | refs/heads/master | 2020-09-14T07:35:41.382377 | 2020-07-01T01:27:18 | 2020-07-01T01:27:18 | 223,066,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | # !D:/Code/python
# -*- coding:utf-8 -*-
# @Author : Clint
# @Question : 给定一个无序的整数数组,找到其中最长上升子序列的长度。
def lengthOfLIS(nums):
'''
思路:遍历数组,当前的下一个元素大于当前,count+1,当不大于时比较count和max_count,
最后输出max_count
这题有坑: 输入[10,9,2,5,3,7,101,18],输出4,解释:最长的上升子序列是 [2,3,7,101],它的长度是 4
:param nums:
:return:
... | [
"[email protected]"
] | |
119da14a29035eb8a5b1c9ba0c64dc7cb316c170 | fab39aa4d1317bb43bc11ce39a3bb53295ad92da | /nncf/tensorflow/graph/pattern_operations.py | 23435d263c3de7adf57353e47709a005e220e0df | [
"Apache-2.0"
] | permissive | dupeljan/nncf | 8cdce27f25f01ce8e611f15e1dc3036fb8548d6e | 0abfd7103ca212888a946ba4d0fbdb9d436fdaff | refs/heads/develop | 2023-06-22T00:10:46.611884 | 2021-07-22T10:32:11 | 2021-07-22T10:32:11 | 388,719,455 | 0 | 0 | Apache-2.0 | 2021-07-23T07:46:15 | 2021-07-23T07:43:43 | null | UTF-8 | Python | false | false | 3,416 | py | """
Copyright (c) 2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | [
"[email protected]"
] | |
d4b3c37168303b568f64ff5fef401bc1cc1264b2 | 3400394303380c2510b17b95839dd4095abc55a4 | /src/py310/lesson02/comments.py | a4dca2ef7c776bd871c81c1adcdd13adb12c2fce | [
"MIT"
] | permissive | IBRAR21/py310_sp2021 | daf53b76decf060d72201a3db66f0f7c697876a7 | 584e37b9d96654c1241fc787d157c292301d5bf7 | refs/heads/master | 2023-05-30T16:43:09.614565 | 2021-06-09T21:41:14 | 2021-06-09T21:41:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,828 | py | # --------------------------------------------------------------------------------- #
# AQUABUTTON wxPython IMPLEMENTATION
#
# Andrea Gavana, @ 07 October 2008
# Latest Revision: 24 Nov 2011, 22.00 GMT
#
#
# TODO List
#
# 1) Anything to do?
#
#
# For all kind of problems, requests of enhancements and bug reports, pleas... | [
"[email protected]"
] | |
3b4b65765a6275e2b4fed60d9412aac3f7fb9665 | d12b59b33df5c467abf081d48e043dac70cc5a9c | /ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/passcriteria_985f11fda90dc3b8dac84a4a881b8740.py | 6920d6cfe8478b76037b42d0c156e50d2daa5519 | [
"MIT"
] | permissive | ajbalogh/ixnetwork_restpy | 59ce20b88c1f99f95a980ff01106bda8f4ad5a0f | 60a107e84fd8c1a32e24500259738e11740069fd | refs/heads/master | 2023-04-02T22:01:51.088515 | 2021-04-09T18:39:28 | 2021-04-09T18:39:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,492 | py | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | [
"[email protected]"
] | |
ec356e53c4d259f06b48074389ec9b57fb66f575 | 199522cb43b4e2c7e3bf034a0e604794258562b1 | /0x03-python-data_structures/7-add_tuple.py | 96d715528f3d23cdf3d725a9838247a97a8e4635 | [] | no_license | jormao/holbertonschool-higher_level_programming | a0fd92f2332f678e6fe496057c04f2995d24a4ac | 360b3a7294e9e0eadcadb57d4c48c22369c05111 | refs/heads/master | 2020-09-29T01:36:20.094209 | 2020-05-15T03:27:06 | 2020-05-15T03:27:06 | 226,915,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | #!/usr/bin/python3
def add_tuple(tuple_a=(), tuple_b=()):
if len(tuple_a) != 2:
if len(tuple_a) == 1:
tuple_a = (tuple_a[0], 0)
if len(tuple_a) == 0:
tuple_a = (0, 0)
if len(tuple_b) != 2:
if len(tuple_b) == 1:
tuple_b = (tuple_b[0], 0)
if len(... | [
"[email protected]"
] | |
796a852c4ccdd0bc598e0b373567c854094d0cfd | 45fb509bf21ac003a40fd404d7c0cc995e741672 | /perceptron_algorithm/perceptron_algo_2nd_method.py | 59807adb1a2c854110b8644f2b103f49899851f4 | [] | no_license | FarahAgha/MachineLearning | 0d17511f7495190dfd2368554428208c7d0eadf7 | cf385135e016a63fb16bd326586fcd8ecb3c4355 | refs/heads/master | 2021-01-04T01:03:08.810401 | 2020-03-15T18:42:16 | 2020-03-15T18:42:16 | 240,314,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,011 | py | # Perceptron Algorithm perceptron_algo_2nd_method.py
# See https://medium.com/@thomascountz/19-line-line-by-line-python-perceptron-b6f113b161f3 for details.
import numpy as np
class Perceptron(object):
def __init__(self, no_of_inputs, threshold=100, learning_rate=0.01):
self.threshold = threshold
... | [
"[email protected]"
] | |
f9dd6d91e8aaee9919ed20cb74c14fc6f2d22c8b | 44c81d8cc9c148c93cf9a77faec345693059c973 | /fetch.py | 568adf1e9271c6ebe976f93a3b0c8306a2ea428a | [] | no_license | neoatlantis/currency-data | 26566a5131b814f324153db451ae9f879fda9b72 | c19bc94d6d6ba6706f625e94e176b77bee455b04 | refs/heads/master | 2020-06-10T19:02:58.973856 | 2016-12-08T06:35:46 | 2016-12-08T06:35:46 | 75,902,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,231 | py | #!/usr/bin/env python
import os
import time
import requests
import shelve
import sys
BASEPATH = os.path.realpath(os.path.dirname(sys.argv[0]))
filepath = lambda *i: os.path.join(BASEPATH, *i)
# check for api key
try:
apikeyFilepath = filepath('apikey')
apikey = open(apikeyFilepath).read().strip()
except:
... | [
"[email protected]"
] | |
179abd03f2ae118cfb2b85da6360707ead06748a | 1b10b46afdf24b4ce4f2d57e315e09e17c0a9c2b | /winding_helix.py | 51d16cff03b2651355fadbdb7bd2a560ed49af5b | [] | no_license | tthtlc/sansagraphics | e6aad1541dabc85b3871e1890c9f79aa33055355 | 113e559fb128c93ed1f02155ec74e76878b86c37 | refs/heads/master | 2021-01-15T15:52:35.126301 | 2020-03-30T16:58:57 | 2020-03-30T16:58:57 | 15,507,431 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,415 | py | # Pygame/PyopenGL example by Bastiaan Zapf, Apr 2009
### From http://python-opengl-examples.blogspot.sg/
#
# Draw an helix, wiggle it pleasantly
#
# Keywords: Alpha Blending, Textures, Animation, Double Buffer
from OpenGL.GL import *
from OpenGL.GLU import *
from math import * # trigonometry
import pygame # just t... | [
"[email protected]"
] | |
c4bbebeeaa1fede9542e856ca68e24409905d33f | c0f808504dd3d7fd27c39f1503fbc14c1d37bf9f | /sources/scipy-scipy-414c1ab/scipy/io/tests/test_wavfile.py | 266775ecd99e28e8010c480d95ff5fce9e266339 | [] | no_license | georgiee/lip-sync-lpc | 7662102d4715e4985c693b316a02d11026ffb117 | e931cc14fe4e741edabd12471713bf84d53a4250 | refs/heads/master | 2018-09-16T08:47:26.368491 | 2018-06-05T17:01:08 | 2018-06-05T17:01:08 | 5,779,592 | 17 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,146 | py | import os
import tempfile
import warnings
import numpy as np
from numpy.testing import assert_equal, assert_, assert_raises, assert_array_equal
from numpy.testing.utils import WarningManager
from scipy.io import wavfile
def datafile(fn):
return os.path.join(os.path.dirname(__file__), 'data', fn)
def test_read_1... | [
"[email protected]"
] | |
41cc8cb8ec10ccb8c7eb432e8f3cc4602df5f651 | d043a51ff0ca2f9fb3943c3f0ea21c61055358e9 | /python3网络爬虫开发实战/数据存储/MySQL实验/删除数据2.py | 7af2d45b23cc102f658c4407ee7362981f7f0c80 | [] | no_license | lj1064201288/dell_python | 2f7fd9dbcd91174d66a2107c7b7f7a47dff4a4d5 | 529985e0e04b9bde2c9e0873ea7593e338b0a295 | refs/heads/master | 2020-03-30T03:51:51.263975 | 2018-12-11T13:21:13 | 2018-12-11T13:21:13 | 150,707,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | import pymysql
db = pymysql.connect(host="localhost", user='root', password='123456', port=3306, db='django')
cursor = db.cursor()
table = "friends"
age = "age > 30"
sql = 'DELETE FROM {table} WHERE {age}'.format(table=table, age=age)
try:
cursor.execute(sql)
print("Successful...")
db.commit()
except:
... | [
"[email protected]"
] | |
92ed6a36ac6f7be76144f403a841125f2a79c943 | 633c18a9e1931f937f7f91f05ce9749a4ac169f6 | /work_with_pythest/tests/test_math.py | 05d5b8bf6daeef827b40a6d56148b1075e179af4 | [] | no_license | borko81/python_scripts | fb3ff79377f19233e18d20f4f150735cdbe52c29 | 4e8ed38550f3b90bc00c07605d7e92822b079206 | refs/heads/master | 2022-07-07T19:26:52.467714 | 2022-06-24T15:46:57 | 2022-06-24T15:46:57 | 224,904,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | import pytest
def test_one_plus_one():
assert 1 + 1 == 2
def test_one_plust_two():
a = 1
b = 2
c = 3
assert a + b == c
def test_division_by_zero():
with pytest.raises(ZeroDivisionError) as e:
num = 1 / 0
assert 'division' in str(e.value)
| [
"[email protected]"
] | |
f2ebf591f742eb1433a9072d3c9826170e1cb8cd | 2f73a3d4daac2aa2c38c3443b4f5555c49faa1c8 | /Data.py | d8e917bf4fa96358299cdd241123799362a03919 | [] | no_license | 18021009/project | 656b6c8f9a0120c1185493d04405660895db93e9 | 0133f412e50e3dadd13bd0028832babf846070e5 | refs/heads/main | 2023-05-07T17:08:41.529766 | 2021-06-01T04:06:38 | 2021-06-01T04:06:38 | 372,696,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,718 | py | from math import nan
from os import name
from Station import station
import numpy as np
import datetime
import pandas as pd
from Map import map
from Point import point
# standardline date data.csv to college.csv
# ds = pd.read_csv('data.csv')
def changeToDate(output_file):
ds = pd.read_csv('data.csv')
day_d... | [
"[email protected]"
] | |
c08ce6dd49ab813444d35c3c9349c72f052e228b | 5e255ad1360c90478393744586663741a9569c21 | /linebot/models/base.py | 164fca9d9e9240236cfe90b9b6b2b37ba835814f | [
"Apache-2.0"
] | permissive | line/line-bot-sdk-python | d76268e8b542060d6eccbacc5dbfab16960ecc35 | cffd35948238ae24982173e30b1ea1e595bbefd9 | refs/heads/master | 2023-08-31T22:12:31.698183 | 2023-08-28T01:10:09 | 2023-08-28T01:10:09 | 70,553,423 | 1,898 | 1,181 | Apache-2.0 | 2023-09-11T05:14:07 | 2016-10-11T03:42:26 | Python | UTF-8 | Python | false | false | 4,121 | py | # -*- coding: utf-8 -*-
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | [
"[email protected]"
] | |
241b062d29b2a2e895a396fb385dd2ffb44bab96 | 3ff9821b1984417a83a75c7d186da9228e13ead9 | /No_1410_HTML Entity Parser/by_re_replacement.py | c017682935944a4f3a73df684c4c097a91d80e6d | [
"MIT"
] | permissive | brianchiang-tw/leetcode | fd4df1917daef403c48cb5a3f5834579526ad0c2 | 6978acfb8cb767002cb953d02be68999845425f3 | refs/heads/master | 2023-06-11T00:44:01.423772 | 2023-06-01T03:52:00 | 2023-06-01T03:52:00 | 222,939,709 | 41 | 12 | null | null | null | null | UTF-8 | Python | false | false | 3,076 | py | '''
Description:
HTML entity parser is the parser that takes HTML code as input and replace all the entities of the special characters by the characters itself.
The special characters and their entities for HTML are:
Quotation Mark: the entity is " and symbol character is ".
Single Quote Mark: the entity is &a... | [
"[email protected]"
] | |
f76d5f3aec244f5d33fcd7e2887d2eb61bb5658a | 0b25b1c2ea3e3f05ea388e1105cd2fab50e7ba54 | /mysite/blog/forms.py | 68ba9afdb13950be95db2f366aa5aebf783e6d1c | [] | no_license | webclinic017/Django-project | f8337aeb296d12760143951635d0297c13313a50 | e757aef633c63aaf857afd1f274d42d16703ca0c | refs/heads/master | 2022-12-25T17:30:14.503627 | 2020-10-12T08:47:08 | 2020-10-12T08:47:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | from django import forms
from .models import Comment
class EmailPostForm(forms.Form):
name = forms.CharField()
email = forms.EmailField()
to = forms.EmailField()
comments = forms.CharField(required=False,
widget=forms.Textarea)
class CommentForm(forms.ModelForm):
c... | [
"[email protected]"
] | |
91c2e382f455de622a8bfb58b1df4f5bbe6b01ff | e13a79dec2668c1870b3fea05f071fe872d400f0 | /pde/storage/tests/test_generic_storages.py | 474649dd328980f34d7df91ecac637408b9e3bd6 | [
"MIT"
] | permissive | yiweizhang1025/py-pde | b27cc0b058b50d6af921e1ea84bf59a5bb0ff370 | 3862a35505b9ce4d62557bc65dfedd40638a90f3 | refs/heads/master | 2023-03-14T17:21:07.004742 | 2021-03-15T15:33:47 | 2021-03-15T15:33:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,739 | py | """
.. codeauthor:: David Zwicker <[email protected]>
"""
import functools
import numpy as np
import pytest
from pde import DiffusionPDE, FileStorage, MemoryStorage, UnitGrid
from pde.fields import FieldCollection, ScalarField, Tensor2Field, VectorField
from pde.tools.misc import module_available
def test_st... | [
"[email protected]"
] | |
7b1bd474762dbf9fa0ad77e916a9a288222c806a | 44494598f8edcee0319f3b4ef69b704fbf6d88f2 | /code/twurtle/src/TestDCMotorRobot.py | aad26a3b8a287a62bb2e513d1e4b4b865f1e0879 | [] | no_license | whaleygeek/pyws | 3cebd7e88b41e14d9c1e4dbb8148de63dadbdd57 | e60724646e49287f1e12af609f325ac228b31512 | refs/heads/master | 2021-01-02T09:01:47.644851 | 2014-09-02T19:47:20 | 2014-09-02T19:47:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | # This is mainly to test that the packaging has worked for robot correctly
import robot
r = robot.MotorRobot(robot.DCMotorDrive(a1=11, a2=12, b1=13, b2=14))
r.test()
| [
"[email protected]"
] | |
a5f5ad934ab6b4548d185c57b55e75a4fe701d2d | 75dcb56e318688499bdab789262839e7f58bd4f6 | /_algorithms_challenges/pybites/bitesofpy-master/!201-300/239/test_fizzbuzz.py | 374796ea04fb39da68675115964e7be47e23b93c | [] | no_license | syurskyi/Algorithms_and_Data_Structure | 9a1f358577e51e89c862d0f93f373b7f20ddd261 | 929dde1723fb2f54870c8a9badc80fc23e8400d3 | refs/heads/master | 2023-02-22T17:55:55.453535 | 2022-12-23T03:15:00 | 2022-12-23T03:15:00 | 226,243,987 | 4 | 1 | null | 2023-02-07T21:01:45 | 2019-12-06T04:14:10 | Jupyter Notebook | UTF-8 | Python | false | false | 483 | py | from fizzbuzz import fizzbuzz
# write one or more pytest functions below, they need to start with test_
def test_fizzbuzz_base():
assert fizzbuzz(1) == 1
assert fizzbuzz(2) == 2
def test_fizzbuzz_fizz():
assert fizzbuzz(3) == 'Fizz'
assert fizzbuzz(6) == 'Fizz'
def test_fizzbuzz_buzz():
assert fi... | [
"[email protected]"
] | |
ef9b5b666e8749d77a7b64d744affbcd8a64a543 | 963cac9e78c4b742f7e7800200de8d1582799955 | /test/veetou/parserTests.py | 797c7be4f0f217a2fd7bbe13910a3ec1cd8fde32 | [] | no_license | ptomulik/veetou | c79ceb3ca3d7ef7b261b2219489b6f0a7a83e1fa | b30be2a604f4426f832ec9805547ecd6cc9083fe | refs/heads/master | 2021-01-22T17:28:57.271251 | 2019-01-05T01:46:43 | 2020-05-04T16:23:44 | 85,016,513 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,386 | py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
import unittest
import veetou.parser as parser
class Test__Parser(unittest.TestCase):
def test__funcions_symbols__1(self):
self.assertIs(parser.dictmatcher , parser.functions_.dictmatcher)
self.assertIs(parser.fullmatch , parser.functions_... | [
"[email protected]"
] | |
832a298328bc29b34d0110a3029f906ad483a34d | 37c3b81ad127c9e3cc26fa9168fda82460ca9bda | /Baekjoon/boj_20055_컨베이어 벨트 위의 로봇.py | dfdb3152402dc2cfac4c545e7cd087fba933dcf0 | [] | no_license | potomatoo/TIL | 5d85b69fdaed68966db7cfe2a565b7c64ed3e816 | 395dc190fa13e5ed036e1e3c7d9e0bc2e1ee4d6c | refs/heads/master | 2021-07-08T16:19:40.410097 | 2021-04-19T02:33:40 | 2021-04-19T02:33:40 | 238,872,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | def work():
global cnt
while True:
board.rotate(1)
robot.rotate(1)
robot[N-1] = 0
for i in range(N-2, -1, -1):
if robot[i] and not robot[i+1] and board[i+1] > 0:
board[i+1] -= 1
robot[i+1] = 1
robot[i] = 0
robot[... | [
"[email protected]"
] | |
9305c3a78026026cae6e03d11b5982d9cee7f094 | 0617c812e9bf58a2dbc1c1fef35e497b054ed7e4 | /venv/Lib/site-packages/pyrogram/raw/functions/stats/get_megagroup_stats.py | 320398dd3f9fb86f271aeb14aaca77b3bc298f8c | [] | no_license | howei5163/my_framework | 32cf510e19a371b6a3a7c80eab53f10a6952f7b2 | 492c9af4ceaebfe6e87df8425cb21534fbbb0c61 | refs/heads/main | 2023-01-27T14:33:56.159867 | 2020-12-07T10:19:33 | 2020-12-07T10:19:33 | 306,561,184 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,553 | py | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | [
"houwei5163"
] | houwei5163 |
b645ed1a0ad19262304bef16a69381cbb05cbc2c | 4a211e279ec89239033c5fe2d6d8d3e49b48d369 | /salvo/src/lib/job_control_loader.py | d179d460ec8b996e850b26e0c4f04fbb774d9d79 | [
"Apache-2.0"
] | permissive | envoyproxy/envoy-perf | cfb1e8f7af806600f11ebc235c1a72939420b087 | d131bc2f1a7f8ae4f640da30fd30c027735d9788 | refs/heads/main | 2023-08-31T14:02:50.891888 | 2023-08-24T16:19:26 | 2023-08-24T16:19:26 | 94,845,161 | 109 | 29 | Apache-2.0 | 2023-08-24T16:19:28 | 2017-06-20T03:20:02 | Python | UTF-8 | Python | false | false | 3,111 | py | """This object abstracts the loading of json strings into protobuf objects."""
import json
import logging
import yaml
from google.protobuf import json_format
import api.control_pb2 as proto_control
log = logging.getLogger(__name__)
def _load_json_doc(filename: str) -> proto_control.JobControl:
"""Load a disk file... | [
"[email protected]"
] | |
b14adaf5a89b66b23c4ea53b5a93cd242caca777 | 0f16edb46a48f9b5a125abb56fc0545ede1d65aa | /test_utilities/src/d1_test/mock_api/tests/test_get.py | d1eaef95d18355fd89576cc41c693343b6516ba0 | [
"Apache-2.0"
] | permissive | DataONEorg/d1_python | 5e685f1af0c356190f2d6df45d1ac849e2f56972 | d72a9461894d9be7d71178fb7310101b8ef9066a | refs/heads/master | 2023-08-29T03:16:38.131760 | 2023-06-27T21:59:37 | 2023-06-27T21:59:37 | 60,103,877 | 15 | 12 | Apache-2.0 | 2023-09-06T18:27:53 | 2016-05-31T16:01:00 | Python | UTF-8 | Python | false | false | 2,721 | py | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | [
"[email protected]"
] | |
fe69d824ce277807f6d3e0d5eaaff8a66490ae4b | b1bc2e54f8cd35c9abb6fc4adb35b386c12fe6b4 | /otp/src/level/ModelEntity.py | 5850215d12244dd9e104ca4eebaf6cf5fd012828 | [] | no_license | satire6/Anesidora | da3a44e2a49b85252b87b612b435fb4970469583 | 0e7bfc1fe29fd595df0b982e40f94c30befb1ec7 | refs/heads/master | 2022-12-16T20:05:13.167119 | 2020-09-11T16:58:04 | 2020-09-11T17:02:06 | 294,751,966 | 89 | 32 | null | null | null | null | UTF-8 | Python | false | false | 4,052 | py | from toontown.toonbase.ToontownGlobals import *
from direct.directnotify import DirectNotifyGlobal
import BasicEntities
class ModelEntity(BasicEntities.NodePathEntity):
LoadFuncs = {
'loadModelCopy': loader.loadModelCopy,
'loadModel': loader.loadModel,
'loadModelOnce': loader.loadModelOnce,... | [
"[email protected]"
] | |
bb35ccd3ccfc92a049807e3711182d740eb677b8 | eab2dc435028b2548554d97b24eb7b7e3576b953 | /iblrig/check_sync_pulses.py | b53097729443914a5879f7b454f1900b4316e049 | [
"MIT"
] | permissive | k1o0/iblrig | 35edd8570215ca591b1f1e26e47439e633aa587a | 9177b852b344a9bbc26e4a4aeb5f0182bd8a9b25 | refs/heads/master | 2021-05-24T12:58:47.552912 | 2020-02-25T20:19:59 | 2020-02-25T20:19:59 | 253,573,669 | 0 | 0 | MIT | 2020-04-06T17:48:28 | 2020-04-06T17:48:28 | null | UTF-8 | Python | false | false | 2,875 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author: Niccolò Bonacchi
# @Date: Monday, February 25th 2019, 2:10:38 pm
import logging
import sys
from pathlib import Path
import ibllib.io.raw_data_loaders as raw
import matplotlib.pyplot as plt
import numpy as np
from iblrig.misc import get_port_events
log = logging... | [
"[email protected]"
] | |
c43dee062a7499d04b64507171d861b11b09912e | df3c8c521a51f2b412118bd9d0e477da06a3b7cc | /build/view_environments/post_create_/create_post/create_post.py | 2a6a13f8a1551a30e01dd4e643e8f14b345f9bfd | [] | no_license | bharatmudragada/fb_post | c30b900731db5844df6b438e5d38a0dfb607412a | c5e7bb185a561bdcfcd7b2e30264554b07106044 | refs/heads/master | 2020-06-21T04:05:22.296755 | 2019-07-17T07:48:22 | 2019-07-17T07:48:22 | 197,339,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,835 | py | from django_swagger_utils.drf_server.decorators.request_response import request_response
from django_swagger_utils.drf_server.default.parser_mapping import PARSER_MAPPING
from django_swagger_utils.drf_server.default.renderer_mapping import RENDERER_MAPPING
from fb_post.build.serializers.definitions.PostContent.PostCont... | [
"[email protected]"
] | |
8608678850cf6031586f8b1bce7e8531244232c5 | 7869035b72807394154285d307e0597ee16f11d8 | /src/data_loader.py | 2a23407ac8c03daa931088d7b07b81b5ff04a48b | [] | no_license | tiffany70072/TokenPositioning | cb74edae92e19c16f8ca763935e56b0f2e698b85 | a2ab63640a2aff1abfccaa1c1486d8a97026ef0b | refs/heads/master | 2022-07-19T11:21:04.716882 | 2020-04-17T06:02:18 | 2020-04-17T06:02:18 | 254,995,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,225 | py | import numpy as np
import os
from sklearn.model_selection import train_test_split
def load_data(task, data_name, data_type):
if task == "autoenc-last" or task == 'token-posi':
assert data_type == "train" or data_type == "valid", "no this data type."
data_path = os.path.join("../data", data_name)
... | [
"[email protected]"
] | |
84fdc9040b3bcc55c94270233da3cce4c9b669d5 | babc56e88a3b5f5038be70ad676d5bd8f1bbf0d2 | /wind_direction_byo.py | 94bc6600dd5986d16cb2cf6d96ba20ac2a7f7738 | [] | no_license | VicenteYago/CustomWeatherStation | 873405ca16aa0b6f4f291cbc0068a6ea10aef745 | c655f947cca2cd0f8827c18f6f7a7c4c11ef4d43 | refs/heads/master | 2022-11-13T06:48:05.736830 | 2020-06-30T00:43:07 | 2020-06-30T00:43:07 | 269,812,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,408 | py | from gpiozero import MCP3008
import time
import math
adc = MCP3008(channel=0)
count = 0
values = []
volts = [0.4, 1.4, 1.2, 2.8,
2.9, 2.2, 2.5, 1.8,
2.0, 0.7, 0.8, 0.1,
0.3, 0.2, 0.6, 2.7]
volts_dic = {
0.4: 0.0,
1.4: 22.5,
1.2: 45.0,
2.8: 67.5,
2.7: 90.5,
2.9:... | [
"="
] | = |
b676c5cba48c2e1efd64286543f5f6aadfef51fd | ec0b8bfe19b03e9c3bb13d9cfa9bd328fb9ca3f1 | /res/packages/scripts/scripts/common/wotdecorators.py | 1554469a75cbd2eab8d57565f8457da484b5051a | [] | no_license | webiumsk/WOT-0.9.20.0 | de3d7441c5d442f085c47a89fa58a83f1cd783f2 | 811cb4e1bca271372a1d837a268b6e0e915368bc | refs/heads/master | 2021-01-20T22:11:45.505844 | 2017-08-29T20:11:38 | 2017-08-29T20:11:38 | 101,803,045 | 0 | 1 | null | null | null | null | WINDOWS-1250 | Python | false | false | 2,832 | py | # 2017.08.29 21:52:48 Střední Evropa (letní čas)
# Embedded file name: scripts/common/wotdecorators.py
import inspect
from functools import update_wrapper
from debug_utils import LOG_WRAPPED_CURRENT_EXCEPTION, CRITICAL_ERROR
from time_tracking import LOG_TIME_WARNING
import time
import time_tracking
def noexcept(func)... | [
"[email protected]"
] | |
218046a18f59c8cc6a566f6a16807e74d5250298 | a4e502e9487cf17c53f9f931ec0dbc12168fea52 | /packages/pyre/platforms/PackageManager.py | 0877270914d7a2f1326787f57abfbb1ac0125b31 | [
"BSD-3-Clause"
] | permissive | bryanvriel/pyre | bdc5dd59c46d53ff81f2ece532b9073ac3b65be1 | 179359634a7091979cced427b6133dd0ec4726ea | refs/heads/master | 2021-09-28T00:10:26.454282 | 2018-11-11T16:42:07 | 2018-11-11T16:42:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,373 | py | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2018 all rights reserved
#
# the framework
import pyre
# declaration
class PackageManager(pyre.protocol, family='pyre.platforms.packagers'):
"""
Encapsulation of host specific information
"""
# requirements
@pyre.provides... | [
"[email protected]"
] | |
68caed12611a8b789a1964a22fb49575eca70c7f | 76d388b5d2e74ff0eda748c7868fadf0704cf700 | /tensorpack/utils/develop.py | 496de1dd245db766c3e4ba256ddb638d5e621b48 | [
"Apache-2.0"
] | permissive | jooyounghun/tensorpack | eebf0867e5a82ffd52660dccfbd34879b8d0f5af | 90cdae380c40a1e91f627520c4a739bd6ee3f18b | refs/heads/master | 2020-03-23T23:24:41.651089 | 2018-07-27T02:57:19 | 2018-07-27T02:57:19 | 142,232,523 | 1 | 0 | Apache-2.0 | 2018-07-25T01:45:06 | 2018-07-25T01:45:05 | null | UTF-8 | Python | false | false | 4,773 | py | # -*- coding: utf-8 -*-
# File: develop.py
# Author: tensorpack contributors
""" Utilities for developers only.
These are not visible to users (not automatically imported). And should not
appeared in docs."""
import os
import functools
from datetime import datetime
import importlib
import types
import six
from . imp... | [
"[email protected]"
] | |
bcded7ca3347b631cb06ccb49aa49c5ef2291909 | 6cb18c62758bfbf783d3fabe851d1c4d9f323483 | /setup.py | 9319f44e05f51de89cc40224949e07be98a9e018 | [
"MIT"
] | permissive | bruinxiong/performer-pytorch | 68e505ff5e59d35e339b23661feef377795fd2df | c368b5e4efd46f72e2abaa655dc813021f911014 | refs/heads/main | 2023-01-04T02:25:42.898296 | 2020-10-26T22:41:09 | 2020-10-26T22:41:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | from setuptools import setup, find_packages
setup(
name = 'performer-pytorch',
packages = find_packages(exclude=['examples']),
version = '0.1.4',
license='MIT',
description = 'Performer - Pytorch',
author = 'Phil Wang',
author_email = '[email protected]',
url = 'https://github.com/lucidrains/perform... | [
"[email protected]"
] | |
a4c71809c35378bb39dbbce97d55d2a122ab4dcd | f51c6d0cebb27c377ce9830deec4b727b9b2ee90 | /AI/05_tictactoe/02grid_plot.py | b2fb6cbc7f65ddac4fc048c6664f6bdd82dfb227 | [] | no_license | dbbudd/Python-Experiments | 1c3c1322583aaaf2016a2f2f3061e6d034c5d1c8 | b6d294bf11a5c92b8578d16aa2f63cc27fc47b07 | refs/heads/master | 2020-04-17T02:21:36.693593 | 2019-01-17T00:18:34 | 2019-01-17T00:18:34 | 166,130,283 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,098 | py | #!/usr/bin/env python
import numpy as np
import itertools
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
class gameboard(object):
def __init__(self):
#player 1 puts a "X", player 2 puts a "O"
self.g = [[1,0,1],[0,0,2],[0,2,0]]
self.grid = np.arr... | [
"[email protected]"
] | |
1697ff12097d074fe9a08b7e8cfbf1ecd1348016 | cca89a7bbe2da907a38eb00e9a083f57597273f0 | /162. 寻找峰值/pythonCode.py | ecfc5d414241c3d0b4d2b4aac3531e9ced628696 | [] | no_license | xerprobe/LeetCodeAnswer | cc87941ef2a25c6aa1366e7a64480dbd72750670 | ea1822870f15bdb1a828a63569368b7cd10c6ab8 | refs/heads/master | 2022-09-23T09:15:42.628793 | 2020-06-06T16:29:59 | 2020-06-06T16:29:59 | 270,215,362 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,154 | py | from typing import List
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
def binarySearch(l:int,r:int) -> int:
if(l == r): return l
mid = (l + r) // 2
if(nums[mid] > nums[mid + 1]):
return binarySearch(l,mid)
else:
... | [
"[email protected]"
] | |
96eb58da2807780f7f78eb49453cd03e2e4a57bb | 33f30925224a7db3e3bf6948c6c569ad850e9c76 | /Server/bin/rst2xml.py | 6a7fab179644d60c2959331900cdea30a7350337 | [] | no_license | duelle/CTT | 2bc64fffaf4b2eb3976fedd7aea231a51da8fbe9 | e2da2ab9c599833cc8409728b456a9e37825986b | refs/heads/master | 2022-04-06T15:25:06.747919 | 2020-02-19T14:04:37 | 2020-02-19T14:04:37 | 237,939,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | #!/home/duelle/Repositories/git/RadonCTT/Server/bin/python
# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <[email protected]>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Docutils XML.
"""
try:
import l... | [
"[email protected]"
] | |
eba5e24cb7ae539f05831d88b27d99b2346a8f0a | ec9129d3eb1880df9f0b54c76510352a7e004b0c | /tools/make_vps_tarball.py | b03537feaa59ec1a6a93c522cfd621963bf12eba | [] | no_license | eugen-don/vps | 4057e6ddb1db274dbd8d78fa926376cfc3a40aa7 | 6a16569868241b35d8137b7f2b2f8db0cf67ff55 | refs/heads/master | 2021-01-11T16:29:53.109075 | 2014-05-14T09:20:33 | 2014-05-14T09:20:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | #!/usr/bin/env python
import sys
import os
import _env
import ops.os_init as os_init
import conf
assert conf.OS_IMAGE_DIR and os.path.isdir(conf.OS_IMAGE_DIR)
def usage():
print """usage: \n%s [image_path/partion_path] [tarball_dir]
""" % (sys.argv[0])
def main():
if len(sys.argv) < 3:
usage()
... | [
"[email protected]"
] | |
f716de44a80a10f01bfaa8b3a8d58b4ec092c945 | dbe1f4110921a08cb13e22ea325d503bd5627195 | /chuhuo_2.71/bluedon/monitor/sbin/checkproc.py | cd3521785adb14ce48baf65ec961b05655ab0e50 | [] | no_license | Hehouhua/waf_branches | 92dc1b1cbecba20f24ef6c7372dde7caa43f9158 | ca76f3a1ed8150b423474c9e37aee37841a5ee35 | refs/heads/main | 2023-01-07T11:33:31.667688 | 2020-11-03T06:58:33 | 2020-11-03T06:58:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | import os, re, sys
rexplogstart = re.compile(r'grep logstart.pl')
rexpwebvisit = re.compile(r'grep webvisit.pl')
def checklogstart():
if not os.path.exists("/usr/local/bdwaf/logs_bridge/data"):
os.popen("mkdir -p /usr/local/bdwaf/logs_bridge/data")
if not os.path.exists("/usr/local/bdwaf/logs_proxy/da... | [
"[email protected]"
] | |
dc95cfc1d53773ef74245ed5c8a5b6bbbf3ce933 | 65e076e4fcc00a67faa0932b3f3a3d3a3a11e2aa | /sdk/python/pulumi_google_native/datastore/v1/_enums.py | 15df09472641b2ebbeb23bd87aeab08fb357fbf9 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | TheJaySmith-Google/pulumi-google-native | 816babe5c7316724e02d5b8b9d789df00262bb8e | 566c295a39fe8c3dd16e4a7894ff6de72423e5da | refs/heads/master | 2023-06-05T06:45:19.979837 | 2021-06-23T11:42:27 | 2021-06-23T11:42:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 801 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'GoogleDatastoreAdminV1IndexedPropertyDirection',
'IndexAncestor',
]
class GoogleDatastoreAdminV1IndexedPr... | [
"[email protected]"
] | |
cef9a68afdddd61d9d2c7d5510d7a38174bc8f1c | 4b68243d9db908945ee500174a8a12be27d150f9 | /pogoprotos/networking/requests/messages/update_fitness_metrics_message_pb2.py | 522382d168f4fe3adab53afbb40fe730c7070bd9 | [] | no_license | ykram/pogoprotos-py | 7285c86498f57dcbbec8e6c947597e82b2518d80 | a045b0140740625d9a19ded53ece385a16c4ad4a | refs/heads/master | 2020-04-20T10:19:51.628964 | 2019-02-02T02:58:03 | 2019-02-02T02:58:03 | 168,787,721 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 2,937 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/networking/requests/messages/update_fitness_metrics_message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import messa... | [
"[email protected]"
] | |
22ffc7c4ae1f6b16b2ece3c70722f0a2d0ec48c5 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2480/59018/262642.py | 80da0919c460c290863470859367203af1d15933 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 281 | py | def even_odd(N,a):
b=[]
for j in a:
if j%2==0:
b.append(j)
a.pop(j)
c=b+a
return c
T=int(input())
for i in range(T):
N=int(input())
info=input().split(' ')
a=[int(y) for y in info]
print(even_odd(N,a))
| [
"[email protected]"
] | |
66e5e2cd1dd250b00922b3b3211b1c0c1c510d35 | 53565e19de1d345552f5f469f4e4ea311a421bb8 | /app/artist/models/artist.py | de30a6078bcfde1cf589a711184a2c568c8bfd52 | [] | no_license | standbyme227/fc-melon | 18e17aa8b85906a62e1631e54a70ff85d72ea435 | 8f0f4d40021f75a025e91fa6aebea143bccb6ce3 | refs/heads/master | 2021-05-03T18:59:13.495171 | 2018-03-20T02:32:02 | 2018-03-20T02:32:02 | 120,418,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,632 | py | from django.conf import settings
from django.db import models
from django.forms import model_to_dict
from django.http import JsonResponse, HttpResponse
from .artist_youtube import ArtistYouTube
from .managers import ArtistManager
__all__ = (
'Artist',
)
class Artist(models.Model):
BLOOD_TYPE_A = 'a'
BLO... | [
"[email protected]"
] | |
ac071ec7c195c0c7838f31cdd9f41fe37a46ad9c | a44a9279258ace54be0ea6d410e6ddb5a2d72bcb | /project-addons/custom_reports/models/product.py | 719faf154fd24aa8c981b08a03877ad3b5b456aa | [] | no_license | athlontado/PXGO_00064_2014_PHA | 346f33185a07c2e1766a7cc79cd300252d9b2480 | 3086baba490e47a5dcc7942c7c5fee9fc047ddcd | refs/heads/master | 2020-04-06T03:56:15.828784 | 2016-04-18T12:24:53 | 2016-04-18T12:24:53 | 59,216,028 | 0 | 0 | null | 2016-05-19T14:50:54 | 2016-05-19T14:50:54 | null | UTF-8 | Python | false | false | 1,240 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Pharmadus. All Rights Reserved
# $Óscar Salvador <[email protected]>$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... | [
"[email protected]"
] | |
2b2a54641d5f56d801a5a0f1798713935087ef28 | 09e5cfe06e437989a2ccf2aeecb9c73eb998a36c | /modules/cctbx_project/simtbx/run_tests.py | 5c3244e65192c78f2e1b57410133b5e40024a0a5 | [
"BSD-3-Clause",
"BSD-3-Clause-LBNL"
] | permissive | jorgediazjr/dials-dev20191018 | b81b19653624cee39207b7cefb8dfcb2e99b79eb | 77d66c719b5746f37af51ad593e2941ed6fbba17 | refs/heads/master | 2020-08-21T02:48:54.719532 | 2020-01-25T01:41:37 | 2020-01-25T01:41:37 | 216,089,955 | 0 | 1 | BSD-3-Clause | 2020-01-25T01:41:39 | 2019-10-18T19:03:17 | Python | UTF-8 | Python | false | false | 468 | py | from __future__ import absolute_import, division, print_function
from libtbx import test_utils
import libtbx.load_env
tst_list = (
"$D/nanoBragg/tst_nanoBragg_minimal.py",
"$D/nanoBragg/tst_nanoBragg_mosaic.py",
"$D/nanoBragg/tst_gaussian_mosaicity.py",
)
def run():
build_dir = libtbx.env.under_buil... | [
"[email protected]"
] | |
80d457fe0e0df539d494873fa3d8e41ce774ae0b | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1/palemale/a.py | f78d73ef5adea50522114802f390513ce3e2cfff | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 810 | py | import os, sys
with open(sys.argv[1], 'r') as infile:
N = int(infile.readline().strip())
for x in xrange(1, N+1):
T = infile.readline().strip()
cases = set(list(T))
intT = int(T)
current = intT
count = 2
stablecount = 0
while len(cases) < 10:
... | [
"[[email protected]]"
] | |
0bf9f14a7d8f3b313cb14ebe38a4ae36709d9164 | 92237641f61e9b35ff6af6294153a75074757bec | /Algorithm/programmers/lv2/lv2_짝지어 제거하기.py | dc49c17ce25e718214f85eb4831fb672b343a239 | [] | no_license | taepd/study | 8ded115765c4f804813e255d9272b727bf41ec80 | 846d3f2a5a4100225b750f00f992a640e9287d9c | refs/heads/master | 2023-03-08T13:56:57.366577 | 2022-05-08T15:24:35 | 2022-05-08T15:24:35 | 245,838,600 | 0 | 1 | null | 2023-03-05T23:54:41 | 2020-03-08T15:25:15 | JavaScript | UTF-8 | Python | false | false | 278 | py | def solution(s):
stack = []
for e in s:
if not stack:
stack.append(e)
else:
if stack[-1] == e:
stack.pop()
else:
stack.append(e)
if stack:
return 0
else:
return 1 | [
"[email protected]"
] | |
69b384952afa18b41fb769869d637c21f4a61bbb | 2075052d028ed31a30bdb9acb0a2022c2634f52b | /chat/consumers.py | 761dd8369a35c0e33e7d8ef65e1ce163904ade18 | [] | no_license | igoo-Y/live_chat_app | b67704caa2e5944b131a4299716e501b555985b5 | d65c87a35d3f3a120da35290addb798e412dad72 | refs/heads/main | 2023-06-30T13:21:49.860265 | 2021-08-03T09:11:29 | 2021-08-03T09:11:29 | 392,256,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,140 | py | import json
from channels.generic.websocket import AsyncWebsocketConsumer
class ChatConsumer(AsyncWebsocketConsumer):
async def connect(self):
self.room_name = self.scope["url_route"]["kwargs"]["room_name"]
self.room_group_name = "chat_%s" % self.room_name
# Join room group
await ... | [
"[email protected]"
] | |
aa41fbd83ac1923d6fda08de4cc8f3ebd55904e0 | 90390ddcc21d2f2c0dd5ee3c0e7a3d8d61be9638 | /wsgi/app/forms.py | 4141cbb7183fc430344eb1bf806ca44a244d8598 | [
"MIT"
] | permissive | pjamesjoyce/lcoptview_legacy | b27926e31c16f1fca07c6294e66d706fcb600682 | e0ebeb155d6f62d8619d33cf48db98bab8b7a4cd | refs/heads/master | 2021-07-16T11:38:58.451239 | 2017-09-26T10:43:50 | 2017-09-26T10:43:50 | 107,691,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | from flask_wtf import FlaskForm
from wtforms import TextField, PasswordField
from wtforms.validators import DataRequired
class LoginForm(FlaskForm):
login_data = TextField('username or email', validators=[DataRequired()])
password = PasswordField('password', validators=[DataRequired()])
class RegistrationFo... | [
"[email protected]"
] | |
3823340ea644b2feec0858721dad3a7c2d67d330 | 1b597dd7630f9a3023faf557e383b0fae703e72b | /test_autogalaxy/unit/aggregator/test_aggregator.py | 40b7acd97191da8084e06012b80ef34395849c57 | [
"MIT"
] | permissive | knut0815/PyAutoGalaxy | 96e9dfc558182169c41e19d3297cdf46b42d5f77 | cc2bc0db5080a278ba7519f94d2a8b2468141e2d | refs/heads/master | 2023-03-05T00:59:51.594715 | 2021-02-09T18:21:30 | 2021-02-09T18:21:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,428 | py | from os import path
import pytest
import autofit as af
import autogalaxy as ag
from autogalaxy.mock import mock
directory = path.dirname(path.realpath(__file__))
@pytest.fixture(name="path")
def make_path():
return path.join("{}".format(path.dirname(path.realpath(__file__))), "files")
@pytest... | [
"[email protected]"
] | |
a11962ae95b28d1923e23d0a5c514d53c454524e | 7889f7f0532db6a7f81e6f8630e399c90438b2b9 | /3.7.1/_downloads/a54f19823bde998a456571636498aa98/auto_subplots_adjust.py | bd6326b8291f4b1a16db182e1f642d2279a8f0b0 | [] | no_license | matplotlib/matplotlib.github.com | ef5d23a5bf77cb5af675f1a8273d641e410b2560 | 2a60d39490941a524e5385670d488c86083a032c | refs/heads/main | 2023-08-16T18:46:58.934777 | 2023-08-10T05:07:57 | 2023-08-10T05:08:30 | 1,385,150 | 25 | 59 | null | 2023-08-30T15:59:50 | 2011-02-19T03:27:35 | null | UTF-8 | Python | false | false | 3,366 | py | """
===============================================
Programmatically controlling subplot adjustment
===============================================
.. note::
This example is primarily intended to show some advanced concepts in
Matplotlib.
If you are only looking for having enough space for your labels, i... | [
"[email protected]"
] | |
b28bbc203b60e128307f6f9d8d309793f3dc1e1a | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /yXZhG7zq6dWhWhirt_24.py | 1b4a59876a63f5dfdb4b9e7de1d41c308c735314 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py |
def is_prime(n):
if (n==1):
return False
for i in range(2,round(n**(0.5))+1):
if i!=n and (n%i)==0:
return False
return True
def filter_primes(num):
return [n for n in num if is_prime(n)]
| [
"[email protected]"
] | |
bbda84923f2c455dc60051aa1e126bf4dd187233 | 4a88ec266b64521fcaef88d92cb2b57776d3192b | /powerUsageNotification/powerUsageNotification.py | 132c11551e75d59adb52856ce265d156f20d6af7 | [
"MIT"
] | permissive | johntdyer/appdaemon-scripts | 4e5ea345d27d54d8133be212e5f7af57b8dfd57f | ce7e32a919be5a835d0bdf95e6650ff34b699220 | refs/heads/master | 2020-03-31T18:01:49.517418 | 2018-10-07T14:06:38 | 2018-10-07T14:06:38 | 152,443,705 | 1 | 0 | null | 2018-10-10T15:10:00 | 2018-10-10T15:09:59 | null | UTF-8 | Python | false | false | 4,100 | py | import appdaemon.plugins.hass.hassapi as hass
import globals
#
# App which notifies you when a power usage sensor indicated a device is on/off
#
#
# Args:
#
# app_switch: on/off switch for this app. example: input_boolean.turn_fan_on_when_hot
# sensor: power sensor. example: sensor.dishwasher_power_usage
# notify_name:... | [
"[email protected]"
] | |
c4281a41c161ba65c8915083ae81b981745630ca | 9775ab319e5c1f2270a132b0244f0847db42589b | /nilai/migrations/0008_auto_20210117_1010.py | d2abe2075f8f24b61525b7b5c136dcc1bf54b97d | [] | no_license | nabaman/SPK-SAW | 9aa8dfaf1bf5162bae1dc5c97e2b3e033a08294b | 5c0b8d491f23939615aa968cd52f081072fe2230 | refs/heads/master | 2023-02-18T17:38:21.028901 | 2021-01-22T15:37:06 | 2021-01-22T15:37:06 | 331,987,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | # Generated by Django 3.1.5 on 2021-01-17 10:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nilai', '0007_auto_20210117_1004'),
]
operations = [
migrations.RemoveField(
model_name='data_krips',
name='kriteria... | [
"[email protected]"
] | |
a643d38e90646191463eca1bc229387c66c1a11f | 65e0c11d690b32c832b943fb43a4206739ddf733 | /bsdradius/trunk/bsdradius/configDefaults.py | 244f2e4ef1d3488677ee5ad1c6d9c71ef18e43ac | [
"BSD-3-Clause"
] | permissive | Cloudxtreme/bsdradius | b5100062ed75c3201d179e190fd89770d8934aee | 69dba67e27215dce49875e94a7eedbbdf77bc784 | refs/heads/master | 2021-05-28T16:50:14.711056 | 2015-04-30T11:54:17 | 2015-04-30T11:54:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,442 | py | ## BSDRadius is released under BSD license.
## Copyright (c) 2006, DATA TECH LABS
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
## * Redistributions of source code must retain the above c... | [
"valdiic@72071c86-a5be-11dd-a5cd-697bfd0a0cef"
] | valdiic@72071c86-a5be-11dd-a5cd-697bfd0a0cef |
a842ae5ed2fa9404270a2b872f3c9f04a42ac434 | 2652fd6261631794535589427a384693365a585e | /trunk/workspace/Squish/src/TestScript/UI/suite_UI_51/tst_UI_51_Pref_BufferAutoView/test.py | e1a9d9fe2212331ae4697f3a3269cdded8842a9c | [] | no_license | ptqatester1/ptqa | 88c652380167f64a953bfd7a65041e7d8ac48c90 | 5b5997ea459e9aac17db8da2041e2af331927104 | refs/heads/master | 2021-01-21T19:06:49.275364 | 2017-06-19T03:15:00 | 2017-06-19T03:15:00 | 92,115,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,735 | py | from API.Utility.Util import Util
from API.Utility import UtilConst
from API.MenuBar.Options.Options import Options
from API.MenuBar.Options.OptionsConst import OptionsConst
from API.MenuBar.Options.Preferences.Miscellaneous.MiscellaneousConst import MiscellaneousConst
from API.SimulationPanel.EventList.EventListConst ... | [
"[email protected]"
] | |
509c23e3bf72658ffd093ae405cf9de4958fb78f | 102d09ef1d6effe166ad703ba4472c45dfb03263 | /py/Maximum_Depth_of_Binary_Tree.py | 199982277744c0985b39cfc2326fc115a739fec4 | [] | no_license | bitcsdby/Codes-for-leetcode | 5693100d4b66de65d7f135bbdd81b32650aed7d0 | 9e24e621cfb9e7fd46f9f02dfc40a18a702d4990 | refs/heads/master | 2016-09-05T08:43:31.656437 | 2014-08-02T15:14:53 | 2014-08-02T15:14:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | # Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param root, a tree node
# @return an integer
def maxDepth(self, root):
if root == None:
return 0;
... | [
"[email protected]"
] | |
d0089bd15b2c1ffac1e167de02e3ee215da07c7b | 74698be74d244ebbabcb0b3cf17ebed26adfa37c | /orbit/utils/epoch_helper.py | 6eb110768887e95055c34f7fc3857f08a6b9c276 | [
"Apache-2.0"
] | permissive | lfads/models | aa75616fee2476641aa98ca1cbdce7e5d27a9aff | fd700f0cb2e104544c445d9fbf3991d8388ff18a | refs/heads/master | 2021-01-25T13:50:55.423010 | 2021-01-05T18:27:01 | 2021-01-05T18:27:01 | 123,619,512 | 16 | 9 | Apache-2.0 | 2021-01-05T18:27:02 | 2018-03-02T19:07:50 | Python | UTF-8 | Python | false | false | 2,136 | py | # Copyright 2020 The Orbit Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
"[email protected]"
] | |
ad9a3b50ae05c454484d9697933ee5e00f730b4a | 5dd7c4ec44b76180040badc67849ad44f81690f9 | /unittests/test_stockitem.py | 751eb41a7c209613f1a6e803ac526f15a85a3c77 | [] | no_license | myluco/Phoenix | 68f9abe15a673fe56da6ef4375849ba6a642622d | 2de746beda35b8b5db547658cae1c65cfe164039 | refs/heads/master | 2021-01-18T15:59:05.001240 | 2016-12-04T00:08:36 | 2016-12-04T00:08:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | import unittest
from unittests import wtc
import wx
#---------------------------------------------------------------------------
class stockitem_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_stockitem1(self):
self.fail("Unit tests for stockitem not implemented yet.")... | [
"[email protected]"
] | |
6c10278bce7d441831f59503418233abcba5dee8 | 17c14b758959cdceec0dce8f783346fdeee8e111 | /chap05_nlp/automl/train.py | bca8b1fd41ce03b243523430bdc8d09621f7daa4 | [] | no_license | yurimkoo/tensormsa_jupyter | b0a340119339936d347d12fbd88fb017599a0029 | 0e75784114ec6dc8ee7eff8094aef9cf37131a5c | refs/heads/master | 2021-07-18T12:22:31.396433 | 2017-10-25T01:42:24 | 2017-10-25T01:42:24 | 109,469,220 | 1 | 0 | null | 2017-11-04T05:20:15 | 2017-11-04T05:20:15 | null | UTF-8 | Python | false | false | 3,650 | py | """
Utility used by the Network class to actually train.
Based on:
https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py
"""
from keras.datasets import mnist, cifar10
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.utils.np_utils import to_categorical
from keras.... | [
"[email protected]"
] | |
00c9949db590246f66d2bb3310ffbfe39a1fee79 | 9b24eb3a15e9acd4aaf7af00d88488f5a056438f | /backend/home/api/v1/viewsets.py | c7c28c17f806e899fca335a7c524c6cb75b776a2 | [] | no_license | crowdbotics-apps/dashboard-app-18025 | b8fb28008d42371c7d74102b78ae380725b3221a | 202f33b00e14f65adfc9dbf84f748ad5cc051652 | refs/heads/master | 2022-11-15T12:16:12.733390 | 2020-06-15T17:24:52 | 2020-06-15T17:24:52 | 271,619,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,485 | py | from rest_framework import viewsets
from rest_framework import authentication
from .serializers import (
AddressSerializer,
CustomTextSerializer,
HomePageSerializer,
XYSerializer,
)
from rest_framework.authentication import SessionAuthentication, TokenAuthentication
from rest_framework.authtoken.seriali... | [
"[email protected]"
] | |
005b11fedd1241560633f3f19ce4ab82b6cf9068 | 43dabf77afd5c44d55b465c1b88bf9a5e7c4c9be | /resize.py | 306400848b45f96d2ec9be96bbc1dbae1a9871f7 | [] | no_license | geegatomar/OpenCV-Computer-Vision-Adrian-Rosebrock | cc81a990a481b5e4347dd97369b38479b46e55bc | daa579309010e6e7fefb004b878ffb26374401d0 | refs/heads/master | 2022-11-18T13:07:08.040483 | 2020-07-20T01:55:39 | 2020-07-20T01:55:39 | 280,987,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | import cv2
import argparse
import numpy as np
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="Path of image")
ap.add_argument("-w", "--width", default=100, help="Width of resized img")
args = vars(ap.parse_args())
image = cv2.imread(args["image"])
width = int(args["width"])
ratio... | [
"[email protected]"
] | |
2534efd7cf1a472d4c24db7e37fb628ef53a3a0f | 9adda6cef38c05c0d6bc4f5d0be25e75500f3406 | /ques 2 sol.py | 00f2329450eb86ff204e44c7f8653fbee1abdcff | [] | no_license | GLAU-TND/python-programming-assignment4-upadhyay8844 | 09255dd1ef340f7af3ee57e4eee3c671c010d5c4 | bc5c31d40f03cceebb2c842bdd933e0e73a998a1 | refs/heads/master | 2021-05-19T05:26:14.857261 | 2020-04-01T11:43:27 | 2020-04-01T11:43:27 | 251,547,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | def is_dict(var):
return str(type(var)) == "<class 'dict'>"
def flatten_helper(d, flat_d, path):
if not is_dict(d):
flat_d[path] = d
return
for key in d:
new_keypath = "{}.{}".format(path, key) if path else key
flatten_helper(d[key], flat_d, new_keypath)
de... | [
"[email protected]"
] | |
4c61a7aae73fa64897e0df01720f5f1eed93b6dd | 16de2efcba33961633c1e63e493986bad54c99bd | /test.py | 73b7e8d90f6b8b0378a1486d70f70ac2af704483 | [] | no_license | thakur-nishant/Algorithms | a0cc45de5393d4cbb428cccdbf81b6937cdf97d7 | 1a0306ca9a9fc68f59e28ea26c24822c15350294 | refs/heads/master | 2022-01-07T22:22:09.764193 | 2019-05-17T20:10:24 | 2019-05-17T20:10:24 | 109,093,687 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | from math import log
from random import random
import matplotlib.pyplot as plt
import numpy as np
l = 2
T = 24
curr = -1/l * log(random())
arrival = [curr]
while curr < T:
curr = curr -1/l * log(random())
arrival.append(curr)
arrival = arrival[1:]
t = np.arange(0.0, T, 0.01)
N = len(t)
X = np.zeros(N)
fo... | [
"[email protected]"
] | |
a3dc231f3dbd0e2e1ef4dbdd546e09d37e950ff2 | f224fad50dbc182cda86291c83954607bbb60901 | /inference.py | ce98cbf4d15f6bc1e05363be1db9afeb1e519de5 | [] | no_license | Hongpeng1992/pytorch-commands | 7fd26202b7cf7d46a0ac8e1241336e8ca5dad30e | 5853625d9852e948c1ac337547f8078d048699a0 | refs/heads/master | 2020-05-04T15:38:26.704013 | 2019-02-07T07:04:01 | 2019-02-07T07:04:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,644 | py | import argparse
import io
import os
import csv
import time
import numpy as np
import pandas as pd
from collections import OrderedDict
from datetime import datetime
from dataset import CommandsDataset, get_labels
from models import model_factory
from utils import AverageMeter, get_outdir
import torch
import torch.auto... | [
"[email protected]"
] | |
14117448fe850d69ae5fcf1bd41049c19247b557 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /appmesh_write_2/virtual-router_delete.py | db6df7702ffc69ca7d3bbf5c3eda2b1680913ce2 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,343 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_two_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/appmesh/delete-virtual-router.html
if __name__ =... | [
"[email protected]"
] | |
53fa6c563e9983afb729af1af3be08c9c03dd4a1 | 8792e3449fbc6c8dec99f6af1d9f1b4caddad1f7 | /51player.py | 470f81860462904d56f98294142a2c26cd476828 | [] | no_license | aarthisandhiya/aarthisandhiya1 | c19c1951c9ba01cd97eeddd44614953088718357 | e6f10247b6a84d6eaf371a23f2f9c3bebbc73e5b | refs/heads/master | 2020-04-15T17:17:07.151242 | 2019-05-20T05:24:19 | 2019-05-20T05:24:19 | 164,868,494 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | a=int(input())
s=[int(a) for a in input().split()]
s=list(s)
z=[]
for i in range(0,len(s)):
val=s[i]
i=i-1
while i>=0:
if val<s[i]:
s[i+1]=s[i]
s[i]=val
i=i-1
else:
break
print(s[1])
| [
"[email protected]"
] | |
98244b23e0ce113db9acb33b85781abda3504fab | 82115f52db1783a2ce963e2621bf185c61ceb419 | /Teoría/03 Widgets para formularios/3-1 Etiquetas/programa.py | f824e536fbaa1c1de04e3356c2ce610ec1b992ff | [] | no_license | lesclaz/curso-qt-pyside-udemy | ce227df451a7cff40d90543ee6c892ea1a6b131c | 8b9bbf5d45e916f1d7db9411728b2759b30d2fd9 | refs/heads/master | 2023-07-01T18:11:47.959668 | 2021-08-03T09:38:12 | 2021-08-03T09:38:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | from PySide6.QtWidgets import QApplication, QMainWindow, QLabel
from PySide6.QtCore import QSize, Qt
from PySide6.QtGui import QFont, QPixmap
from pathlib import Path
import sys
def absPath(file):
# Devuelve la ruta absoluta a un fichero desde el propio script
return str(Path(__file__).parent.absolute() / fil... | [
"[email protected]"
] | |
6576a596822baf4eb435a1fe47e11d479398497b | fd878bcdaa9489883894c942aae5e316a15c2085 | /tests/dataset_readers/sst_test.py | 477e1a51ec7a5efbd55ddd0006bc58ee474d6ddc | [] | no_license | Shuailong/SPM | a12d18baa39a72a9243ad9cd4238168ab42b96d1 | 0105dae90a4acdebfc875001efab7439b3eb8259 | refs/heads/master | 2020-04-26T04:51:14.279859 | 2019-06-24T03:55:11 | 2019-06-24T03:55:11 | 173,315,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,551 | py | # pylint: disable=no-self-use,invalid-name
import pytest
import pathlib
import random
import os
from allennlp.common import Params
from allennlp.common.util import ensure_list
from allennlp.common.testing import ModelTestCase
from allennlp.data.dataset import Batch
from allennlp.data.fields import TextField
from allen... | [
"[email protected]"
] | |
25eaf0a29411821417765885863acfd5166a02e3 | 7298d1692c6948f0880e550d6100c63a64ce3ea1 | /deriva-annotations/catalog99/catalog-configs/Vocab/ihm_residues_not_modeled_reason.py | 9a62ee7fbe832a6a342ee44c46b17d4607a9f500 | [] | no_license | informatics-isi-edu/protein-database | b7684b3d08dbf22c1e7c4a4b8460248c6f0d2c6d | ce4be1bf13e6b1c22f3fccbb513824782609991f | refs/heads/master | 2023-08-16T10:24:10.206574 | 2023-07-25T23:10:42 | 2023-07-25T23:10:42 | 174,095,941 | 2 | 0 | null | 2023-06-16T19:44:43 | 2019-03-06T07:39:14 | Python | UTF-8 | Python | false | false | 5,585 | py | import argparse
from deriva.core import ErmrestCatalog, AttrDict, get_credential
import deriva.core.ermrest_model as em
from deriva.core.ermrest_config import tag as chaise_tags
from deriva.utils.catalog.manage.update_catalog import CatalogUpdater, parse_args
groups = {
'pdb-reader': 'https://auth.globus.org/8875a... | [
"[email protected]"
] | |
26604b1e653b586dcc138356474bf5459ea54e2e | 604fdb2c4fa24237d206e7c8835bb2c21b0a2fb7 | /ari/v1/client.py | 0f438dfd979c9fed793cc6fef8f04f0b37e2bc6d | [
"Apache-2.0"
] | permissive | SibghatullahSheikh/python-ari | d8d87d213c1a52b0ed46a8ea50362b93c772325b | f4a6f870513bc74bf96606168e0d2173ed2f2ebb | refs/heads/master | 2021-01-22T00:13:37.707863 | 2014-01-29T21:06:52 | 2014-01-29T21:06:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | # -*- coding: utf-8 -*-
# Copyright 2012 OpenStack LLC.
# Copyright (c) 2013 PolyBeacon, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | [
"[email protected]"
] | |
a74af5013611c1d1945d2e4250a4c532a725e0bd | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_6404600001200128_0/Python/kawasaki/solve.py | 13028d9808e7f822dbd94054186f11d1384f2212 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | T = int(raw_input())
for test_index in xrange(T):
N = int(raw_input())
m = map(int, raw_input().split())
y = 0
for i in xrange(N - 1):
y += max(m[i] - m[i + 1], 0)
d = max(max(m[i] - m[i + 1], 0) for i in xrange(N - 1))
z = 0
for i in xrange(N - 1):
z += min(d, m[i])
pr... | [
"[email protected]"
] | |
5d64b3ec43f8f8706fbb5bc2f4c1dea3573739ee | d6d87140d929262b5228659f89a69571c8669ec1 | /airbyte-connector-builder-server/connector_builder/generated/models/stream_slicer.py | 56c37db2c82d4d65076de8f3b5e19e85d772378d | [
"MIT",
"Elastic-2.0"
] | permissive | gasparakos/airbyte | b2bb2246ec6a10e1f86293da9d86c61fc4a4ac65 | 17c77fc819ef3732fb1b20fa4c1932be258f0ee9 | refs/heads/master | 2023-02-22T20:42:45.400851 | 2023-02-09T07:43:24 | 2023-02-09T07:43:24 | 303,604,219 | 0 | 0 | MIT | 2020-10-13T06:18:04 | 2020-10-13T06:06:17 | null | UTF-8 | Python | false | false | 527 | py | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, Field, validator # noqa: F401
class StreamSlicer(BaseModel):
"""NOTE: This c... | [
"[email protected]"
] | |
e5d021f764bf2a500658c2a962784f56ffc0f864 | 2b167e29ba07e9f577c20c54cb943861d0ccfa69 | /numerical_analysis_backup/small-scale-multiobj/pod100_sa/pareto_arch2/pareto_ff/pareto8.py | c934f4633c223ab3a0093473ad66da38262a6453 | [] | no_license | LiYan1988/kthOld_OFC | 17aeeed21e195d1a9a3262ec2e67d6b1d3f9ff0f | b1237577ea68ad735a65981bf29584ebd889132b | refs/heads/master | 2021-01-11T17:27:25.574431 | 2017-01-23T05:32:35 | 2017-01-23T05:32:35 | 79,773,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,048 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 4 15:15:10 2016
@author: li
optimize both throughput and connections
"""
#import sys
#sys.path.insert(0, '/home/li/Dropbox/KTH/numerical_analysis/ILPs')
import csv
from gurobipy import *
import numpy as np
from arch2_decomposition_new import Arch2_decompose
np.random... | [
"[email protected]"
] | |
94f78ff7515cedf224519e07f552630acac3127a | a857d1911a118b8aa62ffeaa8f154c8325cdc939 | /toontown/estate/DistributedFireworksCannon.py | d5691917f5a2a6d4d53e4cdd97782a58257a8ec5 | [
"MIT"
] | permissive | DioExtreme/TT-CL-Edition | 761d3463c829ec51f6bd2818a28b667c670c44b6 | 6b85ca8352a57e11f89337e1c381754d45af02ea | refs/heads/main | 2023-06-01T16:37:49.924935 | 2021-06-24T02:25:22 | 2021-06-24T02:25:22 | 379,310,849 | 0 | 0 | MIT | 2021-06-22T15:07:31 | 2021-06-22T15:07:30 | null | UTF-8 | Python | false | false | 4,308 | py | from toontown.toonbase.ToontownGlobals import *
from direct.interval.IntervalGlobal import *
from direct.distributed.ClockDelta import *
from HouseGlobals import *
from toontown.effects import DistributedFireworkShow
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from panda3d.co... | [
"[email protected]"
] | |
d6d0d58f05ad22c9474ef9804ec088549a68f841 | 5b6b2018ab45cc4710cc5146040bb917fbce985f | /200_longest-palindromic-substring/longest-palindromic-substring.py | 60710ba54ef2ad0d3d20d4f30fd1db4aec65a148 | [] | no_license | ultimate010/codes_and_notes | 6d7c7d42dcfd84354e6fcb5a2c65c6029353a328 | 30aaa34cb1c840f7cf4e0f1345240ac88b8cb45c | refs/heads/master | 2021-01-11T06:56:11.401869 | 2016-10-30T13:46:39 | 2016-10-30T13:46:39 | 72,351,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,016 | py | # coding:utf-8
'''
@Copyright:LintCode
@Author: ultimate010
@Problem: http://www.lintcode.com/problem/longest-palindromic-substring
@Language: Python
@Datetime: 16-06-28 14:08
'''
class Solution:
# @param {string} s input string
# @return {string} the longest palindromic substring
def longestPalindro... | [
"[email protected]"
] | |
3fa5ddad1d1612a8b0d4168c59f4f0549f95f6ff | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02937/s033330652.py | 6b68eb0299616b86752097386250b1b8f9320039 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | import bisect
s = input()
t = input()
n = len(s)
m = len(t)
indices = [[] for _ in range(26)]
for i in range(n):
indices[ord(s[i]) - ord('a')].append(i)
for i in range(n):
indices[ord(s[i]) - ord('a')].append(i + n)
ans = 0
p = 0
for i in range(m):
c = ord(t[i]) - ord('a')
if len(indices[c]) == 0:
... | [
"[email protected]"
] | |
171918eacf53dc68cdf837f4e9b33d81ba426350 | a533010ba7e74422c5c7c0193ea2d880e427cb9d | /Python_auto_operation/bin/mlogvis | 69b36f81947475e66d1dde10eb0cb5c3e1d112c6 | [] | no_license | gateray/learning_python | 727b3effe4875f27c86c3e5e66655905f3d5d681 | bc08a58f3a5c1f1db884398efa9d27834514199f | refs/heads/master | 2021-01-19T06:31:01.616421 | 2016-06-30T07:39:23 | 2016-06-30T07:39:23 | 62,290,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | #!/home/gateray/PycharmProjects/Python_auto_operation/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'mtools==1.1.9','console_scripts','mlogvis'
__requires__ = 'mtools==1.1.9'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('mtools==1.1.9', 'console_scri... | [
"gateray.example.com"
] | gateray.example.com | |
32f6b9fff9acce58bdc331e9f0ec63770932d681 | 0a639bda0058ac76cca97d6123f6c39229f202f1 | /companies/models.py | 9092279495371d6cf60c4e5d5b187922621a9bb7 | [] | no_license | sanchitbareja/occuhunt-web | bb86e630c2caff5815b164435464424b5cf83375 | fab152e2ebae3f4dd5c8357696893065bdd30504 | refs/heads/master | 2020-05-21T01:15:48.973953 | 2015-01-13T04:03:18 | 2015-01-13T04:03:18 | 12,552,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,089 | py | from django.db import models
import datetime
# Create your models here.
class CompanyType(models.Model):
type = models.CharField(max_length = 256)
def __unicode__(self):
return self.type
ORGANIZATION_TYPES_LIST = (
('Accounting Services', 'Accounting Services'),
('Aerospace/Defense', 'Aerospace/Defense'),
('... | [
"[email protected]"
] | |
1c165f1ccad36c215f56ef5613cea7ee2101c812 | 1facfd9d94b0f08ddde2834c717bda55359c2e35 | /Python programming for the absolute beginner - Michael Dawson/Chapter 8 - OOP beginning/8.3.py | 58bad4a7400168c26ceaa2894583a1b3bd76ba4e | [] | no_license | echpochmak/ppftab | 9160383c1d34a559b039af5cd1451a18f2584549 | f5747d87051d837eca431f782491ec9ba3b44626 | refs/heads/master | 2021-09-15T07:23:06.581750 | 2018-05-28T14:33:13 | 2018-05-28T14:33:13 | 261,880,781 | 1 | 0 | null | 2020-05-06T21:18:13 | 2020-05-06T21:18:13 | null | UTF-8 | Python | false | false | 3,000 | py | # The material form the book in polish
# Opiekun zwierzaka
# Wirtualny pupil, którym należy się opiekować
class Critter(object):
"""Wirtualny pupil"""
def __init__(self, name, hunger = 0, boredom = 0):
self.name = name
self.hunger = hunger
self.boredom = boredom
def __str__(self):... | [
"[email protected]"
] | |
26aa690ec62cb1867208234cd0c19ab8f7a9663a | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/S/stefanw/kommunalverwaltung_nrw.py | aef5bdefc3a1b54035f7bc556bd8da592cd801c6 | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,508 | py | import scraperwiki
import lxml.html as lh
from lxml import etree
LIST_URL = 'http://www3.chamaeleon.de/komnav/kundensuchergebnis.php?Ort=&PLZ=%s&OBGM=&Bundesland=Nordrhein-Westfalen&anfrage=imnrw'
DETAIL_URL = 'http://www3.chamaeleon.de/komnav/kundensuchedetail.php?schluessel=%s&anfrage=imnrw&PLZ=%s&Ort=&Bundesland=N... | [
"[email protected]"
] | |
323a4c7eddab68f041ff6fe4f9828b26f769b0ca | 525c6a69bcf924f0309b69f1d3aff341b06feb8e | /sunyata/backend/chainer/core/map/power.py | f883795e8d4b0bb7d086f28a97f498406b350ed9 | [] | no_license | knighton/sunyata_2017 | ba3af4f17184d92f6277d428a81802ac12ef50a4 | 4e9d8e7d5666d02f9bb0aa9dfbd16b7a8e97c1c8 | refs/heads/master | 2021-09-06T13:19:06.341771 | 2018-02-07T00:28:07 | 2018-02-07T00:28:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | from chainer import functions as F
from ....base.core.map.power import BasePowerAPI
class ChainerPowerAPI(BasePowerAPI):
def __init__(self):
BasePowerAPI.__init__(self)
def pow(self, x, a):
return F.math.basic_math.pow(x, a)
def rsqrt(self, x):
return F.rsqrt(x)
def sqrt(se... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.