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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
99d268c77592f92e3253920111aee3d502a246a1 | e2e7b6ae6f8897a75aaa960ed36bd90aa0743710 | /ctt_cli.py | 63d8e0769183b15584081c4aac053c8207e9e563 | [
"Apache-2.0"
] | permissive | radon-h2020/radon-ctt-cli | 36912822bc8d76d52b00ea657ed01b8bfcc5056f | 3120b748c73e99d81d0cac5037e393229577d640 | refs/heads/master | 2023-08-19T10:54:01.517243 | 2021-09-15T15:38:51 | 2021-09-15T15:38:51 | 299,571,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,878 | py | ctt_cli.py | from __future__ import print_function
import getopt
import json
import os
import requests
import swagger_client
import sys
import yaml
from swagger_client.rest import ApiException
from pprint import pprint
from swagger_client.configuration import Configuration
cli_configuration = Configuration()
verbose: bool = Fal... |
25e7dba38ac43d9377ecdb13004c2c2491bf1cbc | b1757a58f9645e35c104d4e9ed9bba671194d014 | /manipulator/scripts/grasp_evaluator.py | 2c945119e4c229803db8f4ff4dbd0a46f998915b | [] | no_license | neuroph12/personal-robot | 5d2245979162710b91a8fb2eb038664e4945bc3d | 39499b2d2b818d3305be8bba54efe8af7216d2c0 | refs/heads/master | 2020-09-12T16:40:46.487773 | 2019-11-10T01:17:49 | 2019-11-10T17:48:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,832 | py | grasp_evaluator.py | #!/usr/bin/env python2
import rospy
import moveit_commander
from grasp_detection.msg import Grasp
from moveit_msgs.msg import moveit_msgs, geometry_msgs
from math import pi
import ik_solver_test
# def setup_joint_config():
# joint_goal = group.get_current_joint_values()
# joint_goal[0] = 0
# joint_goal[1... |
fdc3cb9ff49f4c1ecdc158111df448b8fcbd4d32 | 522364efda03101b808f47a48f662918d394f91f | /hello.py | 7f1d67bc1dbecdf8ff713d12e909c3cd2fc6ca62 | [
"MIT"
] | permissive | CepheusSun/python | 796df8eb1a5e8a4f8b26d05b243f007b05b9c4b9 | 6a6a6ca1fec45c8ce6f0b27b267a7affdcfaa183 | refs/heads/master | 2021-06-13T08:01:33.871492 | 2017-03-11T18:03:34 | 2017-03-11T18:03:34 | 80,841,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,979 | py | hello.py | # -- coding: UTF-8 --
from __future__ import print_function, division
import bisect
# coding=utf8
# pi = 3.14
# radius = float(raw_input("radius:"))
# area = pi * radius ** 2
# print area
# input = raw_input()
# print input * 3
# weight = float(raw_input('weight:'))
# height = float(raw_input('height:'))
# bmi =... |
8fa1685eb061e090f59003a68c58c48dbe011dbb | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_199/2140.py | a96aa6743aa3bd236c7071332fba9c9ed0db8f3f | [] | 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,026 | py | 2140.py | import string
#inputFile = open('large_input_test.in', 'r')
inputFile = open('pancakes.in', 'r')
inputData = inputFile.read().strip()
numCases = int(inputData.split('\n')[0])
data = inputData.split('\n')
def formatAnswer(index, answer):
return "Case #" + str(index) + ": " + str(answer)
def parseInputConfi... |
93c6e8464c9e40dd3dd21732d2c23152480acbaf | 65007064d85d334653995ddf07ca0bc041465b8e | /library/notification_enums.py | 37533e202c5f853b82817c1a1d73f079b9fe64f9 | [] | no_license | sahilchauhan36/parking_lot_problem | 1d535df8464da917d8c1e738f820f028edc6ab3e | d0916c5e156751aa8ce1f777ab739cbca2a69b9f | refs/heads/master | 2020-06-01T21:01:44.797152 | 2019-06-09T11:20:58 | 2019-06-09T11:20:58 | 190,925,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | notification_enums.py | # File containing various message
class NotificationMessage:
"""
Various Notification Message to be displayed to user.
"""
FULL_PARKING = "Sorry, parking lot is full"
INVALID_PARKING_LOT = "Sorry, Invalid Parking Lot with zero space"
INVALID_SLOT_NUMBER = "Invalid Slot Number"
NO_CAR_FOUND... |
523432788647915adb41710f165946cc373571af | 255e7b37e9ce28bbafba5a3bcb046de97589f21c | /leetcode_everyday/pastqing_347.py | 433ca716cad49051faddd813cd9a6b4fd8efa46d | [] | no_license | dog2humen/ForTheCoffee | 697d2dc8366921aa18da2fa3311390061bab4b6f | 2f940aa9dd6ce35588de18db08bf35a2d04a54f4 | refs/heads/master | 2023-04-15T09:53:54.711659 | 2021-04-28T13:49:13 | 2021-04-28T13:49:13 | 276,009,709 | 2 | 2 | null | 2020-07-01T08:29:33 | 2020-06-30T05:50:01 | Python | UTF-8 | Python | false | false | 605 | py | pastqing_347.py | # coding:utf8
from typing import List
from collections import Counter
import heapq
class Solution:
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
return self.topKFrequent_v1(nums, k)
def topKFrequent_v1(self, nums: List[int], k: int) -> List[int]:
counter = [(k, v) for k, v in C... |
6c4d96dc0a721d829d602058c4473fdcc56da269 | 26d6c34df00a229dc85ad7326de6cb5672be7acc | /msgraph-cli-extensions/beta/mail_beta/azext_mail_beta/vendored_sdks/mail/models/__init__.py | 604768901d9124b395f212d04a96fe2d5c254d0c | [
"MIT"
] | permissive | BrianTJackett/msgraph-cli | 87f92471f68f85e44872939d876b9ff5f0ae6b2c | 78a4b1c73a23b85c070fed2fbca93758733f620e | refs/heads/main | 2023-06-23T21:31:53.306655 | 2021-07-09T07:58:56 | 2021-07-09T07:58:56 | 386,993,555 | 0 | 0 | NOASSERTION | 2021-07-17T16:56:05 | 2021-07-17T16:56:05 | null | UTF-8 | Python | false | false | 10,150 | py | __init__.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 ... |
8633a719c6f50f62798124d095a20ad801223cc0 | ba6950e626804202ad446baf998ca08512611196 | /nype2018_pre05.py | cf04b82483459aa3c6cb6f1dd81ce14a2b719246 | [] | no_license | eventia/nypc2018_pre | acc8738b9fc76e5b2f83613f6d06ac60cd649399 | a7b7dedbd963ab5b77f6d14a1549be1be74f8bbd | refs/heads/master | 2020-05-31T09:20:57.002295 | 2019-06-13T13:13:49 | 2019-06-13T13:13:49 | 190,210,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,215 | py | nype2018_pre05.py | """
캐릭터 경험치
캐릭터가 컨텐츠를 수행하고 경험치를 얻어 성장하는 모바일 게임이 있다. 제공된 컨텐츠
마다 이를 수행하기 위해 필요한 스태미나 소모량과 이 컨텐츠를 수행할 경우 얻을 수 있는
경험치가 정해져 있다. 이 게임에서 캐릭터는 자신이 보유하고 있는 스태미나로 제공된
컨텐츠들을 수행하여 경험치를 최대로 얻으려고 한다. 다만, 같은 컨텐츠는 반복해서 수행될
수 없다.
예를 들어, 캐릭터가 보유하고 있는 스태미나의 양이 100이고 제공된 3개의 컨텐츠가
(스태미나 소모량, 경험치)의 형식으로 (40,200), (50, 150), (30, 180) 와 같이 ... |
c8032c2aa5613d823e1920a2605fc760b4349ab5 | aa24e5798c8823983907cb13d2e963aad2e06c41 | /box-data-import | 873cc0a74a267f11cd22d712c36fc1a931dda7fc | [] | no_license | robsonscm/bbai | 3a108ec9fe5f1722201aa6865359fb7fc120baab | 1fa6ce29bab89c29128346f45bfa96e1e27f49d2 | refs/heads/master | 2023-03-08T19:37:25.456862 | 2021-02-22T22:58:29 | 2021-02-22T23:28:50 | 341,301,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | box-data-import | #!/usr/bin/env python
import getopt
import sys
from os import path
from src.load import load
try:
opts, args = getopt.getopt(sys.argv[1:], "h")
for opt, arg in opts:
if opt == '-h':
print("Syntax to call this script:\nbox-data-import <file 1> <file 2> <file n>")
sys.exit(1)
... | |
bffeb2bf192084bde6d7da093b85fa947620cf2b | 5cec12935f4d8c22a48f2450360aaf1a93586712 | /SkipList.py | 9b0ad6460da398767de950ffc28105d6a49375f9 | [] | no_license | Chodata/Data_Structure_and_Algorithm_practice | 2613ebecb24c47fe1d3f0d8a3b1370bb39ae3a5d | c82e52dbfbd18bb4527148aa4ce6d1709a4be333 | refs/heads/master | 2020-05-15T17:47:42.658801 | 2019-04-20T14:49:50 | 2019-04-20T14:49:50 | 182,410,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,551 | py | SkipList.py | from random import randint
from os import sys
class SkipList:
class Node:
__slots__ = 'key', 'value','up','down','left','right'
def __init__(self, k, v):
self.key = k
self.value = v
self.up = None
self.down = None
self.left = No... |
e8140dd4d3f36317c4eb1e3725631a90bf20d52d | e85977c32aa8e886c79574081e81e7d18e4b6884 | /03_循环/dm_05_循环嵌套之小星星.py | 6344e429e198b2c5c89905a53991e5bc9913166c | [] | no_license | gotha331/python-learning-more | bec708ecc24d521d6ecac940644bae3d4fa8c6c1 | c3c625caf5f25cb8103a89dbc43f6cc1962d5336 | refs/heads/master | 2023-03-17T13:26:04.881487 | 2021-03-04T10:00:17 | 2021-03-04T10:00:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | dm_05_循环嵌套之小星星.py | # 在控制台连续输出5行*,每一行*的数量依次递增
# row = 1
#
# while row <= 5:
# row += 1
# print('*' * row)
# 在默认情况下,print函数输出内容之后,会自动在内容末尾添加换行
# print("*", end="")
# print("*")
row = 1
while row <= 5:
col = 1
while col <= row:
print("*", end="")
col += 1
# 这行代码的目的是在一行打印完成后,换行
print("")
ro... |
90a1493522bf40e0b6633512bf33e47473dba495 | 5d0c7f249d61a606a83ab65fa3d030bc5e478873 | /languages/python/oso/tests/parity/test_api_externals.py | 320e528552e4134b347f3de4ccc5a3d97fdbe103 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | osohq/oso | 80fa6966b5c4bc08b25fa9ad569ad59fa214d1e2 | c2db7e6541b726d38390a1ef497f8ad2d831f176 | refs/heads/main | 2023-09-04T01:26:07.368407 | 2023-07-24T15:50:06 | 2023-07-24T15:50:06 | 261,283,923 | 3,133 | 187 | Apache-2.0 | 2023-07-21T00:38:10 | 2020-05-04T20:05:50 | Rust | UTF-8 | Python | false | false | 2,919 | py | test_api_externals.py | # External class definitions for use in `test_api.py` tests
import re
from dataclasses import dataclass
from typing import List, Optional
class Http:
"""A resource accessed via HTTP."""
def __init__(self, hostname="", path="", query=None):
if query is None:
query = {}
self.hostnam... |
5825708a581436ab782ee3c70a7f7e01fa776f4d | 090ea950fb8c2a22ad7a6aac58df3ac5153d1ffc | /mooclet_engine/engine/migrations/0002_auto_20170502_1920.py | 56b282dadd111891e44ca54cfe8e0f643ea9e146 | [
"MIT"
] | permissive | pretendWhale/mooclet-engine | b2c2453d15274557835b4010bec03084395e0725 | 5dd38970d94aaf636cd15eddb966239a925b2be0 | refs/heads/master | 2023-08-03T12:21:39.190628 | 2023-07-28T12:48:31 | 2023-07-28T12:48:31 | 156,955,621 | 6 | 4 | MIT | 2023-07-28T12:48:33 | 2018-11-10T06:47:44 | Python | UTF-8 | Python | false | false | 1,082 | py | 0002_auto_20170502_1920.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-02 19:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('engine', '0001_initial'),
]
operations = [
migrations.AddField(
m... |
623cb60bbacdc8338d25f643c2459a6dc7fc3345 | 2504feed14970a822bdfa73b6d54b8d7874c3b24 | /chcemvediet/apps/inforequests/tests/test_views/test_detail.py | 5bf21371844cdbc127ee3b9e0c96bb45214716a8 | [] | no_license | viliambalaz/chcemvediet | c60911a190fac0ba5968f69d77aaf8681e308e5a | 6085e4fd6a4ee27b2ac3a2fcd254b21252e9f559 | refs/heads/master | 2021-08-07T23:27:06.307319 | 2020-06-30T12:27:26 | 2020-06-30T12:27:26 | 196,402,621 | 0 | 0 | null | 2020-06-30T14:33:21 | 2019-07-11T13:42:30 | Python | UTF-8 | Python | false | false | 9,236 | py | test_detail.py | # vim: expandtab
# -*- coding: utf-8 -*-
from collections import defaultdict
from django.core.urlresolvers import reverse
from django.test import TestCase
from poleno.utils.test import ViewTestCaseMixin
from .. import InforequestsTestCaseMixin
class DetailViewTest(InforequestsTestCaseMixin, ViewTestCaseMixin, TestC... |
0d3935a63b885e410215095e2c08abdd75b368f8 | 65780699d2a9e2dc4f4e3972c58f1347d68ef2a4 | /scripts/aggregates.py | b8158f606d7408b8e712738f29041e83610c29ba | [] | no_license | xinxinzhang123/ProblemSet9 | 281210196fbb418b5401132c6abf5f325e6185ff | 73f94c81bf9032d6adb7523d10e9637fa1475258 | refs/heads/master | 2020-09-30T04:09:45.056222 | 2019-12-10T01:31:44 | 2019-12-10T01:31:44 | 227,199,617 | 0 | 0 | null | 2019-12-10T19:30:30 | 2019-12-10T19:30:28 | null | UTF-8 | Python | false | false | 1,063 | py | aggregates.py | # market clearning conditions
import numpy as np
def get_L(n, omega_SS):
L = (omega_SS * n).sum()
return L
def get_C(c, omega_SS):
C = (omega_SS * c).sum()
return C
def get_Y(K, L, params):
alpha, A = params
Y = A * (K ** alpha) * (L ** (1 - alpha))
return Y
def get_I(K, Kp1, b,... |
59b50c59b2b8dad64c3c79252b22d5269483bb01 | ecbce446b1341ba26030bf669b22c8a3fa0304d4 | /setup/urls.py | ce800d31fe974d55b662e57c6f144367438f355e | [] | no_license | svabis/db | 3d09824de50eae6f509fba2d83a03336f61657fb | 132fde8cab95691589cff3d183f26cdbe4c55894 | refs/heads/master | 2021-09-15T14:38:57.154825 | 2018-06-04T14:38:21 | 2018-06-04T14:38:21 | 109,827,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 859 | py | urls.py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = [
# url(r'^/checkin/(?P<gender>\w+)/(?P<locker_nr>\d+)/(?P<abon_id>\d+)/$', 'lockers.views.locker_checkin'),
# ==========================================================... |
ca4203a890f975bdb62ae8e7c18c9cdee776924a | 0d8970ef7a3b6a6f58e98c99bc8c452dde312e8a | /forms.py | e3f7e07c0f07077559b000d47d5374c7b8b1b504 | [
"MIT"
] | permissive | joshuajonah/feincms-navigation | 3a9bc0e83cf2ef0ceb26fef841097f75b84c5b84 | 128bec5de10bb9bf56928e7a68f150803c610fa7 | refs/heads/master | 2021-01-01T05:19:20.864036 | 2016-04-19T15:33:16 | 2016-04-19T15:33:16 | 56,606,420 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | forms.py | from django import forms
from mptt.forms import TreeNodeMultipleChoiceField
from feincms.module.page.models import Page
class ModifyFeincmsNavigation(forms.ModelForm):
class Meta:
model = Page
fields = ('feincms_navigation', )
def __init__(self, *args, **kwargs):
super(ModifyFeincmsN... |
cb6c580d64ea1794c2de4799dcb64a7b672bc253 | faf01e8225192e49af6622a8ae1e064470812038 | /lintcode/234-000-Palindrome-Linked-List/PalindromeLinkedList.py | 3fbdb3d68e407523012c982e70152143dcca5d4b | [
"MIT"
] | permissive | cc13ny/all-in | e518bc2cc57d35cc6d6c09bb5317c54ac57fe87c | bc0b01e44e121ea68724da16f25f7e24386c53de | refs/heads/master | 2023-06-30T12:19:23.864277 | 2021-07-30T19:30:06 | 2021-07-30T19:30:06 | 14,146,128 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | PalindromeLinkedList.py | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param head, a ListNode
# @return a boolean
def isPalindrome(self, head):
# Write your code here
if head is None:
return True
... |
67342e9c68238684cf540a48b0068840dddb34ab | 67a93c63004e5be19b5ac9e91c3ab3fb231c67ef | /examples/lgx_gui_test.py | 11adbf57f52ebce787acd399757e1624bbe2f3aa | [
"MIT"
] | permissive | ottowayi/pycomm3 | 8966e9411707a17c512d2eb00ebe8a703546c49d | ebcc58a0e7d4782ebf2b95d8f229801cc1635b9c | refs/heads/master | 2023-08-30T04:30:56.095583 | 2023-08-27T15:48:03 | 2023-08-27T15:48:03 | 193,241,356 | 300 | 95 | MIT | 2023-08-27T15:48:04 | 2019-06-22T14:11:55 | Python | UTF-8 | Python | false | false | 35,036 | py | lgx_gui_test.py | '''
Connection/Read Test App by GitHubDragonFly (see the screenshots here: https://github.com/ottowayi/pycomm3/issues/98)
- A simple Tkinter window to display discovered devices, tags and their values.
- Adjust the resolution by changing the values in this line below: root.geometry('800x600')
- Designed for readi... |
6b94ea29a15b225324bbf7fd612c2ddaf8bd9c30 | 7b8ea847579f409227cacf4cd073c4073b04d355 | /Scrape/scrapy/metacritic/metacritic/spiders/gmail.py | 322edb0440c89402f93ab3efaf33555f8b498e0a | [] | no_license | itaditya/Python | dcea29225826aceb3645194adede1ef5b947ecc4 | 5365dddf67d7456800fa58f8ae74dbff22b8fed2 | refs/heads/master | 2021-09-23T01:58:11.171768 | 2017-10-13T13:25:03 | 2017-10-13T13:25:03 | 50,483,903 | 5 | 2 | null | 2018-09-19T19:32:59 | 2016-01-27T05:27:42 | Python | UTF-8 | Python | false | false | 2,995 | py | gmail.py | import scrapy
import json
from scrapy.spider import BaseSpider
from scrapy.selector import Selector
from metacritic.items import MetacriticItem
from scrapy.http import Request
# https://accounts.google.com/signin/challenge/sl/password
BASE_URL = 'https://accounts.google.com'
USER_NAME = 'adityaa803@gmail.com'
PASSWORD... |
f860201a1c7412b7215eaf91538985e148ec3f97 | 208ac1f7a26e5237e7d86d23699236c7349dc164 | /posts/views.py | cb5fa86f6c87afa65d149df03098dceb9be90a67 | [] | no_license | husseinbelaifa/BlogDjango | 9bd1b803493f993e9d31e14cb448c7244d331c5a | cb01267419e08c7b03b20a12317442905216ee4d | refs/heads/master | 2020-06-16T12:16:41.135704 | 2019-07-07T14:47:48 | 2019-07-07T14:47:48 | 195,570,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from django_seed import Seed
from django.core.paginator import Paginator
from django.contrib.auth.models import User
# Create your views here.
from .models import Posts
def index(request):
postsList=Posts.objects.all()
paginator=Pag... |
1dfc95c9afa412a359e991f1b1fef27a3515c866 | b8d38daad92732c0334d22e03fb4c28723027d64 | /dice_visual.py | a64589a3fec8d822734f82a481bf11092e52823d | [
"Apache-2.0"
] | permissive | thomasli1989/visialData | 9b3793bc0bb55dfa2d378e2ec8f3301394dce6e5 | ffc8c1155263d095b24950972d55bd441f1ccb33 | refs/heads/main | 2023-03-20T06:08:12.536090 | 2021-03-16T06:24:29 | 2021-03-16T06:24:29 | 343,721,655 | 0 | 0 | Apache-2.0 | 2021-03-05T01:53:16 | 2021-03-02T09:44:56 | Python | UTF-8 | Python | false | false | 977 | py | dice_visual.py | from die import Die
import pygal
die_1 = Die()
die_2 = Die()
results = []
for roll_num in range(1000):
result = die_1.roll()+die_2.roll()
results.append(result)
frequencies = []
max_result = die_1.num_sides+die_2.num_sides
for value in range(2,max_result+1):
frequency = results.count(value)
... |
0f46bcafc027cbb0bcf6e14bdb3f25967cee6b53 | a977f7f94447a171d08f7c07be0299f4b86b87d8 | /examples/example-hpmc.py | 8e7add5e56d8ac6f8ba2f446feb7a07b1b4d2133 | [
"BSD-3-Clause"
] | permissive | justinGilmer/garnett | 64bc0dd041e3df68a8358c424ee989d6862e09d0 | 1bc60d3440de4a8fd821bbd17ab6020be1fda590 | refs/heads/master | 2021-02-13T20:20:39.921083 | 2020-02-20T17:44:38 | 2020-02-20T17:44:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,649 | py | example-hpmc.py | # Copyright (c) 2019 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
# Demonstration with the cube example
from __future__ import print_function
from __future__ import division
import hoomd
from hoomd import deprecated, hpmc
import numpy as n... |
fd89308f10ebae6949ac45d3150eef96768c1c79 | d0ba253fa223e8343c602e2fd465516a0523e1c3 | /python_tutorial_the_basics/example_07_datetime.py | 8e8370250bba775161598aed9b02b918907cfbe5 | [] | no_license | rtduffy827/github-upload | 1d5735fb22cd0e5fdc4fce8e085793cd4f85bfd4 | 4cd3b39526a1404e2289219f1a89fbdce08b25f8 | refs/heads/master | 2022-11-16T09:59:53.357886 | 2020-07-13T21:29:36 | 2020-07-13T21:29:36 | 279,400,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,163 | py | example_07_datetime.py | import datetime
print(dir(datetime))
#print(help(datetime.date))
gvr = datetime.date(1956, 1, 31) # Birthday of Guido van Rossum (the creator of python)
print(gvr)
print(gvr.year)
print(gvr.month)
print(gvr.day)
mill = datetime.date(2000, 1, 1)
dt = datetime.timedelta(100)
print(mill + dt)
# The default format for d... |
6c8fd88dc55894e763fd17cc5afacbc928d0540c | 23c54c785794385fb9d03ce1938244a29337c821 | /loginpass/_consts.py | 4f0a4da01c1d42c430885e9304095a33c5dc240e | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | importstar/loginpass | b95e5485630eafd6de3462240814ea2fb1b61a6c | e2a393b2de6369a5f4b571467bedeb9bf24e62e9 | refs/heads/master | 2023-08-12T11:11:08.811442 | 2021-09-12T15:45:15 | 2021-09-12T15:45:15 | 388,317,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | _consts.py | version = '0.5.0'
homepage = 'https://github.com/authlib/loginpass'
|
9a1924f12f5c6c6952c9e26e3592998a62edfa4e | ac4988c7f9cc98f6dcc31280cd208eeb57d674f2 | /Semana9Hackaton/sperez/django/minimarket/cajero/admin.py | cab25198f464cdeecab89b48acfa9b40b73abab4 | [] | no_license | BrucePorras/PachaQTecMayo2020-1 | 77e396ceb2619d028dd740b9414f8a3160eee2cd | 5f39146cc4f69d844dae22a12098479194fd6332 | refs/heads/master | 2022-12-18T02:20:39.828175 | 2020-09-25T05:39:20 | 2020-09-25T05:39:20 | 269,999,646 | 1 | 0 | null | 2020-06-06T14:06:19 | 2020-06-06T14:06:18 | null | UTF-8 | Python | false | false | 158 | py | admin.py | from django.contrib import admin
# Register your models here.
from .models import venta, factura
admin.site.register (factura)
admin.site.register(venta)
|
c317dd657a9c56674e36eddb6d1c89d89721aad1 | 8e3469965c5800ae4b376fb90bf268977c3d2487 | /helios/core/modules.py | 8f562c045d5da5fb36f93f6a44f7e57d2dd2e057 | [
"Apache-2.0"
] | permissive | fayyaztech/Helios | b751bfe2268c5cbf7ef2c4d02502dbba50e84580 | 3d43101acb3e254bd76159a84e5fe9b12701348f | refs/heads/master | 2023-03-22T02:34:04.616785 | 2020-11-26T15:28:39 | 2020-11-26T15:28:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,104 | py | modules.py | import os
import logging
import sys
import json
class CustomModuleLoader:
folder = ""
blacklist = ['module_base.py', '__init__.py']
modules = []
logger = None
options = None
writer = None
scope = None
sslverify = False
headers = {}
cookies = {}
def __init__(self, folder='h... |
da32f22931c10336897e0f4589957c1d3b7bfa6b | 47e5ab2ad901640322dda42224c9c4dea3e4f7e4 | /produtos/migrations/0002_correcoes.py | 2d08da4f088b72fa03ba54674ce9ea4bdfcf0cae | [] | no_license | DevGamorim/gerenciamento_kes | ef44646794331f2c3db4bda5567a43f949f4607a | 569a166c96a9113eaac0b3498ccc821561986bb3 | refs/heads/main | 2023-08-25T11:35:28.361530 | 2021-10-28T22:04:10 | 2021-10-28T22:04:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,437 | py | 0002_correcoes.py | # Generated by Django 3.2.6 on 2021-09-30 13:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('produtos', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Correcoes',
... |
83b0fb34e4dca8c5a4b7f3ceefa6eb7dfab875cf | b8d687673f1b55cbe13a05598f930e31c4220d78 | /src/app_dev_tool/web_server_flask.py | 8cb7ed900cbce31e220b3221960c7c2ca452f845 | [] | no_license | omergean123/AppFlight- | 4bc5d35092b24ee3859eb86d3fca17eac7a8fb03 | 299842bb8307c6e77aa3d5736f0eae0a83e1dfd7 | refs/heads/master | 2022-11-18T05:21:56.297818 | 2020-07-17T10:42:32 | 2020-07-17T10:42:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | web_server_flask.py | #!/usr/bin/python
import subprocess
from flask import Flask, request
app = Flask("my_app1")
@app.route("/natbag")
def natbag2020():
return subprocess.check_output(["java", "-classpath", "/home/liron/workspace/g1/bin", "NatbagMain", request.args.get('outFormat')])
app.run(port=8000, host="0.0.0.0") |
aab425624b69afe26d7a061c0cd5b0225dce8689 | dc36e6bef8c3a86aef92b549ac68024d414f0700 | /Accounts/forms.py | 8beefbef5e0fbcce2a0ca49af1bc346cc99aa3f8 | [] | no_license | DarylNine93/Django-PocketMart | c168cd87b4b1000a80aa5d5ec9b7477cd8193233 | fcc35dac39ec1df970786924666966f61e259817 | refs/heads/master | 2022-07-18T14:39:58.265049 | 2020-05-17T19:40:52 | 2020-05-17T19:40:52 | 264,743,796 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,653 | py | forms.py | from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from .choices import VILLES
from django.core.exceptions import ValidationError
from .models import DeliveryPerson
from .random_code import CODE
class SignUpForm(UserCreati... |
38e1e1f607df702e4898385f29220ef4ec9b9802 | 1b72d7474380a817b2b820edf6eedb701594d372 | /z-ignore-scripts-helper/resize_imgs_in_dir.py | c2589b890d10fd4e6f4a9a076a1483f16f4446d9 | [
"Apache-2.0"
] | permissive | Shreeyak/cleargrasp | 33b11b06b58a11ba4636a5f3b255b682829c251a | 0688647e49380139e440bacbe8562132bb2afbd7 | refs/heads/master | 2021-12-07T06:36:46.991739 | 2021-12-06T22:35:30 | 2021-12-06T22:35:30 | 221,017,128 | 253 | 65 | Apache-2.0 | 2020-12-20T07:55:40 | 2019-11-11T15:59:37 | C | UTF-8 | Python | false | false | 1,689 | py | resize_imgs_in_dir.py | """Some images are of diff resolution from the rest. Resize a folder full of images of diff file formats to a new resolution.
"""
import argparse
import glob
import os
import sys
import cv2
import imageio
import numpy as np
sys.path.append('..')
import api.utils as api_utils
parser = argparse.ArgumentParser(
des... |
d24e7b985d2e79fb6a4d583dfe51a2095310da57 | 710542bdc4f131243b104fc48e6fb0d08f261f5b | /youtube_search/models.py | c30239176f6623b821081f969e88b9199b91e7f5 | [] | no_license | uwaiszaki/fampay_assignment | f1b611cad8251f15d808cd1a5c4fca63b662d998 | 219ad5182200d4b434c155ff7b2f287318612c22 | refs/heads/master | 2023-01-31T14:34:04.032207 | 2020-12-16T19:01:51 | 2020-12-16T19:01:51 | 322,076,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | models.py | from django.db import models
from django.db.models.signals import post_save
class Keyword(models.Model):
name = models.CharField(max_length=100)
task_id = models.CharField(max_length=50, unique=True)
is_active = models.BooleanField(default=True)
def __str__(self):
return self.name
def save_... |
c00b601cb7b7a9e350a801bad2865f949aa14bdc | b154ceab40593e664a2470e180f74b12b83dcdb2 | /backend/entry/views.py | 9eafaeae9c0f8b353f9755b23ee725c62d824594 | [] | no_license | ssushmitha52/mental_health_app | b04716d0eaaa997236c007e740636b0ca1cfb6f1 | 05f7dfa275047d93b6b5fc85975de226bc4ea0c7 | refs/heads/main | 2023-08-28T09:51:33.995906 | 2021-11-12T07:24:06 | 2021-11-12T07:24:06 | 414,301,421 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,607 | py | views.py | # from django.http.response import JsonResponse
from django.shortcuts import render
from rest_framework.response import Response
from rest_framework.decorators import api_view
from .models import Entry
from .serializers import EntrySerializer
from authentication.models import UserAccount
@api_view(['GET'])
def getRo... |
ca53484da39aa01ee3f8dcc1b543297e6dcbcfbd | 300afb0fd839f5ebc1e6ee9f1a5b7a02bd64c770 | /python_spider/Seq_01_py2Basic/demo04/Seq_04_request_headers.py | b766f132843f75e3bc45fab85fbbd52c2854d6f8 | [] | no_license | SilkyAnt/rupeng_python | 0a1be5fc47a0802aa6b321a0053b0907eb740f2d | 486e9cbfdc0201a9abac0ebb5c9276151dce6e74 | refs/heads/master | 2020-04-01T07:41:32.586559 | 2019-03-17T02:49:57 | 2019-03-17T02:49:57 | 152,999,675 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | Seq_04_request_headers.py | # coding=utf-8
# 如果想添加 headers,可以传 headers 参数
import requests
payload = {'key1': 'value1', 'key2': 'value2'}
headers = {'content-type': 'application/json'}
r = requests.get("http://httpbin.org/get", params=payload, headers=headers)
print r.url
print r.headers
|
3ded56a6e41c880ad967d03f90381a9fb2dbb3df | 2ec7ba942b9be11665f11a00488610dbeb5542d1 | /code.py | a8268b8c5c3875feaa7391ef98f97d7f0ca0123c | [] | no_license | Addhi86/python | a3062b1f3ebe4115f37ee3a61df33798d98724c0 | 4157d18964534356ca499be68f96925dab89f78c | refs/heads/master | 2020-09-26T11:53:36.649929 | 2019-12-06T05:22:13 | 2019-12-06T05:22:13 | 226,249,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 980 | py | code.py | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 17 17:08:56 2019
@author: Adnan
"""
import os
import random
import hdf5storage
import numpy as np
DATASET_PATH = "D:/Dataset/Multi-resolution_data/Visual/High/"
train_images = []
test_images = []
train_i = []
test_i = []
train_label = list()
test_lab... |
82cbfa3022ad5ad2268f04728ae7d5d4da38b99e | 5734729fa5591f80af153d8308e62f847bdff5a2 | /integration/api/shipit.py | 6b0a24750c207ab73ef46dc4a3adabe61d3dd758 | [] | no_license | ariesfath/integration-worksample | d361c2cef5a67b0f696e5e5ecbcd2e47c3ddf1c0 | c4461441733b7b0ce5c7ad5a76bc5f50e5e80ad4 | refs/heads/main | 2023-04-16T06:11:00.491428 | 2021-04-22T21:16:38 | 2021-04-22T21:16:38 | 360,171,028 | 0 | 0 | null | 2021-04-21T12:57:49 | 2021-04-21T12:57:48 | null | UTF-8 | Python | false | false | 3,275 | py | shipit.py | import requests
import datetime
class ShippingProvider:
UPS = 'ups'
FEDEX = 'fedex'
def get_shipping_provider(tracking_number):
"""Get shipping provider based on tracking number format.
In case of multiple tracking numbers, only check the first one.
"""
tracking_numbers = tracking_number.spl... |
d5d4030e3fdd7e67f210bfc3ca555825c313b9be | b8a260dddafaf102ed6fefdeffdcef8e41acb295 | /src/reports.py | ab0b767a051bb81fa419d3dc11093d4205557c92 | [] | no_license | Studiofeed/BOM | 2928287e421bd173028cfe6a15834e1e877b83e0 | 3c8aba628da528528f91c24a4f7383a72f6ea087 | refs/heads/master | 2020-03-29T17:53:34.903970 | 2012-06-15T18:47:50 | 2012-06-15T18:47:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | reports.py | '''
Created on 2012-03-29
@author: timvb
'''
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.rl_config import defaultPageSize
from reportlab.lib.units import inch
import bomOrganizer as bo
class ReportlabReport(object):
'''
... |
86a4a7458c656a39bccb8ae483bf9a05809fd5bb | be66d84d33603daa57c93065b2046cf47a5c78aa | /Looping/greatest_common_divisor.py | 05e67e4097e2d418d2d34c07de8e8b9c6f4b7dd6 | [] | no_license | haga75/Python | 0116594edfd0b767ab958d21a47a516e4e577d44 | e83220e23283cef71351d244e0857ecee4089350 | refs/heads/main | 2023-05-12T15:34:17.416460 | 2021-06-04T14:23:22 | 2021-06-04T14:23:22 | 329,076,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | greatest_common_divisor.py | def greatest_common_divisor(x, y):
print("For", x, "and", y, ",")
r = x % y
while r > 0:
r = x % y
if r == 0:
print("the greatest common divisor is", y, ".")
else:
q = y
x = q
y = r
greatest_common_divisor(1071, 1029)
greatest_common_... |
a73cb59d4032d1c26f4d5429f760667fda982c0d | 7b4cd3026a27269239e622e8672f48a76b843e4d | /Recitation/rec11_1.py | 617249404463b2392ad21a0afc378f47fabea63c | [] | no_license | jbi4/CS0008-f2016 | 96359bbe6eea112dd6d5af1e8ad49e6fbdc36821 | 65f5491f36c71651db39646c31a65c0061b935c6 | refs/heads/master | 2020-09-18T19:25:45.162584 | 2016-12-19T04:21:45 | 2016-12-19T04:21:45 | 67,156,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | rec11_1.py | import os.path
def processfile(fo):
return
def printkv(key, value, klen = 0):
return
nf = 0
tl = 0
td = 0
file = input("File: ")
while file and file != "q" and file != "quit" and os.path.exists(file):
file = open(file, 'r')
|
e0b7911c7904e6a3602228f11af762bc578c64d6 | 237ef0c56119fa72ca0bf7784f5b06113f34b6b8 | /utils/schemas.py | 40eb617fc6b7a5e60b2f8f06a03876a696337a24 | [] | no_license | omerpessach/EasyDeasyAggregator | 521247c56f1ab250f7eafbb262cd84ed392e95a9 | 9778ad5c4a6c9ced57c22b5cc37387073eae004d | refs/heads/dev | 2023-04-10T13:48:43.371661 | 2021-04-14T11:52:00 | 2021-04-14T11:52:00 | 350,321,756 | 0 | 0 | null | 2021-04-14T11:52:00 | 2021-03-22T11:42:08 | Python | UTF-8 | Python | false | false | 440 | py | schemas.py | from marshmallow import Schema, fields, post_load
from attrdict import AttrDict
class EntrySchema(Schema):
"""
Validating entry
"""
title = fields.Str()
url = fields.URL()
summary = fields.Str()
time_to_read = fields.Int()
source_site = fields.Str()
published_date = fields.Date()
... |
611c6838ab2713fedf5688690fc67b342c6ae6bd | b008461407947b79640030856517bb01cc3f6288 | /text.py | 7b29d99b1bc91cf1423b034fde77b33886eaa95f | [] | no_license | coffeecaty/decoder | 424ee44a6373c6bb816990a6dbd0c28e07224bbf | da2d25e922be503ca082c5d33c2bb7263b90d2ac | refs/heads/master | 2021-01-21T11:24:11.680869 | 2017-09-28T06:09:07 | 2017-09-28T06:09:07 | 101,998,150 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | text.py | # -*- coding: utf-8 -*-
def text(x):
n = 0
z = ''
while n < len(x):
z = z + x[n]
n = n + 1
return z
|
5f20cbc8b56159a5ed41372b889debc6154b7cbf | e9a0ee3c3b7486d850fb462cfc649a74eae2f062 | /util.py | 22f12aa9bd7834091a2d074e9edf537123baf677 | [] | no_license | DmitryPorotov/FileWatcher | 7588e14cd7e8f1a585e335dacc2fc8cdf1260c39 | daebf450cd18dcfbe9e8ed1a0c79028f63112bbb | refs/heads/master | 2020-06-12T18:44:33.058699 | 2019-07-06T18:56:32 | 2019-07-06T18:56:32 | 194,391,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | util.py | from pathlib import Path
def resolve_home_dir(path, is_dir=False):
if '~' in path:
path = str(Path.home()) + path.split('~')[1]
if is_dir:
path += '/'
return path
|
72d650d355dc5e3109df44617c82dda9aa4e0c8c | 8fa74206aae47bc749d3364737800ea06db21233 | /lib_timeslot.py | 36ee901fd7809d3d4c4b8fc3a1df643577567876 | [] | no_license | joshchurning/Class-Scheduler | 0cb75856fd4e4bdd17f8c37d05aeaf82c29d3dd2 | 92f715e3c9f15e55d9df13abfda6b02bf2290724 | refs/heads/master | 2021-01-20T17:23:50.371289 | 2016-08-05T00:45:45 | 2016-08-05T00:45:45 | 64,709,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,713 | py | lib_timeslot.py |
## Ryan Schreiber
##
## TimeSlot class that supports a time range on a given set of days of the
## week. Also supports a function that compares whether the two times conflict
## with each other by overlaping.
##
class TimeSlot():
beg,end = 0,0
strbeg,strend = "",""
days = []
# In... |
ad5ade00dc9d6bd2e9931bcff65497ce65f40daf | bf8cde338626bb03a491d09646af35af29713ca7 | /Part 2/04. Age of maturity.py | f8efbd999acdb01fdcb91e2d781c31a10e41a79a | [] | no_license | aliciamorillo/Python-Programming-MOOC-2021 | 45b7b79851098a2a71ed9f0a1d6e77a20325ecdb | a6bbf93de5d03234c39ea3224b6b72c5d077b752 | refs/heads/main | 2023-08-29T07:33:11.589677 | 2021-10-30T09:11:22 | 2021-10-30T09:11:22 | 403,979,031 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 124 | py | 04. Age of maturity.py | age = int(input("How old are you?"))
if age >= 18:
print("You are of age!")
else:
print("You are not of age!") |
67f9463fa64555da5a6fc92d4c4759a7a7a37d34 | d5ee6e6bd1df32a123558e6e4a79c3ad17db19bc | /blog/views.py | ef35f9512fc113a3ce9f88b3799fdb3b8318ce7b | [] | no_license | trailhawks/lawrencetrailhawks.com | 06d9f3f0753f0529718a14540858637b5bdfae3d | b250c131cd655e9b43b27834db702e3a853df88b | refs/heads/master | 2021-06-10T11:22:20.435575 | 2016-12-23T08:58:08 | 2016-12-23T08:58:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | views.py | from django.views.generic import dates
from .models import Post
class PostMixin(object):
queryset = Post.objects.public()
date_field = 'publish'
navitem = 'blog'
class PostArchive(PostMixin, dates.ArchiveIndexView):
make_object_list = True
paginate_by = 10
class PostYearArchive(PostMixin, dat... |
c991c7f50ec85f699a75722ab17aef206a0be5df | 5459d08ceb7581d72ddb8071faea9efd325d428a | /mysite/blog/serializers.py | 71ec2980c1c844ace33e63b1c6ad32da81dde475 | [] | no_license | 5ai92/sai | 5476ccfe818e6b12ec72b1ab799e2de70e348ba1 | 94aaead84020612f3ef7ecb781e1b770f4bb794d | refs/heads/master | 2021-04-29T00:21:25.203947 | 2016-12-30T23:38:20 | 2016-12-30T23:38:20 | 77,714,662 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | serializers.py | from django.db import models
class PostSerializer(serializers.Serializer):
title = serializer.CharField(max_length =50)
body = serializer.TextField(max_lenth =10000)
date = serializer.DateField()
|
ed19189843d3359a757128ac0c0d26f428998e0c | 1dae293a73c8bd36e776d1d33e7f4718acaee7e3 | /www/test.py | f7f887f4b66c668d1e2375c1065392cc186430b6 | [] | no_license | Alonsovau/my_python3_webapp | 37e0131a3bbdee7cf99f23bbb793c33634a2d296 | bff557c1c3de294f300bd67eb6135da0089afa99 | refs/heads/master | 2021-01-22T04:24:08.888715 | 2017-02-20T15:51:47 | 2017-02-20T15:51:47 | 81,530,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | test.py | import www.orm,asyncio
from www.models import User,Blog,Comment
# async def test():
# await www.orm.create_pool(loop=loop,user='root',password='password',database='awesome')
# u=User(name='Test',email='test@example.com',passwd='1234567890',image='about:blank')
# await u.save()
#
#
# loop=asyncio.get_event_... |
d7e0528a160bd02acc54f9c7a9b6b94655db2a93 | 50194bfefe88b3cac60cd8e7f7e242aa4ffdec3c | /codeforces/codecraft_20/string.py | 1eeb87331ff91575ab967f6ccf48c4698ca90a0d | [] | no_license | thaReal/MasterChef | 206abaa01e3d11f4c3afe577941bf4f3a0f24685 | 963e89b3d5dc239b8a2fcaacb8537b26633265c6 | refs/heads/master | 2021-06-11T06:07:56.110251 | 2021-04-25T19:18:52 | 2021-04-25T19:18:52 | 194,553,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | string.py | #!/usr/bin/python3
# Codeforces - Codecraft 20
# Problem B - String Modification
# not working, seems like I'm pretty damn close
def modify(s, k):
for i in range(len(s) - k + 1):
lb = i
rb = i+k
s = s[:lb] + s[lb:rb][::-1] + s[rb:]
return s
# Main
t = int(input())
for case in range(t):
n = int(input()... |
dbf7c64c05ba0ca633e463a74811c81cce9ec85a | e578b27fe0f8a47931e459c162cd699c6338a862 | /leases/migrations/0002_make_applications_one_to_one.py | 93269275771ef20cc7762d168d476ed84519dc35 | [
"MIT"
] | permissive | City-of-Helsinki/berth-reservations | 0ded0448cc3a9391b6c1bde61767633b34124e80 | d1983366452eff9714d425bcef2d7d78483738f8 | refs/heads/master | 2023-04-06T06:49:31.433852 | 2023-03-09T12:38:46 | 2023-03-09T12:41:29 | 153,620,377 | 5 | 2 | MIT | 2023-03-21T22:56:51 | 2018-10-18T12:30:27 | Python | UTF-8 | Python | false | false | 1,104 | py | 0002_make_applications_one_to_one.py | # Generated by Django 2.2.6 on 2020-02-04 08:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("leases", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="berthlease",
... |
9328e5ad3f4f2ce92caa75b9163b5b411c8f6ca0 | c93eec09965fe14aa56be952a35d4d9b80ec3dea | /ExtractEmails.py | bef03fdd544a7a7c5b04873c8a4a7c44f640101b | [] | no_license | 315hughes/PythonExtractRegularExpression | 4907a93c50b508e033bed49830f5667becc2da54 | 797c5fd15bfba66cad349df19e2e8a604198f7bf | refs/heads/main | 2023-08-24T01:29:34.725176 | 2021-10-20T15:48:45 | 2021-10-20T15:48:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | ExtractEmails.py | import re
#this regular expresison shall find all emails in the text file systemrip
pattern = re.compile(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b')
for line in open("SystemRip.txt"):
for match in re.finditer(pattern, line):
print(line)
|
08c092842cd306178d1d6a121519b43769ef3b75 | 8cb6040ee4f3c7eb20c9740727851d9cc1ff0476 | /practical4/problem14.py | 268849ed7066803beca04b9de68ce06d5610a10a | [] | no_license | shmavonyanhov/Intro-to-Python | 7bb69c2c6dd8fbafad6fdad8f4217efdd91802d4 | bcb9f9387beea3f2b663ed67075be135ab567c52 | refs/heads/master | 2020-07-06T09:22:53.393943 | 2019-10-13T08:32:27 | 2019-10-13T08:32:27 | 202,969,740 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | problem14.py | list1=["al","abc","xyz","as","aba","1221"]
list2=[i for i in list1 if ((len(i)>1) and (i[0]==i[-1]))]
print(list2.__len__())
|
b650755f6d9c26595ffc293d7e8bf0deb81b4c41 | fa72f19118eef524e844324fe6ca11e6fcab675a | /loger_pack/logger.py | eea9c8d82fc8ed4f88bd8a2d60dc9cedd78c68b9 | [] | no_license | Adskih/PyProj | 1fc6f9eca99f3238d2b89233b23e7768eb95b068 | 52cc77c574ae41754a6907ef8878872651438549 | refs/heads/master | 2021-01-22T17:34:25.570204 | 2016-08-23T13:51:58 | 2016-08-23T13:51:58 | 65,883,134 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,425 | py | logger.py | import logging, traceback
import sys
from abc import ABC, abstractmethod
class Logger(ABC):
@abstractmethod
def write_log(self, *args):
pass
class LoggerDb(Logger):
LOG_FORMATTER = '%(asctime)s|%(levelname)s|%(message)s'
def __init__(self, log_name, log_file, job, level=logging.INFO):
... |
adf1a51d13f1d24d9dc2de96adf5f5eba1a92706 | bcfb6e8f541e27321de04d06a6650050453c61b2 | /round2-NoiMangToanCau/src/raw2msg.py | 771dca317771e06f21bbece92e0a40611b13d5ac | [] | no_license | nhtlongcs/thachthuc-2021 | fd5122f8d567e0169024db3fa7bbe7f0b162bea8 | 8a311a4303d85d043697f61b0d26fb1dca4c6ccc | refs/heads/main | 2023-06-02T20:31:21.023807 | 2021-06-16T22:30:51 | 2021-06-16T22:30:51 | 361,704,808 | 20 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,391 | py | raw2msg.py | import random
from tqdm import tqdm
import argparse
data_dict = {}
l = 1
r = 255
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--inp-path', default='./example/inp.txt',
help='description')
parser.add_argument('--dict-path', default='./meta/dict.dat',
... |
fdfd4291f05d87614af541170ef0c688f06701c0 | d8d1cfde3491337bbf7e2abc7b8ef337eb8328f3 | /server/explore/settings.py | 0c16ad95afc7432fe56c0e82fde05281633a26fd | [] | no_license | valentinbourgoin/explore | 436e94331849393ed82a64a5924120f2ef211e29 | 99b3d77e881c3f6bfbe23926efee1904ddeb8f56 | refs/heads/main | 2023-08-19T07:58:06.084501 | 2021-10-04T13:58:19 | 2021-10-04T13:58:19 | 404,444,476 | 2 | 0 | null | 2021-10-05T10:32:24 | 2021-09-08T17:53:54 | Python | UTF-8 | Python | false | false | 5,200 | py | settings.py | """
Django settings for explore project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib... |
366075eba00f16a920420de8239f2b2421abb760 | ec7aec40f7cc12e0e6a886d1d8c1ad0d52fee314 | /进阶/socket/udp/udp_socket_receive.py | a6429da5e91854bc6e1de819d8a8dbc29ed25495 | [] | no_license | yangxw1993/python_base | da4ce7ef25a5c9a6df9b97df798f620f0adca13a | 41108bd273d148b5509b5039c41ba1ee6c4d170f | refs/heads/master | 2023-01-24T13:48:53.633615 | 2020-09-19T16:15:23 | 2020-09-19T16:15:23 | 296,365,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | udp_socket_receive.py | import socket
def main():
udp_socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
# 不指定ip,空字符串代表自身Ip
localAddr = ('', 8801)
udp_socket.bind(localAddr)
while True:
# 最大接受值
receive_data = udp_socket.recvfrom(1024)
receive_msg = receive_data[0].decode('gbk')
print(receive_msg)
udp_socket.... |
111e62a2275a48d9dccac6e64a60771e89756141 | 2cecf1c1e04bb60a29b4fb670078ffb339767836 | /stations/malwr/station.py | 285e4ff1505d2c9536ef35c680bd47f7827657dd | [
"Apache-2.0"
] | permissive | netwrkspider/QRadio | 36e0af966ab8613a73ad6eefb4f5220c34faf67d | 53299f5bd57b60f76596ed05ba7f1f65b255114d | refs/heads/master | 2021-05-31T14:31:53.285567 | 2016-05-20T16:10:45 | 2016-05-20T16:10:45 | 105,164,554 | 1 | 0 | null | 2017-09-28T15:18:18 | 2017-09-28T15:18:18 | null | UTF-8 | Python | false | false | 9,648 | py | station.py | #################################################################
# Malwr station for QRadio #
# ~ Tune In #
# Tuned to: #
# https://malwr.com/ ... |
719c7fc37cc87ab72f029ec9e9ed9ac394469cb0 | c3a55805f35017e4bc025f06c310b6531dfd8c60 | /reaction_timer/reaction.py | d15abeaa3db2a4069b12cff10bfabdb775f735cf | [] | no_license | mattvenn/piffin | de2f37e059bf38985df3058d704af66c31ffd21e | 2c1b1d9e11d3f1406421c5078fb53ae6335d1a98 | refs/heads/master | 2016-09-06T00:18:07.921109 | 2014-07-23T21:08:06 | 2014-07-23T21:08:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 928 | py | reaction.py | #import the libraries
import time
import random
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
button_pin = 8
led_pin = 10
#set the button pin to be True to start,
#when we press the button, the pin will change to False.
GPIO.setup(button_pin,GPIO.IN, pull_up_down=GPIO.PUD_UP)
#set the led ... |
f8fe372553a815f0e32349bf5b2e011b611437a2 | 5e05e476de19c27bbb4d5d4f8c8e635df7865730 | /semana6/backend/api/api/noticias/admin.py | e7052487650f49a63e629ad16a315a8dec365000 | [] | no_license | jessizanelato/programacao_web_2019_2 | cb223dc0eeb1f4d0ec0cee979918fe5696c00569 | 8ef7f3b5f04e54294f139105cadb9fbeb5c19de9 | refs/heads/master | 2023-01-27T15:27:37.706450 | 2020-12-04T22:10:27 | 2020-12-04T22:10:27 | 304,385,418 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | admin.py | from django.contrib import admin
from .models import Fonte, Artigo
class FonteAdmin(admin.ModelAdmin):
list_display = ("nome",)
class ArtigoAdmin(admin.ModelAdmin):
list_display = ("titulo", "resumo", "conteudo", "autor", "data_publicacao", "fonte",)
admin.site.register(Artigo, ArtigoAdmin)
admin.site.regist... |
f870846dfa905b74dc2495b33559ac1e167f63e6 | 203f4dca4ba2677ce0f7be7a24bb1e006319adeb | /XMLParsing/dictkeysbypermutations.py | cca77d1d8a4c1b0d6590752a9bd014ab18907407 | [] | no_license | Noceur/codecollection | 7125952fb1ab698929fbfa3c652491edcd6be06d | e89973c069ba5e657fe9ba464393e8588c005e62 | refs/heads/master | 2020-07-07T01:53:12.514952 | 2017-06-30T16:09:04 | 2017-06-30T16:09:04 | 66,283,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,372 | py | dictkeysbypermutations.py |
#dict test keys by permutations
edge_list = ["N c1", "route 1", "E c1", "route 2", "S c2", "route 3", "W c2", "route 4", "c1 c2", "route 5"]
list_of_tuples = [('E', 'N', 'S', 'c1', 'c2'), ('E', 'N', 'S', 'c2', 'c1'), ('E', 'N', 'c1', 'S', 'c2'), ('E', 'N', 'c1', 'c2', 'S'), ('E', 'N', 'c2', 'S', 'c1'), ('E', 'N', 'c2... |
fcf39ad3dfd2afbc7788ff4736504824fd12e2f1 | 0e06848d55a6cf2ba710e84cacb394298ec1a8d8 | /api/site.py | b15ec96b14869ae8fac67a933d5d718510e224ed | [
"MIT"
] | permissive | aqualove/api | 8a8a239ed55997b7bc6f4d5dc33486d9dc884176 | 3eb598363a2f91720dab771c8e970e22a25d221c | refs/heads/master | 2021-01-19T03:24:34.843240 | 2016-06-30T21:45:27 | 2016-06-30T21:45:27 | 61,401,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | site.py | from flask import Blueprint, render_template
site = Blueprint('site', __name__,
template_folder='templates',
static_folder='static')
@site.route('/')
def index():
return render_template('index.html')
def init_app(app):
app.register_blueprint(site, url_prefix='/')
|
a01a722938dc5af1a2b341101c69da172e4be84c | b9b9c31ea5ad375d505ad84167f28f8c138c437c | /load.py | 30780b112258d2141f01617b99ba94d70499c11e | [] | no_license | wcbeard/traffic-atl | 0dcb0d034daa2907fb9c56d549d79c45528f8203 | 5687309575676aadb4257465c61785cdc819aada | refs/heads/master | 2021-05-30T04:07:54.502635 | 2015-10-04T21:40:22 | 2015-10-04T21:40:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,572 | py | load.py |
# coding: utf-8
# In[ ]:
get_ipython().run_cell_magic(u'javascript', u'', u"IPython.keyboard_manager.command_shortcuts.add_shortcut('Ctrl-k','ipython.move-selected-cell-up')\nIPython.keyboard_manager.command_shortcuts.add_shortcut('Ctrl-j','ipython.move-selected-cell-down')\nIPython.keyboard_manager.command_shortcut... |
9cf1c568ea557868b09b839878ee4782114ada99 | d70f30adf7b9978e2675b1cfa3102e68c854a167 | /src/encoder.py | 13bd09278ecd23368f251092dd14d273a8086012 | [] | no_license | AhmedAmrMohamed/data-compressor | cdc16580bfb2a300e6b5b06fa9f51bf919ddcf1e | 6535c931485ec6b5ffe48f5cd8e6f930e822739d | refs/heads/master | 2023-01-23T03:36:44.279689 | 2020-11-15T12:43:10 | 2020-11-15T12:43:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | encoder.py | from huffman import Huffman
import logging
logging.basicConfig(level='INFO')
debug = logging.debug
class Encoder:
def __init__(self,msg):
self.huff = Huffman(msg)
self.msg = msg
self.key = self.huff.albn
def encode(self):
debug('encoding')
msg = self.msg
... |
ad0e01388fb108d1dda97e96777a9f936ac468d8 | 4f872e0487b567868f9d966575b4db782c93995c | /formtask/formtaskapp/forms.py | 67c6857319458848a28b1dee69e64f598119d1f3 | [] | no_license | vinod7967/all_django | b606ab6afd18b0ed0049da19cbe1c767a8d41cb8 | 832a86c0628806110f55e067192758d150684d53 | refs/heads/master | 2023-07-09T10:02:30.875805 | 2021-08-06T09:15:27 | 2021-08-06T09:15:27 | 387,468,755 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | forms.py | from django import forms
class studentRegistration(forms.Form):
username = forms.CharField(max_length=50)
fname = forms.CharField(max_length=50)
|
7e50084e4aa5672a76bd7082db6a921219bfa4f4 | c9154b6a13c82038bbd7c3379813f6cc0386891a | /src/r2b2/tests/test_eor_bravo.py | 13cd477347bfc7cacae21ca4b5565f367026838c | [
"MIT"
] | permissive | gwexploratoryaudits/r2b2 | 39fceb9beef06ba64d4d90a96a0e09f2c0c54cb7 | 128874b635ed67c0c4b707272a1584f379206ad8 | refs/heads/main | 2023-03-07T13:13:16.253451 | 2022-05-16T22:21:08 | 2022-05-16T22:21:08 | 238,544,886 | 6 | 1 | MIT | 2021-11-21T03:54:44 | 2020-02-05T20:44:38 | Python | UTF-8 | Python | false | false | 4,272 | py | test_eor_bravo.py | import json
import math
import pytest
from click.testing import CliRunner
from r2b2.cli import cli
from r2b2.contest import Contest
from r2b2.contest import ContestType
from r2b2.eor_bravo import EOR_BRAVO
from r2b2.tests import util as util
default_contest = util.generate_contest(10000)
tol = 0.000001
def test_si... |
294b40aa3162a3988e2e9174e49bd6d51326064c | 8a26a7165efdce40ab5bc13f1c29fd7d4c27c954 | /v1/tasks/migrations/0002_task_user.py | c6191ded227be41a25f812b111386a7f350787b3 | [
"MIT"
] | permissive | akabhi5/Website-API | 4ba43a031561ae1f1662f3fe1c4c1dc867327e35 | 91abb22441985b2f40a72e72c524c3514decb889 | refs/heads/master | 2023-08-20T08:32:02.339018 | 2021-11-03T13:22:31 | 2021-11-03T13:22:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | 0002_task_user.py | # Generated by Django 3.1.1 on 2020-10-23 22:23
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('tasks... |
0959145e779128a941babf9ffe951687ef1fb3ef | c863e17a78ff801222047c6ae19b42a97f3afe7e | /ordermate/core/models.py | 9c4c2199524e687f17aecf2df3d709aaa6020ba0 | [] | no_license | yugrocks/OrderMate | 89d994cc1501e2395184918fafea9f6a46cd1dbe | a04c2035026cbb02ee624e5745aaf7678fe76e85 | refs/heads/master | 2021-07-12T14:03:33.189109 | 2017-10-11T17:34:55 | 2017-10-11T17:34:55 | 106,500,473 | 2 | 0 | null | 2017-10-11T03:22:31 | 2017-10-11T03:22:31 | null | UTF-8 | Python | false | false | 1,513 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
class Vendor(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
#username = models.CharField(max_length=1000)
brand = models.CharField(max_length... |
c0953e96b2e8f10f360aaa4d0f1708204dadfe15 | 6510fdc0d1e5004388bc7978b7762948775d0149 | /pgscm/security/forms.py | 03538baf8a7140d998b69e19113444f293c3970c | [
"Apache-2.0"
] | permissive | hieulq/pgscm | e15d9458136f0ccf00d59a3a737410b987a19242 | d51ef5ab7f9bf99e768f4f8ebb2d68dc68a8a592 | refs/heads/master | 2021-06-22T02:59:03.195031 | 2018-07-29T17:31:33 | 2018-07-29T17:31:33 | 95,743,473 | 0 | 2 | Apache-2.0 | 2018-04-12T04:26:31 | 2017-06-29T05:55:17 | JavaScript | UTF-8 | Python | false | false | 1,026 | py | forms.py | from flask_security import forms
from wtforms import SelectField, validators
from pgscm.utils import __, Select
from pgscm.db import models
from pgscm import const as c
class RegisterForm(forms.RegisterForm):
fullname = forms.StringField(__('Full name'))
province_id = SelectField(
__('Province'), id=... |
142fb3682afc6e2e73886f981718e3d3befbeae2 | ad2d1c5917d6c8a2ce74426c26baf7d54854574b | /funcs.py | 834ca192829902284cf0c3949bcb87111d632293 | [
"MIT"
] | permissive | Chamuth/py-ccvshell-client | 392cf96a69496e4aa0e5145906be3f7cc9675a93 | 593936572ad574d39f8f29ee4c9140c1836a138b | refs/heads/master | 2021-01-17T17:39:11.783794 | 2017-06-27T07:17:50 | 2017-06-27T07:17:50 | 95,526,094 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,977 | py | funcs.py | import sys
import requests
import os
import json
def addLF():
print("");
# Creates a directory when it doesn't exist
def createDir (dir):
try:
if (os.path.isdir(dir) == False):
os.mkdir(dir)
return True
except Exception as e:
print (e)
return False
# Sets server information by saving to the file
def s... |
e9aac95c757a7c408346618c34fb93c103787b80 | fdde0fa76eea56f9aac6b944a42072dd93e5d71e | /synpost/fn/conversions.py | 721e78f0b11bd73bab350648a18e166fbd36e4ce | [
"MIT"
] | permissive | blakev/synpost | 0268fa6849dedd90865ce6c14764e3acd6404259 | 7db705463499e9ea609b9864b769d482b4f34a5d | refs/heads/master | 2021-01-23T07:02:30.893361 | 2015-02-27T19:57:56 | 2015-02-27T19:57:56 | 31,346,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,152 | py | conversions.py | import os
import re
import math
import string
import collections
from datetime import datetime
NAMABLES = string.ascii_letters + string.digits + '_- '
def flatten_list(*somelist):
""" Takes one or more lists of lists and returns a single list
>>> flatten_list([1,2,3,4])
[1, 2, 3, 4]
>>> flatten_list... |
4f6c4cb41dadc1fc1ca8f8fd45e74dd09f4b4a38 | 8a83bb7acb9b62183fca817e1f196dd8075630a4 | /01_array/29_chocolate_distribution_consecutive.py | a8ec6114520b5fe05fb4619df3696be4b2d05500 | [] | no_license | sandeepkumar8713/pythonapps | ff5ad3da854aa58e60f2c14d27359f8b838cac57 | 5dcb5ad4873124fed2ec3a717bfa379a4bbd197d | refs/heads/main | 2023-09-01T04:12:03.865755 | 2023-08-31T07:04:58 | 2023-08-31T07:04:58 | 234,762,925 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,975 | py | 29_chocolate_distribution_consecutive.py | # https://www.geeksforgeeks.org/maximum-number-chocolates-distributed-equally-among-k-students/
# https://leetcode.com/problems/maximum-average-subarray-i/
# Question : The problem is to find maximum sum sub-array divisible by k and then return (sum / k).
# Given n boxes containing some chocolates arranged in a row. Th... |
7c6c60bf35c1b1f5de16c93139f934e62be497ef | 1c8409e35a100ed163acff0541be4b0fc8343727 | /Day-9/Movies/FirstApp/views.py | 5d0d035345da52b2112b0959be2f8d3880217785 | [] | no_license | vchandrakiran/Summer-Workshop-django | 4ff1ff85aab1ed3d2497e810156b5891d46fbb00 | fd328fef89bb6a9cf0f49d0ac28e698500fadcce | refs/heads/master | 2022-11-10T11:39:41.327932 | 2020-06-15T10:42:07 | 2020-06-15T10:42:07 | 272,420,041 | 1 | 0 | null | 2020-06-15T11:26:05 | 2020-06-15T11:26:04 | null | UTF-8 | Python | false | false | 815 | py | views.py | from django.shortcuts import render
from FirstApp.models import MovieDetails
from django.http import HttpResponse
# Create your views here.
def register(request):
if request.method=='POST':
rmovie=request.POST['movie']
rhero=request.POST['hero']
rheroine=request.POST['heroine']
rdirector=request.POST['directo... |
5a75c947abbce1fabb03f305d748630cf2a463c8 | 00dc2467972f2b98bf9d9ce8eaad5d33fc2b6542 | /visionex/sentence.py | 61741963c793491d334dde2e698499ccb756b9a5 | [] | no_license | jjmarsha/Disability-Assistance-App | 06adf550346addc9cafc8a16b0f8384384183f8d | 25fc9ad0cdb70fd70107bc1b376f38a5e8fd5987 | refs/heads/master | 2020-04-08T10:45:31.938405 | 2018-11-27T08:47:08 | 2018-11-27T08:47:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | sentence.py | def splitParagraphIntoSentences(paragraph):
''' break a paragraph into sentences
and return a list '''
import re
# to split by multile characters
# regular expressions are easiest (and fastest)
sentenceEnders = re.compile('[.!?]')
sentenceList = sentenceEnders.split(para... |
d0e0882a6824576e3389f9f9f6ac14c4d0e80c83 | b052410ce0cd5c7ae54af34e7f7f4a623f3f7b32 | /jlu/papers/prop_keck_21A.py | 19829dd53338da0ec086e687a8852e2534dd6943 | [] | no_license | jluastro/JLU-python-code | b847936410d46cf73071300c217d2715cdf286de | db60fd0589aa7694101812224f4bdcdde0deb3ff | refs/heads/master | 2023-04-10T11:24:52.930029 | 2023-03-29T16:09:16 | 2023-03-29T16:09:16 | 3,509,766 | 9 | 7 | null | 2020-07-29T18:52:32 | 2012-02-22T00:08:20 | Python | UTF-8 | Python | false | false | 41,578 | py | prop_keck_21A.py | import numpy as np
import pylab as plt
import pdb
import math
import os
from jlu.observe import skycalc
from microlens.jlu import munge
# from microlens.jlu import residuals
from microlens.jlu import model_fitter, model
import shutil, os, sys
import scipy
import scipy.stats
# from gcwork import starset
# from gcwork im... |
33ea7f9daf882acfd0c911cd10051d4f6a2e0e18 | 0e8195b515f8dee188780d89303e80fa49869974 | /property_corporal/consolidated_propery_list.py | 189fda8b6843c677141e4da093da3901367b3f32 | [] | no_license | jschaf/property_corporal | 95e66d18738de25e272fd03aa26d193bfda53fbd | b115b4cdac129138a1ab6e2a77baef85f9c1bf7d | refs/heads/master | 2021-01-25T03:48:47.263516 | 2014-01-30T17:20:34 | 2014-01-30T17:20:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,319 | py | consolidated_propery_list.py | from collections import namedtuple
from decimal import Decimal
import xlrd
RowItem = namedtuple('RowItem', ['name', 'parser'])
def split_multi_field(cell_str):
if cell_str == '':
return []
fields = cell_str.split('|')
values = [None if x == "~" else x for x in fields]
names = ["serial_number... |
08ad7806c082c3bdf0ef341f88a578d421236452 | 15e5b320db8f6438e2796cd0ee1c86c44fa1a582 | /quotes/migrations/0006_auto_20200714_1616.py | c13cc794afb0aada7bfce379652750d850031566 | [] | no_license | alexyoung612/Quotera | 5670d518d3f679e63488b48af20874d5b22dadca | be1733fe5c2c3ccfd51a0d5374c5b36aad7d81a2 | refs/heads/master | 2021-06-29T22:43:23.409476 | 2020-09-19T00:47:51 | 2020-09-19T00:47:51 | 285,922,155 | 1 | 0 | null | 2020-09-02T22:37:10 | 2020-08-07T21:15:45 | Python | UTF-8 | Python | false | false | 441 | py | 0006_auto_20200714_1616.py | # Generated by Django 3.0.7 on 2020-07-14 23:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('quotes', '0005_auto_20200713_1442'),
]
operations = [
migrations.RemoveField(
model_name='quote',
name='date_created',
... |
7422c7fcb80f7136b200cc897136c38f25030ca8 | d1a1d65b66ae365bdcc950aaad8668bd6369e9fb | /blackjack2.py | cb35ff92f1f650a9e5fcb2f0c755cd3f9f23bb5e | [] | no_license | widesky867/blackjack | 955675fe268707eba8b1def05230c6054697878a | 91a35f6042a86974bee7be438f74f15a13b0791e | refs/heads/master | 2021-01-19T15:13:13.332932 | 2017-08-21T12:43:27 | 2017-08-21T12:43:27 | 100,951,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,702 | py | blackjack2.py | # main file for OO blackjack
# code adapted from https://brilliant.org/wiki/programming-blackjack/
# editted to include elements of OOP as a practice
from player import player
from deck import Deck
import time
def endGame():
if input("Continue? Yes/No \n").lower() in 'yes y'.split():
Deck.reshuffle()
... |
b7dd2c768b8b3c790d8f9f0b33c946b3c77d0b18 | 7de71945f513dba863f7cc36fb8a1ca1350b8ba7 | /viz/queryES-stats.py | 52824f1543c8a3e3adcaaf45e727db5b585f9241 | [] | no_license | yapwf/wsis | 023b66d167d8ee0f6e84c6ba44ab2b8bdaf991fe | 9a3d8f6f3280aaae834eb37050fa6cb2d3539edb | refs/heads/master | 2021-06-09T15:02:48.563764 | 2017-01-16T03:32:17 | 2017-01-16T03:32:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,344 | py | queryES-stats.py | import requests, json
REPLACETERM = "REPLACETERM"
queryString = '\
{\
"query": {\
"filtered": {\
"query": {\
"bool": {\
"must": [ \
{\
"term": {\
' + REPLACETERM + '\
... |
39f0cd92b4b7e16b6f34e54f0d5254bb0af17bc3 | f69055433330f9e296450b1bc9fe7e54f852f382 | /polls/migrations/0006_pictures_image_2.py | 22742b980c3cf6653ff8414e497e0c9f55f9f536 | [] | no_license | mysite/productive2 | 869c5b05fba244cecd2a4cbd52ae883383275016 | bbf7dc37c738eca2d5ec8793329b6a175af47755 | refs/heads/master | 2021-04-17T01:50:23.007508 | 2020-04-30T06:24:09 | 2020-04-30T06:24:09 | 249,393,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | 0006_pictures_image_2.py | # Generated by Django 3.0.4 on 2020-03-29 00:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0005_remove_pictures_project_name'),
]
operations = [
migrations.AddField(
model_name='pictures',
name='ima... |
258211649b679c131ea39ba8ef2a1e8288994b4a | e7a56f1f086352a45947a7ab3cecd71828d21f50 | /tovp/contributions/migrations/0013_pledge_number_of_instalments.py | 2cf41399c9437b738da0d2a46ce9dbab26d886ce | [
"MIT"
] | permissive | nrsimha/tovp | af2df2967a47e43c5378dc52c99652e8242c429b | 311bc957c95c294811d737f5df30b0a218d35610 | refs/heads/master | 2023-05-26T05:50:52.405855 | 2017-05-10T13:40:59 | 2017-05-10T13:40:59 | 27,473,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 582 | py | 0013_pledge_number_of_instalments.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contributions', '0012_auto_20150327_1629'),
]
operations = [
migrations.AddField(
model_name='pledge',
... |
d63c9ba8af23e375cc997a712dd133ecf952aea7 | 0892e3e61fcb07a962b32cdc136a252c4346c18c | /pong.py | 3cbca9d08e235c81b02a118fe63007adf9a2a208 | [] | no_license | nabq5272B/Pong | e89680d903a3c732d97508480a3a7cd2fe617aaf | f59d6a84736262193e055048ada66a533ce84f70 | refs/heads/main | 2023-04-11T10:01:56.388278 | 2021-04-13T14:35:45 | 2021-04-13T14:35:45 | 355,214,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,832 | py | pong.py | import turtle
# window
win = turtle.Screen()
win.title("--Pong--")
win.bgcolor('black')
win.setup(width = 700, height = 500)
win.tracer(0)
# Paddle A
# pa for paddle A variable
pa = turtle.Turtle()
pa.speed(0)
pa.shape('square')
pa.shapesize(stretch_wid = 5, stretch_len = 1)
pa.color('white')
pa... |
a9f7d00f438ff9a58e08f3959c5c01326b42b56e | a902290fb3b911676358ae4d93f83061a6c2bd0f | /InvenTree/part/migrations/0064_auto_20210404_2016.py | 57943347a15666035f9d9200dd5253a6176fee5d | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | inventree/InvenTree | a15e54182c9bfafdf5348cc9a66da1004e23e760 | e88a8e99a5f0b201c67a95cba097c729f090d5e2 | refs/heads/master | 2023-09-03T19:32:35.438375 | 2023-08-30T00:25:40 | 2023-08-30T00:25:40 | 85,894,461 | 3,077 | 549 | MIT | 2023-09-14T14:21:01 | 2017-03-23T01:44:10 | Python | UTF-8 | Python | false | false | 11,044 | py | 0064_auto_20210404_2016.py | # Generated by Django 3.0.7 on 2021-04-04 20:16
import InvenTree.models
import InvenTree.validators
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import mptt.fields
import part.models
import stdimage.models
class Migration(mig... |
4f10bf96326e315c0b53ee4e36714bd8360e57a5 | 63efe49f3a287b16ddf43ae754042e14829ecf64 | /algorithms/hybrid.py | de2a785225e4eee368ca589822b35a717f029d1b | [] | no_license | Sandy4321/recommendation_hybrid | 0358f77facad1d0203497cb8ad840ab518e2b568 | 710af193d1ef70d1fdfc3c14c68048fb5a93443f | refs/heads/master | 2021-01-18T21:42:02.043698 | 2016-05-29T16:31:18 | 2016-05-29T16:31:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,174 | py | hybrid.py | # -*- coding: utf-8 -*-
import copy
import time
from sklearn import linear_model
import claster_based
import item_based
import metrics
def get_metrics(w1, w2):
main_predict_array = []
for index, i in enumerate(predict_array_1):
if (predict_array_2[index] == 0):
main_predict_array.appen... |
7c49766528105dc240b8c5cb6bf6ec89ffa4b78e | 1025bc2aa5aaa40970ad1a51d8d0b1202a1ea11e | /Utilities/scripts/quad.py | 2cfb94219dfe5ae54e6829089deee9c0392741a5 | [] | no_license | uwcms/FinalStateAnalysis | f2be318546728621676a4b90ed2678b2560c94e6 | bcb164a8e27d459a9ac438780f6c8730d3e856bf | refs/heads/miniAOD_9_4_0 | 2022-11-09T01:28:52.199025 | 2019-03-15T19:25:10 | 2019-03-15T19:25:10 | 5,201,989 | 5 | 32 | null | 2020-11-19T17:02:32 | 2012-07-27T07:51:18 | Python | UTF-8 | Python | false | false | 259 | py | quad.py | #!/usr/bin/env python
'''
Add numbers in quadrature.
Usage: quad.py 10 2
Author: Evan K. Friis
'''
import math
import sys
def quad(*xs):
return math.sqrt(sum(float(x)*float(x) for x in xs))
if __name__ == "__main__":
print quad(*sys.argv[1:])
|
a2d7517cfa7e8ccdc409065b443f9507cef41652 | 79b20d43f9ab7146db2571cae9d2191c6d261ddf | /Exercício 3.py | 93e9af675328731142ef673b1ec82c46c03b639c | [] | no_license | Luskinnn28/Sete-Exerc-cios-de-fixa-o | 616de3a26b276b17174ea70db26d2ed8bbdb3b4c | dafd909d0759049141d6965f0c9899d3679f81f4 | refs/heads/main | 2023-06-27T00:24:40.731314 | 2021-08-06T22:22:50 | 2021-08-06T22:22:50 | 393,509,899 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | Exercício 3.py | #3. Faça um algoritmo que leia o preço de um produto e mostre seu novo preço, com 5% de desconto.
print('RESOLUÇÃO DA 3')
Preco = float (input("Digite aqui o preço do produto"))
desconto = Preco -(Preco * 5 / 100)
print('O preço inicial do pruduto era de R$ {}. Com o desconto, o produto fica R$ {}'.format(Preco, d... |
e03b5ed4b7415b893ce03168acb3e789bc0c1abc | 284db72e6711d1ccec64bea547f2472678933702 | /djblets/feedview/tests.py | 86fcdb9621a5f96f885d313245bcd6f2454aa97e | [] | no_license | chipx86/djblets | fa4ab581d6ba5d0174f6f482f639309d4464c9c3 | 99ea69d80a3a393b0da4da3152ef26e808dd8487 | refs/heads/master | 2023-08-03T12:53:34.762877 | 2023-07-31T18:38:09 | 2023-07-31T18:38:09 | 279,614 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | tests.py | """Unit tests for classes in djblets.feedview."""
from django.test.utils import override_settings
from djblets.testing.testcases import TestCase
@override_settings(ROOT_URLCONF='djblets.feedview.test_urls')
class FeedViewTests(TestCase):
def testViewFeedPage(self):
"""Testing view_feed with the feed-pag... |
48664a9c4149f3f237f53b3b514851cbcff014b9 | f7071479db987310dd93495499d17bbdf311d12e | /flask_chart/info/models.py | 4d9003b0da7903e37f90a916d8b7445c7072ee1c | [
"Apache-2.0"
] | permissive | googleliyang/flask_vue_demo | bd8cfc23696dd66f88216a1dadea58d1bf004812 | 6228da04ad2a2f3e7fb6a1e05136c455b9a1af99 | refs/heads/master | 2022-12-13T08:07:21.977012 | 2019-07-01T06:51:01 | 2019-07-01T06:51:01 | 194,532,185 | 0 | 0 | null | 2022-12-10T20:59:10 | 2019-06-30T15:32:59 | Python | UTF-8 | Python | false | false | 1,086 | py | models.py | # -*- coding:utf-8 -*-
from datetime import datetime
from . import db
class BaseModel(object):
create_time = db.Column(db.DateTime, default=datetime.now)
update_time = db.Column(
db.DateTime, default=datetime.now, onupdate=datetime.now)
class Chart1(BaseModel, db.Model):
__tablename__ = "dem... |
4fa919ef92ac89cab4269697170b14ceb192ca4e | 3e7cf51459047546715f455ddb8f06a77f820540 | /tests/data_reader.py | 30c681b6ddec799bb4a0ce9704f341032e35602d | [
"MIT"
] | permissive | RainBoltz/smart-copy-from-en-pdf-exe | ca92ccd5e5b54667e3c20493acd3fbe567418263 | cd3e57bb0742e5fe1b9e892bcbbfce4b6f68c05e | refs/heads/master | 2021-07-18T00:40:26.942103 | 2021-07-07T18:19:24 | 2021-07-07T18:19:24 | 179,493,379 | 0 | 0 | null | 2019-04-04T12:30:23 | 2019-04-04T12:30:22 | null | UTF-8 | Python | false | false | 1,063 | py | data_reader.py | import os
from collections import defaultdict
from typing import Dict
def get_fixtures(root_dir='tests/data') -> Dict[str, str]:
""" Read the test case assertion input/output.
Args:
root_dir(str):
testing fixtures folder
Returns:
fixtures(dict):
... |
b276d6c177dc680e8dc3382625981001a26e0d92 | f5502b44cca7580201ae5b8119866a9fcdf2ffd8 | /Backend/myproject/myapp/urls.py | 2a94c0afad78effe448f09cdd90a3c50c3da122f | [] | no_license | aboli-naik/Assignment3 | 0bdf37ea337f43c9b3639b9951ce000b8ad0f009 | a5af11ae3e59bcc24a0001b28e76d11a66f85c73 | refs/heads/master | 2023-03-11T07:08:18.663440 | 2021-03-02T12:23:13 | 2021-03-02T12:23:13 | 343,751,367 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 925 | py | urls.py | from django.urls import path
from myapp import views,views_authentication
urlpatterns = [
path('api/core/students/', views.students_list.as_view()),
path('api/core/students/<int:pk>/', views.students_detail.as_view()),
path('api/core/professor/', views.professors_list.as_view()),
path('api/core/profes... |
2dab586f626db929f46e24adaa7e94fd2c89b670 | af165d72ac206153c9b16499e88f9c9f30a69c9a | /nistdataselection/analysis/statistics.py | ac96afc220a12aa4cbd95a1183365d54a29b2c71 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | openforcefield/nistdataselection | bc4b443ec3377e9f7f953bcf6535118423ff96ea | d797d597f4ff528a7219d58daa8ef6508d438b24 | refs/heads/master | 2020-06-12T01:05:22.757026 | 2020-05-18T22:44:10 | 2020-05-18T22:44:10 | 194,144,523 | 3 | 0 | MIT | 2020-05-19T02:10:56 | 2019-06-27T18:28:23 | Python | UTF-8 | Python | false | false | 9,201 | py | statistics.py | from enum import Enum
import numpy
class Statistics(Enum):
Slope = "Slope"
Intercept = "Intercept"
R = "R"
R2 = "R^2"
P = "p"
RMSE = "RMSE"
MSE = "MSE"
MUE = "MUE"
Tau = "Tau"
def _compute_statistics(measured_values, estimated_values, statistics):
"""Calculates a collection ... |
7f101c8c4a78f549015beff531d12cb365bbb099 | 0cbc1c3eb075047b1c9e4f5571fa6fb078162c49 | /SConstruct | 90f4b821624e515152127bae2cf839afc94fd229 | [] | no_license | szkkteam/build_test_app | 4f58bcb7f7b22f0924c26760aa5bec0d5df05e8b | 127cc8867b4ffef507f30c633e665cf7b893d540 | refs/heads/master | 2020-05-04T01:28:38.832307 | 2019-04-04T18:19:49 | 2019-04-04T18:19:49 | 178,905,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 182 | SConstruct | ##
# The main build script
#
##
from builder import ProjectBuilder
from enviroment import QEnvironment
env = QEnvironment("config.json")
cc = ProjectBuilder(env)
cc.Build() | |
f2d20296eeff710645a1c984ea22cd4fd4c03184 | b76446925e45c3da75829cb98786125f59381b13 | /libs/sqlobject/tests/test_enum.py | 7b0fa04dc920247c097bff7276b31d1b0fed4c59 | [
"MIT"
] | permissive | jeremysherriff/HTPC-Manager | f28f319f2b95a966825458dbaf1d0069cbde009a | f4972361b768f9b585b9060daa605d5d8346c1a8 | refs/heads/master2 | 2021-05-13T15:30:22.453814 | 2019-02-13T22:43:00 | 2019-02-13T22:43:00 | 116,771,272 | 1 | 0 | MIT | 2019-01-22T06:37:13 | 2018-01-09T05:42:23 | Python | UTF-8 | Python | false | false | 1,483 | py | test_enum.py | from sqlobject import *
from sqlobject.col import validators
from sqlobject.tests.dbtest import *
########################################
## Enum test
########################################
class Enum1(SQLObject):
l = EnumCol(enumValues=['a', 'bcd', 'e'])
def testBad():
setupClass(Enum1)
for l in ['a... |
d3070f943e341c1d47adc2ec3f492b31ca95d84e | af8e8783a36189fb91b178fe34710e8f75d5f321 | /selenium_Python/cookies.py | db3365fd69aea3e28fababeb95187722e7de22e2 | [] | no_license | xiaobeiwu/Selenium | acfff0f612e82868bfd5e09d3c366bdc648e1021 | a5322e0fe85ad44c7385ae31b5931fce73266281 | refs/heads/master | 2020-06-01T16:24:29.990278 | 2019-06-13T10:21:04 | 2019-06-13T10:21:04 | 190,848,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | cookies.py | # -*- coding: utf-8 -*-
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://www.youdao.com/")
#获得cookie信息
cookies=driver.get_cookies()
#将获得的cookie的信息打印
print(cookies)
#向cookie的name和value中添加会话信息
driver.add_cookie({'name':'key-aaaaaaa','value': 'value-bbbbbb'})
#遍历cookies中的name和value信息并打印,... |
e2b811ff785d9549ab46735d30e17e5d8f7d61b8 | 4caa087dcb95a6a7dbe8cc49fde383e9f2aa4426 | /mmtrack/models/aggregators/__init__.py | 08c6f99fa9d52ecc3bb01da2e6b7c812dff7f931 | [
"Apache-2.0"
] | permissive | open-mmlab/mmtracking | 1e55c69cc1a264b3c9546c19332a38e9621430ed | e79491ec8f0b8c86fda947fbaaa824c66ab2a991 | refs/heads/master | 2023-09-01T15:41:04.322684 | 2023-04-25T13:25:18 | 2023-04-25T13:25:18 | 291,213,368 | 3,263 | 604 | Apache-2.0 | 2023-08-26T04:05:00 | 2020-08-29T06:16:56 | Python | UTF-8 | Python | false | false | 190 | py | __init__.py | # Copyright (c) OpenMMLab. All rights reserved.
from .embed_aggregator import EmbedAggregator
from .selsa_aggregator import SelsaAggregator
__all__ = ['EmbedAggregator', 'SelsaAggregator']
|
ada23235eea1589367b1e9cb4b20accdd031ece5 | 3df1b2397f2b93d1d43ff77c42fd10868060bb93 | /app/utils/http_responses.py | c4e3fed38e3ee39207ab16a11d48a68ce18cab8a | [] | no_license | lekirill/async-todo-list-app | a0b48f8eb0bed7550da596f77c44d10d49d52ef0 | 080a2d92e0acbede7ffa4f70eda3c2ee5fdbacc0 | refs/heads/main | 2023-03-22T16:01:55.258283 | 2021-03-19T09:56:56 | 2021-03-19T09:56:56 | 349,375,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | http_responses.py | from sanic.response import json
def _error_response(msg: str, code: int):
response = json({
'success': False,
'error': msg
}, status=code)
return response
def _success_response(msg: str, code: int):
response = json({
'success': True,
'result': msg
}, status=code)
... |
55b4495b3d6319f5461130d45b372f39e66bcc36 | cfd1514d35eee33bbf2f4d259fa12a3d2518129b | /Filters/cannyEdge.py | 76e32287f0cf28acff6766d81d157f09fca9a2f2 | [] | no_license | husainasad/OpenCV | 2e56af8ac38d14e877a04abe9f7aa5dbc94e2961 | 05b65c04f1baa9d6c11585e912960196b8f4d47a | refs/heads/master | 2021-07-25T23:18:41.382477 | 2020-06-20T10:19:17 | 2020-06-20T10:19:17 | 192,813,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | cannyEdge.py | import cv2
import numpy
image = cv2.imread("img.png")
thresholdval1 = 50
thresholdval2 = 100
canny = cv2.Canny(image, thresholdval1, thresholdval2)
cv2.imshow("canny", canny)
cv2.waitKey(0)
cv2.destroyAllWindows() |
653f252d49045db2070367138a1bdbe4a43c4a1b | 8636bcd39686ee9e3db826701a47352c551e9c49 | /domian/user.py | 1d3a6560415b3d1d54ae515238b955d86b824289 | [] | no_license | Jinzhe-li/pyDorm | 9f4b03d96c54c44c0793fab361c49b9927bfaea2 | 31471ebc616c50ada1803aa21e4bf400f66c0355 | refs/heads/master | 2023-04-21T00:00:51.473182 | 2021-05-09T14:32:40 | 2021-05-09T14:32:40 | 365,773,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | user.py | class user:
def __init__(self, username, password, dormid, photo):
self.username=username
self.password=password
self.dormid=dormid
self.photo=photo
|
68c762e5ff0c93847819c9bdc6286abf5996a7c5 | 0516d934d8a9bc77ba8b954afa6e6b3f2482cb81 | /PyBank/main.py | 361eec2310941af5d45d8d2f2e1fc9ba91b517a8 | [] | no_license | sorlowek/python-challenge | 41a04bbe0421b20e1a050d15e02b13f638e4e4e3 | bb1942480a9960fe002d7f24024df7604a9bec3a | refs/heads/master | 2020-04-09T05:54:27.002992 | 2018-12-08T20:38:02 | 2018-12-08T20:38:02 | 160,086,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,056 | py | main.py | #import Dependencies
import pandas as pd
#File to Load
PyBank = "Resources/budget_data.csv"
PyBank_df = pd.read_csv(PyBank)
#Read the modified PyBank csb and store into Pandas DataFrame
PyBank_df.head()
#Calculate total Number of months
month_count = len(PyBank_df["Date"].unique())
#Calculate net amount of Profi... |
b678772f1ab775c39d30d5111c66176cac86700f | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/Simulation/Barcode/BarcodeServices/python/BarcodeServicesConfig.py | e97ab2e90c98e176b9af33e5ff3ead460f0c27a6 | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,831 | py | BarcodeServicesConfig.py | # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
"""
BarcodeServices configurations
Elmar Ritsch, 23/10/2014
"""
from AthenaCommon import CfgMgr
from AthenaCommon.Constants import * # FATAL,ERROR etc.
def getMC15BarcodeSvc(name="Barcode_MC15BarcodeSvc", **kwargs):
kwargs.setdefault("Fi... |
ace036d424a714ef949f9bcbf1ed1cf7bcdcbbf1 | 7e297ea7bdd120ed1843b985a1370d984cf7b920 | /lib/__init__.py | 75665b8cade6237920581a3e22ca98bad329fce9 | [
"Apache-2.0"
] | permissive | xorpaul/jvm-gc-stats | 50e88324149637f2e115242e228652de2ebbd9c1 | 6a3ce6b6aec6a14570dca874f500ba1789d3a555 | refs/heads/master | 2020-12-29T02:54:26.134831 | 2013-07-15T11:57:24 | 2013-07-15T11:57:24 | 2,910,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 116 | py | __init__.py | import Parser
import Tailer
import Server
__all__ = ["Parser", "Tailer", "Server"]
#__all__ = ["Parser", "Tailer"]
|
194ef13d9af9bfb290e2ed90b6667a63fa2a7ffb | 1fe52d4eb8c14035ea180f3a20641cb7b1c109f1 | /day14/testmodule.py | e6b6fedad407210397dcbd6cc8c3dcb93b1694e6 | [] | no_license | Vaishnavi6520/Python-Program | a9d125ab20f7428cc7eb7c2213cc953f234f7163 | 7aa5bfa037526b5b1b124e3ef09f18bc2f79bb77 | refs/heads/master | 2023-07-09T18:50:24.876184 | 2021-08-14T11:30:53 | 2021-08-14T11:30:53 | 387,825,218 | 0 | 0 | null | 2021-08-14T11:30:54 | 2021-07-20T14:52:28 | Python | UTF-8 | Python | false | false | 136 | py | testmodule.py | # def printsomething():
# print(__name__)
# printsomething()
if(__name__=='__main__'):
print(__name__)
else:
print("Wrong") |